Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to add support for Inkbird ITH-20R #13

Open
gregb79 opened this issue May 20, 2021 · 27 comments
Open

Is it possible to add support for Inkbird ITH-20R #13

gregb79 opened this issue May 20, 2021 · 27 comments

Comments

@gregb79
Copy link

gregb79 commented May 20, 2021

Hi,

is it possible to add support for an Inkbird ITH-20R for esp32 with cc1101 i am not sure how to add additional decoders. a link for it working with rlt_433 is , https://github.com/ehagan/rtl_433

hopefully you can help as i want to log this sensor in home assistant,

thank you in advance.

@NorthernMan54
Copy link
Owner

A couple of comments

1 - My next release will be based on the FSK branch, so any changes will need to be applied their first

2 - The library currently supports only OOK/ASK Modulation do you know what modulation scheme it is using? You can find this in the device decoder file for the device.

3 - If you can submit a pull request against the FSK branch with the device decoder file placed in the contrib directory, I can run the build script that updates the code base for the additional file. My draft update script is here

https://github.com/NorthernMan54/rtl_433_ESP/blob/fsk/tools/update_rtl_433_devices.sh

If your curious as to what changes are required to add support for additional devices you can look at the update script

4 - As I don't have the physical device I will not be able to perform any testing, so will need your sign off on it working correctly.

5 - What framework are you using with this ? ie OpenMQTTGateway or ?

@gregb79
Copy link
Author

gregb79 commented May 21, 2021

Hi, Thank you

Thank you in advance.

It appears the inkbird ith-20r is FSK_PULSE_PCM i tried to create a pull request in the fsk branch hopefully that worked
i am planing on using openmqttgatway to send the data to Home Assistant for logging.

the code in the decoder file is .

`/** @file
Decoder for Inkbird ITH-20R.

Copyright (C) 2018 Daniel Krueger

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

*/

/**
Decoder for Inkbird ITH-20R.
https://www.ink-bird.com/products-data-logger-ith20r.html

The compact 3-in-1 multifunction outdoor sensor transmits the data on 433.92 MHz.
The device uses FSK-PCM encoding,
The device sends a transmission every ~20 sec.

Decoding borrowed from https://groups.google.com/forum/#!topic/rtl_433/oeExmwoBI0w

Total packet length 14563 bits:
Preamble: aa aa aa ... aa aa (14400 on-off sync bits)
Sync Word (16 bits): 2DD4
Data (147 bits):
Byte Sample Comment
0-2 D3910F Always the same across devices, a device type?
3 00 00 - normal work , 40 - unlink sensor (button pressed 5s), 80 - battery replaced
4 01 Changes from 1 to 2 if external sensor present
5-6 0301 Unknown (also seen 0201), sw version?
7 58 Battery % 0-100
8-9 A221 Device id, always the same for a sensor but each sensor is different
10-11 D600 Temperature in °C * 10, little endian, so 0xD200 is 210, 21.0°C or 69.8°F
12-13 F400 Temperature °C * 10 for the external sensor, 0x1405 if not connected
14-15 D301 Relative humidity % * 10, little endian, so 0xC501 is 453 or 45.3%
16-17 38FB CRC16
18 0 Unknown 3 bits (seen 0 and 2)

CRC16 (bytes 0-15), without sync word):
poly=0x8005 init=0x2f61 refin=true refout=true xorout=0x0000 check=0x3583 residue=0x0000

To look at unknown data fields run with -vv key.

Decoder written by Dmitriy Kozyrev, 2020
*/

#include "decoder.h"

static const uint8_t preamble_pattern[] = { 0xaa, 0xaa, 0xaa, 0x2d, 0xd4 };

#define INKBIRD_ITH20R_CRC_POLY 0xA001 // reflected 0x8005
#define INKBIRD_ITH20R_CRC_INIT 0x86F4 // reflected 0x2f61

static int inkbird_ith20r_callback(r_device *decoder, bitbuffer_t *bitbuffer)
{
data_t *data;
uint8_t msg[19];

if ( (bitbuffer->num_rows != 1)
     || (bitbuffer->bits_per_row[0] < 187)
      /*|| (bitbuffer->bits_per_row[0] > 14563)*/ ) {
    if (decoder->verbose > 1) {
        fprintf(stderr, "%s bit_per_row %u out of range\n", __func__, bitbuffer->bits_per_row[0]);
    }
    return DECODE_ABORT_LENGTH; // Unrecognized data
}

unsigned start_pos = bitbuffer_search(bitbuffer, 0, 0,
        preamble_pattern, sizeof (preamble_pattern) * 8);

if (start_pos == bitbuffer->bits_per_row[0]) {
    return DECODE_FAIL_SANITY;  // Not found preamble
}

start_pos += sizeof (preamble_pattern) * 8;
unsigned len = bitbuffer->bits_per_row[0] - start_pos;

if (decoder->verbose > 1) {
    fprintf(stderr, "%s start_pos=%u\n", __func__, start_pos);
    fprintf(stderr, "%s len=%u\n", __func__, len);
}

if (((len + 7) / 8) < sizeof (msg)) {
    if (decoder->verbose) {
        fprintf(stderr, "%s %u too short\n", __func__, len);
    }
    return DECODE_ABORT_LENGTH; // Message too short
}
// truncate any excessive bits
len = MIN(len, sizeof (msg) * 8);

bitbuffer_extract_bytes(bitbuffer, 0, start_pos, msg, len);

// CRC check
uint16_t crc_calculated = crc16lsb(msg, 16, INKBIRD_ITH20R_CRC_POLY, INKBIRD_ITH20R_CRC_INIT);
uint16_t crc_received = msg[17] << 8 | msg[16];

if (decoder->verbose > 1) {
    fprintf(stderr, "%s CRC 0x%04X = 0x%04X\n", __func__, crc_calculated, crc_received);
}

if (crc_received != crc_calculated) {
    if (decoder->verbose) {
        fprintf(stderr, "%s CRC check failed (0x%04X != 0x%04X)\n", __func__, crc_calculated, crc_received);
    }
    return DECODE_FAIL_MIC;
}

uint32_t subtype = (msg[3] << 24 | msg[2] << 16 | msg[1] << 8 | msg[0]);
int sensor_num = msg[4];
uint16_t word56 = (msg[6] << 8 | msg[5]);
int battery = msg[7];
uint16_t sensor_id = (msg[9] << 8 | msg[8]);
float temperature = (float)((int16_t)(msg[11] << 8 | msg[10])) / 10.0;
float temperature_ext = (float)((int16_t)(msg[13] << 8 | msg[12])) / 10.0;
float humidity = (float)(msg[15] << 8 | msg[14]) / 10.0;
uint8_t word18 = msg[18];

if (decoder->verbose) {
    fprintf(stderr, "%s dword0-3= 0x%08X\n", __func__, subtype);
    fprintf(stderr, "%s word5-6= 0x%04X\n", __func__, word56);
    fprintf(stderr, "%s byte18= 0x%02X\n", __func__, word18);
}

data = data_make(
        "model",            "",             DATA_STRING, "Inkbird ITH-20R",
        "id",               "",             DATA_INT,    sensor_id,
        "battery",          "Battery",      DATA_INT,    battery,
        "sensor_num",       "",             DATA_INT,    sensor_num,
        "mic",              "Integrity",    DATA_STRING, "CRC",
        "temperature_C",    "Temperature",  DATA_FORMAT, "%.1f C", DATA_DOUBLE, temperature,
        "temperature2_C",   "Temperature2", DATA_FORMAT, "%.1f C", DATA_DOUBLE, temperature_ext,
        "humidity",         "Humidity",     DATA_FORMAT, "%.1f %%", DATA_DOUBLE, humidity,
        NULL);

decoder_output_data(decoder, data);

return 1;

}

static char *output_fields[] = {
"model",
"id",
"battery",
"sensor_num",
"mic",
"temperature_C",
"temperature2_C",
"humidity",
NULL
};

r_device inkbird_ith20r = {
.name = "Inkbird ITH-20R temperature humidity sensor",
.modulation = FSK_PULSE_PCM,
.sync_width = 0, // No sync bit used
.short_width = 100, // Width of a '0' gap
.long_width = 100, // Width of a '1' gap
.reset_limit = 4000, // Maximum gap size before End Of Message [us]
.decode_fn = &inkbird_ith20r_callback,
.disabled = 0,
.fields = output_fields,
};
`

@gregb79 gregb79 closed this as completed May 21, 2021
@gregb79 gregb79 reopened this May 21, 2021
@gregb79
Copy link
Author

gregb79 commented May 21, 2021

HI i tried to attach a copy of the decoder file,

inkbird_ith20r.c.txt

Thank you.

@NorthernMan54
Copy link
Owner

If you look at the decoder file, it is fsk and not ook/ask. At the present time only ook/ask is fully supported, and I don’t have fsk working. And the road map fsk has a fair bit of effort to go, so may not be launched for a few months.

@gregb79
Copy link
Author

gregb79 commented May 22, 2021 via email

NorthernMan54 pushed a commit that referenced this issue May 25, 2021
Adding Inkbird ITH-20R decoder to contrib directory
@riegelbrau
Copy link

Would appreciate to have this device supported as well!

Regards Christoph

@NorthernMan54
Copy link
Owner

@riegelbrau FSK is still a future feature.

@riegelbrau
Copy link

I read that, but wanted to give some "pressure" 🙈.

@seb821
Copy link

seb821 commented Aug 3, 2023

Hello,

I have got a Inkbird IBS-P01R that uses the same protocol as the Inkbird ITH-20R.

Now that FSK has been implemented, I thought I would give it a try. I have Lilygo board 433 MHz that works well in OOK.

After changing OOK_MODULATION to false, here is what I was able to catch.

----- SX127x Status -----
RegOpMode: 0x0d
RegPacketConfig1: 0x00
RegPacketConfig2: 0x00
RegBitrateMsb: 0x07
RegBitrateLsb: 0x40
RegRxBw: 0x12
RegAfcBw: 0x02
-------------------------
RegLna: 0x20
RegRxConfig: 0x08
RegRssiConfig: 0x00
-------------------------
RegDioMapping1: 0x00
----------- FSK --------------
FDEV_MSB: 0x02
FDEV_LSB: 0x8f
----- SX127x Status -----
Analyzing pulses...
Total count:   48,  width: 20.94 ms             (20942 S)
Pulse width distribution:
 [ 0] count:   19,  width:  120 us [113;128]    ( 120 S)
 [ 1] count:    8,  width:  177 us [161;186]    ( 177 S)
 [ 2] count:    6,  width:  275 us [242;296]    ( 275 S)
 [ 3] count:    9,  width:   54 us [44;67]      (  54 S)
 [ 4] count:    5,  width:  462 us [416;530]    ( 462 S)
 [ 5] count:    1,  width:  724 us [724;724]    ( 724 S)
Gap width distribution:
 [ 0] count:    9,  width:  275 us [234;300]    ( 275 S)
 [ 1] count:   16,  width:  116 us [109;124]    ( 116 S)
 [ 2] count:    3,  width:  169 us [168;172]    ( 169 S)
 [ 3] count:    2,  width:  416 us [413;420]    ( 416 S)
 [ 4] count:    2,  width: 1185 us [1057;1313]  (1185 S)
 [ 5] count:    4,  width:  723 us [702;757]    ( 723 S)
 [ 6] count:    1,  width:  545 us [545;545]    ( 545 S)
 [ 7] count:   10,  width:   55 us [44;66]      (  55 S)
Pulse period distribution:
 [ 0] count:   10,  width:  400 us [355;479]    ( 400 S)
 [ 1] count:   12,  width:  266 us [223;299]    ( 266 S)
 [ 2] count:    8,  width:  587 us [537;703]    ( 587 S)
 [ 3] count:    1,  width: 1788 us [1788;1788]  (1788 S)
 [ 4] count:    5,  width:  863 us [757;1017]   ( 863 S)
 [ 5] count:    1,  width: 1178 us [1178;1178]  (1178 S)
 [ 6] count:    8,  width:  175 us [168;183]    ( 175 S)
 [ 7] count:    2,  width:  117 us [113;121]    ( 117 S)
Pulse timing distribution:
 [ 0] count:   36,  width:  118 us [109;128]    ( 118 S)
 [ 1] count:   11,  width:  175 us [161;186]    ( 175 S)
 [ 2] count:   15,  width:  275 us [234;300]    ( 275 S)
 [ 3] count:   19,  width:   54 us [44;67]      (  54 S)
 [ 4] count:    8,  width:  461 us [413;545]    ( 461 S)
 [ 5] count:    5,  width:  723 us [702;757]    ( 723 S)
 [ 6] count:    2,  width: 1185 us [1057;1313]  (1185 S)
Guessing modulation: No clue...
view at https://triq.org/pdv/#AAB0110701007600AF0113003601CD02D304A18255+AAB0150701007600AF0113003601CD02D304A18090A080B255+AAB0130701007600AF0113003601CD02D304A19081A255+AAB0110701007600AF0113003601CD02D304A1B255+AAB0110701007600AF0113003601CD02D304A18455+AAB0110701007600AF0113003601CD02D304A1C655+AAB0110701007600AF0113003601CD02D304A19555+AAB0110701007600AF0113003601CD02D304A18655+AAB0120701007600AF0113003601CD02D304A1C0B455+AAB0130701007600AF0113003601CD02D304A1A0B0A455+AAB0120701007600AF0113003601CD02D304A1908555+AAB0110701007600AF0113003601CD02D304A18255+AAB0120701007600AF0113003601CD02D304A180B555+AAB0120701007600AF0113003601CD02D304A1838255+AAB0120701007600AF0113003601CD02D304A180B555+AAB0130701007600AF0113003601CD02D304A183A1D255+AAB0120701007600AF0113003601CD02D304A1838255+AAB0160701007600AF0113003601CD02D304A1B3C083C0909255+AAB0190701007600AF0113003601CD02D304A1B08391C08393B3A38055

rtl_433_ESP(6): Unparsed Signal length: 1457000, Signal RSSI: -40, pulses: 48
rtl_433_ESP(6): RAW (1457000): +113-278(-39)+114-109(-39)+161-117(-39)+282-113(-39)+114-113(-39)+44-234(-39)+172-117(-40)+121-168(-40)+296-241(-45)+55-300(-45)+125-420(-45)+475-1313(-41)+183-717(-39)+121-1057(-41)+420-121(-41)+55-545(-41)+292-114(-42)+47-124(-42)+290-413(-45)+175-124(-45)+125-757(-40)+117-296(-40)+121-113(-40)+55-702(-40)+128-51(-39)+125-300(-39)+124-121(-39)+44-717(-40)+117-58(-40)+249-168(-41)+724-293(-44)+124-44(-44)+124-238(-44)+67-54(-44)+416-121(-102)+117-59(-102)+471-121(-92)+179-114(-92)+179-300(-92)+65-114(-92)+128-55(-94)+186-172(-94)+530-114(-100)+120-56(-100)+182-66(-100)+55-58(-100)+242-55(-100)+118-112(-44)
N: Received message : {"model":"undecoded signal","protocol":"signal parsing failed","duration":1457000,"rssi":-40,"pulses":48}

Unfortunately it does not decode properly.

Any idea of parameters I could change or tests I could perform to go forward ?

@riegelbrau
Copy link

riegelbrau commented Aug 3, 2023

Please see my command line from inside my Docker Container running rtl_433 native on my Synology NAS:Screenshot_20230803_191846_org.mozilla.firefox.jpg

@seb821
Copy link

seb821 commented Aug 5, 2023

Please see my command line from inside my Docker Container running rtl_433 native on my Synology NAS:!

I am not sure I understand. What is providing the rtl_tcp server ? An esp32 ?

@riegelbrau
Copy link

You asked for parameters. Even I don't know how to modify parameters inside the ESP32, I wanted to show, with which parameters rtl_433 running on Linux decodes the sensor quite well. May be that helps, may be not.

@NorthernMan54
Copy link
Owner

@riegelbrau @seb821 The current release includes support for FSK, so this should be able to push forward. Unfortunately I do not have access to an Inkbird device, so my ability to troubleshoot this further is very limited.

@seb821
Copy link

seb821 commented Aug 10, 2023

I was hoping that with raw or unparsed signals something could be done. But I completely understand it is very difficult to troubleshoot remotely.
Thanks for the feedback.

@riegelbrau
Copy link

Today I've got managed to compile the image for the board "ttgo-lora32-v21" with option -DOOK_MODULATION=false to test my FSK modulated devices. For the Inkbird ITH-20R I did not recognize any mqtt messages, while the sensor did successfully send messages to the native rtl_433 instance.
The Lilygo did successfully send configuration messages for two seperate sensor ids of type "Ford TPMS" and messages from my "Jansite Solar TPMS" that I use to control the carbonization of my home brewed beer during the secondary fermentation .
I only used the console messages and the mqtt messages. I have no clue how to see other logs of the rtl_433 instance on the Lilygo board. If I get some hint i will provide some log output or debug infos.

Regards
Christoph

@riegelbrau
Copy link

I tested again with OMG V1.7 fsk-version, which should have the newest release of RTL_433_ESP integrated. The ITH-20R does not appear at all, while I see the messages in my native rtl_433 instance.
How can I help with testing?

@NorthernMan54
Copy link
Owner

One thing people have found, is that in FSK mode the frequency setting needs to be more exact. Can you lookup the exact frequency with your rtl_sdr then try using that frequency ?

@riegelbrau
Copy link

I am running rtl_433 with 433.92 MHz. The MQTT messages show two frequencies:
grafik
One is very near to 433.92 and the other is lower. I tried both with OMG V1.7 without success. Are there any other parameters that should or might be adjusted?

@NorthernMan54
Copy link
Owner

There are other FSK related settings that are internal to the code base-

// From https://github.com/matthias-bs/BresserWeatherSensorReceiver/issues/41#issuecomment-1458166772

If you look at the OOK_Receiver example

#if defined(setBitrate) || defined(setFreqDev) || defined(setRxBW)

I had added code to 'twist the knobs' and see if I could get better results during testing. I had tuned the values based on the signal from my FineOffSet WH51. You could try using that against your device to find a better setting.

When I was doing the testing, I let it run for about a day for each knob, logged the serial output to a file, then did some statistical analysis to figure out the best setting for each knob. I let it run for a day, as the sensor only sent a signal every 60 seconds, and wanted to test each setting a few times.

@riegelbrau
Copy link

How can I create and run this example on my Lilygo TTGO Lora32 T3 V1.6.1 and produce a log like above? For the test the device needs to be filtered for only the ITH-20R. I saw the my_devices directive, but where must I set the filter?

@NorthernMan54
Copy link
Owner

The MY_DEVICES directive is in a couple of spots, and you can use it to only include a subset of decoders to use. When I did my testing I did not use a subset but the full list of decoders.

I then did some statistical analysis on this log line. Log.notice(F(CR "Finished %s: %s, count: %d" CR), TEST, stepPrint, count);

@riegelbrau
Copy link

I've got managed to compile the OOK_Receiver example only with the compiler settings for setBitrate and -DsetRxBW.
With -DsetFrequencyDeviation I get compiler errors:

Compiling .pio\build\esp32_lilygo\libb82\RadioLib\modules\RFM9x\RFM96.cpp.o
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/CC1101/../../protocols/PhysicalLayer/PhysicalLayer.h:225:21: note: in expansion of macro 'setFrequencyDeviation'
     virtual int16_t setFrequencyDeviation(float freqDev);
                     ^~~~~~~~~~~~~~~~~~~~~
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/CC1101/CC1101.h:737:13: note: in expansion of macro 'setFrequencyDeviation'
     int16_t setFrequencyDeviation(float freqDev) override;
             ^~~~~~~~~~~~~~~~~~~~~
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/LLCC68/../SX126x/SX126x.h:774:13: note: in expansion of macro 'setFrequencyDeviation'
     int16_t setFrequencyDeviation(float freqDev) override;
             ^~~~~~~~~~~~~~~~~~~~~
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/nRF24/nRF24.h:429:13: note: in expansion of macro 'setFrequencyDeviation'
     int16_t setFrequencyDeviation(float freqDev) override;
             ^~~~~~~~~~~~~~~~~~~~~
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/RF69/RF69.h:773:13: note: in expansion of macro 'setFrequencyDeviation'
     int16_t setFrequencyDeviation(float freqDev) override;
             ^~~~~~~~~~~~~~~~~~~~~
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/RFM2x/../Si443x/Si443x.h:730:13: note: in expansion of macro 'setFrequencyDeviation'
     int16_t setFrequencyDeviation(float freqDev) override;
             ^~~~~~~~~~~~~~~~~~~~~
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/RFM9x/../SX127x/SX127x.h:920:13: note: in expansion of macro 'setFrequencyDeviation'
     int16_t setFrequencyDeviation(float freqDev) override;
             ^~~~~~~~~~~~~~~~~~~~~
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/SX128x/SX128x.h:670:13: note: in expansion of macro 'setFrequencyDeviation'
     int16_t setFrequencyDeviation(float freqDev) override;
             ^~~~~~~~~~~~~~~~~~~~~
*** [.pio\build\esp32_lilygo\src\OOK_Receiver.ino.cpp.o] Error 1
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/CC1101/../../protocols/PhysicalLayer/PhysicalLayer.h:225:21: note: in expansion of macro 'setFrequencyDeviation'
     virtual int16_t setFrequencyDeviation(float freqDev);
                     ^~~~~~~~~~~~~~~~~~~~~
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/CC1101/CC1101.h:737:13: note: in expansion of macro 'setFrequencyDeviation'
     int16_t setFrequencyDeviation(float freqDev) override;
             ^~~~~~~~~~~~~~~~~~~~~
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/CC1101/CC1101.cpp: In member function 'int16_t CC1101::begin(float, float, float, float, int8_t, uint8_t)':
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/CC1101/CC1101.cpp:68:40: error: expression cannot be used as a function
   state = setFrequencyDeviation(freqDev);
                                        ^
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/CC1101/CC1101.cpp: At global scope:
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/CC1101/CC1101.cpp:502:17: note: in expansion of macro 'setFrequencyDeviation'
 int16_t CC1101::setFrequencyDeviation(float freqDev) {
                 ^~~~~~~~~~~~~~~~~~~~~
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/LLCC68/../SX126x/../../protocols/PhysicalLayer/PhysicalLayer.h:225:21: note: in expansion of macro 'setFrequencyDeviation'
     virtual int16_t setFrequencyDeviation(float freqDev);
                     ^~~~~~~~~~~~~~~~~~~~~
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/LLCC68/../SX126x/SX126x.h:774:13: note: in expansion of macro 'setFrequencyDeviation'
     int16_t setFrequencyDeviation(float freqDev) override;
             ^~~~~~~~~~~~~~~~~~~~~
*** [.pio\build\esp32_lilygo\libb82\RadioLib\modules\CC1101\CC1101.cpp.o] Error 1
*** [.pio\build\esp32_lilygo\libb82\RadioLib\modules\LLCC68\LLCC68.cpp.o] Error 1
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/RF69/../../protocols/PhysicalLayer/PhysicalLayer.h:225:21: note: in expansion of macro 'setFrequencyDeviation'
     virtual int16_t setFrequencyDeviation(float freqDev);
                     ^~~~~~~~~~~~~~~~~~~~~
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/RF69/RF69.h:773:13: note: in expansion of macro 'setFrequencyDeviation'
     int16_t setFrequencyDeviation(float freqDev) override;
             ^~~~~~~~~~~~~~~~~~~~~
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/RF69/RF69.cpp: In member function 'int16_t RF69::begin(float, float, float, float, int8_t, uint8_t)':
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/RF69/RF69.cpp:71:40: error: expression cannot be used as a function
   state = setFrequencyDeviation(freqDev);
                                        ^
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/RF69/RF69.cpp: At global scope:
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/RF69/RF69.cpp:590:15: note: in expansion of macro 'setFrequencyDeviation'
 int16_t RF69::setFrequencyDeviation(float freqDev) {
               ^~~~~~~~~~~~~~~~~~~~~
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/RFM9x/../SX127x/../../protocols/PhysicalLayer/PhysicalLayer.h:225:21: note: in expansion of macro 'setFrequencyDeviation'
     virtual int16_t setFrequencyDeviation(float freqDev);
                     ^~~~~~~~~~~~~~~~~~~~~
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/RFM9x/../SX127x/SX127x.h:920:13: note: in expansion of macro 'setFrequencyDeviation'
     int16_t setFrequencyDeviation(float freqDev) override;
             ^~~~~~~~~~~~~~~~~~~~~
*** [.pio\build\esp32_lilygo\libb82\RadioLib\modules\RF69\RF69.cpp.o] Error 1
*** [.pio\build\esp32_lilygo\libb82\RadioLib\modules\RFM9x\RFM95.cpp.o] Error 1
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/RFM9x/../SX127x/../../protocols/PhysicalLayer/PhysicalLayer.h:225:21: note: in expansion of macro 'setFrequencyDeviation'
     virtual int16_t setFrequencyDeviation(float freqDev);
                     ^~~~~~~~~~~~~~~~~~~~~
<command-line>: error: expected unqualified-id before numeric constant
.pio/libdeps/esp32_lilygo/RadioLib/src/modules/RFM9x/../SX127x/SX127x.h:920:13: note: in expansion of macro 'setFrequencyDeviation'
     int16_t setFrequencyDeviation(float freqDev) override;
             ^~~~~~~~~~~~~~~~~~~~~
*** [.pio\build\esp32_lilygo\libb82\RadioLib\modules\RFM9x\RFM96.cpp.o] Error 1
=================================================================================== [FAILED] Took 28.43 seconds ===================================================================================
Environment    Status    Duration
-------------  --------  ------------
esp32_lilygo   FAILED    00:00:28.428

Can you help with this?

@riegelbrau
Copy link

I don't get any steps further. Can anyone help? For details, see above.

@riegelbrau
Copy link

Hello @gregb79 , did you get the ITH-20R sensor running? Do you have any tipps how to get further with this device?

@NorthernMan54
Copy link
Owner

I refreshed the device decoders from rtl_433 24.10, maybe this is resolved?

@riegelbrau
Copy link

Now I tried the same tests again. I compiled and uploaded the OOK_Receiver package from GitHub Desktop using the platformio extension of VSCode. I see the serial output, but no success for protocol no 35. The compilation using the knobs mentioned above finishes with the same results. I can compile with -DsetBitrate and -DsetRxBW but not with setFreqDev:
grafik
Furthermore I get readable serial output in the terminal, but when I use PuTTY the output is unreadable. These puTTY settings run well, when I use them with an image of OMG compiled with platformio on gitpod.io. My be I need some special settings?

I need some more hints please, how to go on.

Regards, Christoph

@NorthernMan54
Copy link
Owner

A couple of comments

1 - That issue is triggered by a bad compiler directive in platformio.ini -> change '-DsetFrequencyDeviation' to '-DsetFreqDev'

2 - Those options can only be used one at a time

3 - Check the baud settings in putty, they need to match platformio / the compiled code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants