Giter VIP home page Giter VIP logo

lmicpp-arduino's People

Contributors

marciolm avatar ngraziano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lmicpp-arduino's Issues

share changes for state saving

Hello @ngraziano, I'm working on a project with ESP32 and LoRa and I'm using Arduino, I was wondering if you have documented the changes you did on LMIC to get the state saving implemented; I would like to do it on the Arduino port of LMIC (I'm ussing MCCI version)
I was trying to follow the changes but if you have documented all it would be better.
For the moment I'm joining every 30 minutes but I would like to use the session info for avoid doing this.

Thanks in advance and regards,

Will this code be compatible with Arduino ide?

This code and repository can use only vs. code but I want work Arduino ide with SX1262 E22_900M22S module and ESP32 WROWER_B module. Actually, I'm just trying to send data to Helium console with OTAA. Will this code be compatible with Arduino ide and can ı send data over OTAA?

lorawan1.1

Do you have plans for version lorawan1.1?

Improve documentation

The project need a better documentation for the way to select the radio and region.

Core panic after a confirmed downlink message

Hello,
The "esp32" example is working fine in the US915 band, even with normal downlink messages, but every time I try to send one "confirmed downlink message" through the TTN console, I got a core panic message end the esp32 is rebooted. The debug messages are the following ( a little before and after the crash):

`251759290 Init Configure
251760430 Status b2 mode : 3, status 1
251760438 TXMODE, freq=904900000, len=14, SF=7, BW=125, CR=4/5
251763363 Not using interupt trigger 0
251763373 Set Radio to sleep
251763380 End TX 251763361
251763386 Rx delay : 972 ms
251821675 Init Configure
251837987 Not using interupt trigger 0
251837995 RX timeout
251838003 Set Radio to sleep
251838009 End RX - Start RX : 220992 us
251838023 Decode Frame RX1
251838175 No downlink data
251838327 Rx delay : 1959 ms
251883302 Init Configure
251895052 Not using interupt trigger 0
251895061 RX timeout
251895068 Set Radio to sleep
251895074 End RX - Start RX : 148000 us
251895090 Decode Frame RX2
251895240 No downlink data
251895392 EV_TXCOMPLETE (includes waiting for RX windows)
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400ec6e7 PS : 0x00060130 A0 : 0x800d29a0 A1 : 0x3ffb1e30
A2 : 0x00000008 A3 : 0x3ffc00f4 A4 : 0x3ffb6610 A5 : 0x3ffb1b20
A6 : 0x3ffb1b20 A7 : 0x00000004 A8 : 0x00000000 A9 : 0x3ffb1e00
A10 : 0x00000000 A11 : 0x3ffb1e48 A12 : 0xf039fa05 A13 : 0xfffd6213
A14 : 0xffffffff A15 : 0xff000000 SAR : 0x0000000c EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000008 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff

Backtrace: 0x400ec6e7:0x3ffb1e30 0x400d299d:0x3ffb1e50 0x400d29d9:0x3ffb1e70 0x400d0f05:0x3ffb1e90 0x400d21ae:0x3ffb1eb0 0x400d2361:0x3ffb1ed0 0x400d24c5:0x3ffb1ef0 0x400d24dc:0x3ffb1f10 0x400d252a:0x3ffb1f30 0x400ec404:0x3ffb1f50 0x400d2a12:0x3ffb1f70 0x400d0fbe:0x3ffb1f90 0x400d4c05:0x3ffb1fb0 0x40088215:0x3ffb1fd0

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
251621498 Radio Init
251621914 Set Radio to sleep
251621927 Set Radio to sleep
251622061 Packet queued
251622076 Ready for uplink
251622107 Time on air : 370 ms
251622121 Init Configure
251623276 Status 32 mode : 3, status 1
251623287 TXMODE, freq=902300000, len=23, SF=10, BW=125, CR=4/5
251646480 Not using interupt trigger 0
251646491 Set Radio to sleep
251646498 End TX 251646479
`
Any idea ?
Thank you
Márcio

i need to receive int value to assign to variable in ESP

ok, so when downlink data from NS server to node..

i need to convert value to Base64 (i use Chirpstack) then send it on Port 2 (as example, i can use API to)
I then need to retreive the value in node.

Example:

int value of "24156"

Convert to HEX: 24156 -> 0x5E5C
Convert HEX to Base64: 0x5E5C -> Xlw=

now send with chirpstack dashboard or API
image

Great...

now get that value with great LMICPP-Arduino

union ArrayToInteger {
  byte array[2];
  uint16_t integer;
};

if (LMIC.getDataLen()) { 
      PRINT_DEBUG(1, F("Received %d bytes of payload - Receive class C"), LMIC.getDataLen());
      auto data = LMIC.getData();
      if (data) {
        uint8_t port = LMIC.getPort();
        if (port == 2) {                         

                ArrayToInteger converter; //Create a converter

                converter.array[0]=data[1];
                converter.array[1]=data[0];

                  PRINT_DEBUG(1, F("UNION RESULT:")); 
                  PRINT_DEBUG(1, F("Received %02X HEX"), converter.integer);
                  PRINT_DEBUG(1, F("Received %d Value"), converter.integer);
          }
        else {
          //showText(reinterpret_cast<const char *>(data));
        }

      }
    }

image

auto data = LMIC.getData(); // i get the my data...

but is there a better way ? i dont what to send text, so i need to convert HEX to base64 in first place..
but i need to receive int value to assign to variable in ESP.

can i get value "directly from data array?" or the method i use are ok?

many thanks.. :)

Cant compile LMICPP-Arduino

When I try to compile the LMICPP-Arduino, I get an error that #include file is not found. I googled it and it sounds like you are using the STD for AVR so I followed the directions to include that, unfortunately, that didnt work either.

are there any changes to the configuration that needs to happen other then copying the master folder into the libary section and modifying the LMIC configs? I have been using the MCCI fork, but have ran into problems with the AVR powersavings and found your TTN post

I would like to test out your library, but I cant even get it to compile.

Thanks,
Mark

Trouble compiling, missing array.h

Having issues locating the correct array.h library.
lib\LMICPP-Arduino-master\src/lmic/../aes/../lmic/lorabase.h:60:26: error: 'array' in namespace 'std' does not name a template type

DIO2 as a RF switch is working ?

Hello.
I am trying to use an Sx1262 module (Ebyte E22900M20S) + ESP32. There is an external circuit to control the RF switch using the module's external pin DIO2, but this pin never changes its state when I run the examples. The gateway receives a very weak signal of about -108 dBm. If I force the module's pin TXEN to high, I got -38 dBm.

The only changes in "esp32" example were:
constexpr lmic_pinmap lmic_pins = { .nss = 5, .prepare_antenna_tx = nullptr, .rst = 4, .dio = {/* busy */ 22, /* DIO1 */ 21}, }; RadioSx1262 radio{lmic_pins, ImageCalibrationBand::band_902_928 }; LmicUs915 LMIC{radio, OSS};
And I tried to insert the RadioSx1262 set_DIO2_as_rf_switch_ctrl(); in the setup() session, with no success.
Can you confirm the DIO2 is actually controlling the RF switch? Alternatively, is there a way to use a pair of microcontroller GPIOs to control the TXEN and RXEN, with no GPIO2?
Thanks
Márcio

ESP32 LoRa TTGO V1 board: TTN joining loops forever

Hi,
I've setup a new project in Platformio, added LMICPP as project library, use your ESP32_deepsleep example, set up the keys in TTN, put them into lorakeys.h, compile without errors and put everything onto my board. In platformio.ini I have added "build_flags = -DENABLE_SAVE_RESTORE"
After starting the firmware I've observed, that nothing will be received at TTN, even not after a long time.

So, I have set -DLMIC_DEBUG_LEVEL=2 in platformio.ini and get the following output on the console:

rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6412
entry 0x400806a8
4217 Chip version : 0
4259 Init Default Channel
4272 Scheduled job 0x3ffbfd54, atRun 4271
4284 Running job 0x3ffbfd54, deadline 4271
4310 Init Join loop : avail=4267 txend=379449
4553 Scheduled job 0x3ffbfd70, atRun 4551
4785 Packet queued
4896 Running job 0x3ffbfd70, deadline 4551
5133 EV_JOINING
5224 Uplink join pending
5367 Airtime available at 379449 (previously determined)
5680 Uplink delayed until 379449
5864 Scheduled job 0x3ffbfd70, atRun 379324
379325 Running job 0x3ffbfd70, deadline 379324
379334 Uplink join pending
379341 Airtime available at 379449 (previously determined)
379374 Ready for uplink
379523 Time on air : 61 ms
379662 Setting available time for band 1 to 764940
379949 Updating info for TX at 379340, airtime will be 3856.
380285 Updating global duty avail to 383196
380539 Config power to 16 on PA_BOOST
380753 TXMODE, freq=868100000, len=23, SF=7, BW=125, CR=4/5
381074 Scheduled job 0x3ffbfd70, atRun 381072
381329 Running job 0x3ffbfd70, deadline 381072
381589 Scheduled job 0x3ffbfd70, atRun 381587
381845 Running job 0x3ffbfd70, deadline 381587
382104 Scheduled job 0x3ffbfd70, atRun 382103
382361 Running job 0x3ffbfd70, deadline 382103
382619 Scheduled job 0x3ffbfd70, atRun 382618
382876 Running job 0x3ffbfd70, deadline 382618
383135 Scheduled job 0x3ffbfd70, atRun 383133
383391 Running job 0x3ffbfd70, deadline 383133
383650 Scheduled job 0x3ffbfd70, atRun 383649
383906 Running job 0x3ffbfd70, deadline 383649
384165 Scheduled job 0x3ffbfd70, atRun 384164
384422 Running job 0x3ffbfd70, deadline 384164
384681 Scheduled job 0x3ffbfd70, atRun 384680
384937 Running job 0x3ffbfd70, deadline 384680
385196 Scheduled job 0x3ffbfd70, atRun 385195
385453 Running job 0x3ffbfd70, deadline 385195
385712 Scheduled job 0x3ffbfd70, atRun 385710
385968 Running job 0x3ffbfd70, deadline 385710
386227 Scheduled job 0x3ffbfd70, atRun 386226
386483 Running job 0x3ffbfd70, deadline 386226
.....
(and so on) This never ends.

I'm using a TTGO ESP32 LoRa V1 board. Previous tests with generic LMIC library and it's ABP and OTAA examples was running with TTN.
I have searched for a deep sleep aware library and found yours. Btw great work! My TTGO board should be similar to yours by Hetech. I2C settings are identical.

Do you have any idea from the log what goes wrong?

Thank you very much in advance!

Regards,
Uwe

ESP32 + deepsleep + TTN ABP

Ahoy, thanks for sharing this lib, I'm testing with OTAA now and that seems to work but I can't find an example how to do ABP with esp32 and deepsleep. The only references to ABP point to the old examples from the other lmic lib which gave me trouble with deepsleep and unsuccessful radio restarts on a ttgo t-beam with the axp192 power controller. I'd love to use your lib with ABP but I'm not sure how to implement it. If you ever find the time to add an ABP example, it would be very much appreciated. Thank you very much.

Great Library .. can i help?

Ok. Let me start the post by saying that this library seems great.
Download, use platformio .. build upload.. first time .. first join.... Txack with ClassC no problem at all..

image

LinkAdrReq also with no problem..
image

it's so rare that all goes well.. that i want to post the state of happiness i'm in at the moment.

I use EU868 with ClassC OTAA.
With devBoard TTGO v1 and custom Board ESP32 pico Sx1276

do you need some help on testing some features?

Possible integer overflow in OsTime

Hey,

thank you for the project, it is really useful!

While using the OsTime and OsDeltaTime interface I stumbled upon a possible integer overflow that I
wanted to discuss.

Consider the following example:

OsTime time_now, time_previous;
OsDeltaTime threshold::from_ms(50);

auto active = (time_now - time_previous) >= threshold;

Internally subtraction is defined as

constexpr OsDeltaTime operator-(OsTime const &a, OsTime const &b) {
  return OsDeltaTime(a.tick() - b.tick());
}

Now the backing type of OsDeltaTime is int32 while OsTime uses uint32.
If OsTime a is >2**31 the above statement would result in OsDeltaTime((int32) 2**31+1 - 0)
which would clearly overflow int32 and be a negative delta time even though it would need to be positive.

Currently I'm using raw tick values to work around this ((time_now.tick() - time_previous.tick()) >= (uint32_t) threshold)
but it might lead to unexpected behavior down the line so I thought it is worthwhile reporting it.

getting Chip version : 0 now (i use to have Chip version : 18)

rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
⸮626278 Chip version : 0
1251359 Init Join loop : avail=1251340 txend=1323953
1251366 Packet queued
1251377 Uplink delayed until 1323953
1323831 Ready for uplink
1323856 Time on air : 61 ms
1323875 Config power to 16 on PA_BOOST
1323893 TXMODE, freq=868300000, len=23, SF=7, BW=125, CR=4/5

well i think i broke something.

all was great but now it seems icannot comunicate with lora chip

i have this :

#define MOSI 13
#define MISO 12
#define CS 15
#define SCLK 14

and this:

constexpr lmic_pinmap lmic_pins = {
    .nss = 15,
    .prepare_antenna_tx = nullptr,
    .rst = LMIC_UNUSED_PIN,
    .dio = {5, 4},
};

all work 100% before.. with same config and same ESP32 pico custom board

Heltec wireless stick: TTN Sees the device's packet, but device is stuck in RX timeout

Hi, im currently having an issue where the device is being seen by the TTN network and is showing up as seen, but the logs constantly show this

66216 Chip version : 252
66274 Init Join loop : avail=66269 txend=4294777017
EventType::JOINING
66292 Ready for uplink
66319 Time on air : 61 ms
67668 Config power to 16 on PA_BOOST
70142 TXMODE, freq=868100000, len=23, SF=7, BW=125, CR=4/5
74037 Not using interupt trigger 0
76382 End TX  74036
77749 Rx delay : 4873 ms
378654 RXMODE_SINGLE, freq=868100000, SF=7, BW=125, CR=4/5, IH=2
394995 Not using interupt trigger 0
395002 RX timeout
395008 End RX - Start RX : 261792 us 
395016 Rx delay : 5885 ms
441842 RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=2
472583 Not using interupt trigger 0
472589 RX timeout
472595 End RX - Start RX : 491424 us 
472603 Next available : 472602 , Choosen 643078
473602 Uplink delayed until 643078
642956 Ready for uplink
642965 Time on air : 61 ms
642979 Config power to 16 on PA_BOOST
642996 TXMODE, freq=868300000, len=23, SF=7, BW=125, CR=4/5
646865 Not using interupt trigger 0
646967 End TX  646863
648462 Rx delay : 4873 ms
951468 RXMODE_SINGLE, freq=868300000, SF=7, BW=125, CR=4/5, IH=23
967811 Not using interupt trigger 0
967816 RX timeout
967823 End RX - Start RX : 261616 us 
967829 Rx delay : 5885 ms
1014717 RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=23
1045456 Not using interupt trigger 0
1045462 RX timeout

Here is the pin map

const lmic_pinmap lmic_pins = {
    .nss = 18,
    .prepare_antenna_tx = nullptr,
    .rst = 14,
    .dio = {DIO0, DIO1}
};

and here is the code i am using to init:

void ttnHandling(void * param){
    SPI.begin(SCK,MISO,MOSI,lmic_pins.nss);
    os_init();
    LMIC.init();
    LMIC.reset();
    LMIC.setEventCallBack(onEvent);
    SetupLmicKey<appEui, devEui, appKey>::setup(LMIC);
    LMIC.setClockError(MAX_CLOCK_ERROR * 3 / 100);
    //LMIC.setAntennaPowerAdjustment(-14);

    LMIC.startJoining();

    while(true){
        OsDeltaTime to_wait = OSS.runloopOnce();
        int towait = to_wait.to_ms();
        if (to_wait > OsDeltaTime(0)){
            vTaskDelay(portTICK_PERIOD_MS/towait);
        }
        
        //Give other tasks a chance to run on the processor
    }
    
}

ESP8266 support

Hi @ngraziano, thanks for sharing the library.

I'm wondering if you could do it compatible with ESP8266. As far as I've checked, there's an RTCMemory library compatible that would help to make it possible... I'm using an Wemos D1 mini + RFM95W & would like to use this 'variant' version in case.

I'm looking forward to hearing from you soon. Many thanks in advance.

ABP not building correctly

Error while building your example with ABP:
In file included from src/lmic/lmic.eu868.h:18, from src/lmic.h:2, from src/certificationprotocol.h:4, from src/certificationprotocol.cpp:2: src/lmic/channelList.h: In constructor 'constexpr ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::ChannelList()': src/lmic/channelList.h:73:65: warning: fold-expressions only available with -std=c++17 or -std=gnu++17 (configure(chnl++, defaultChannelFreq, defaultChannelDrMap),...); ^~~ src/lmic/channelList.h:74:3: error: 'constexpr' constructor does not have empty body } ^ src/lmic/channelList.h: In member function 'constexpr void ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::disable(uint8_t) const': src/lmic/channelList.h:76:73: error: assignment of read-only location '((const ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>*)this)->ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::channelMap' constexpr void disable(uint8_t channel) { channelMap &= ~(1 << channel); } ^ src/lmic/channelList.h: In member function 'constexpr void ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::enable(uint8_t) const': src/lmic/channelList.h:80:34: error: assignment of read-only location '((const ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>*)this)->ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::channelMap' channelMap |= (1 << channel); ^ src/lmic/channelList.h: In member function 'constexpr void ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::configure(uint8_t, uint32_t, uint16_t) const': src/lmic/channelList.h:100:24: error: assignment of read-only location '((const ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>*)this)->ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::channelMap' channelMap |= 1 << channel; ^~~~~~~ *** [.pio\build\esp32dev\src\certificationprotocol.cpp.o] Error 1 In file included from src/lmic/lmic.eu433.h:17, from src/lmic/lmic.eu433.cpp:13: src/lmic/channelList.h: In constructor 'constexpr ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::ChannelList()': src/lmic/channelList.h:73:65: warning: fold-expressions only available with -std=c++17 or -std=gnu++17 (configure(chnl++, defaultChannelFreq, defaultChannelDrMap),...); ^~~ src/lmic/channelList.h:74:3: error: 'constexpr' constructor does not have empty body } ^ src/lmic/channelList.h: In member function 'constexpr void ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::disable(uint8_t) const': src/lmic/channelList.h:76:73: error: assignment of read-only location '((const ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>*)this)->ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::channelMap' constexpr void disable(uint8_t channel) { channelMap &= ~(1 << channel); } ^ src/lmic/channelList.h: In member function 'constexpr void ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::enable(uint8_t) const': src/lmic/channelList.h:80:34: error: assignment of read-only location '((const ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>*)this)->ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::channelMap' channelMap |= (1 << channel); ^ src/lmic/channelList.h: In member function 'constexpr void ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::configure(uint8_t, uint32_t, uint16_t) const': src/lmic/channelList.h:100:24: error: assignment of read-only location '((const ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>*)this)->ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::channelMap' channelMap |= 1 << channel; ^~~~~~~ src/lmic/channelList.h: In instantiation of 'void ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::configure(uint8_t, uint32_t, uint16_t) const [with BandsType = BandSingle<100>; short unsigned int defaultChannelDrMap = 63; unsigned int ...defaultChannelFreq = {433175000, 433375000, 433575000}; uint8_t = unsigned char; uint32_t = unsigned int; uint16_t = short unsigned int]': src/lmic/channelList.h:73:6: required from 'ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::ChannelList() [with BandsType = BandSingle<100>; short unsigned int defaultChannelDrMap = 63; unsigned int ...defaultChannelFreq = {433175000, 433375000, 433575000}]' src/lmic/lmicdynamicchannel.h:310:61: required from 'DYNAMIC_CHANNEL::DynamicRegionalChannelParams<ChannelListType, MaxEIRP, MaxJoinDR, MinJoinDR, dr_table, MaxDr, default_Freq_RX2, default_rps_RX2, maxPowerIndex, limitRX1DrOffset, minFrequency, maxFrequency>::DynamicRegionalChannelParams(LmicRand&) [with ChannelListType = ChannelList<BandSingle<100>, 63, 433175000, 433375000, 433575000>; signed char MaxEIRP = 12; unsigned char MaxJoinDR = 5; unsigned char MinJoinDR = 0; const uint8_t* dr_table = (& EU433::constant_table__DR2RPS_CRC); unsigned char MaxDr = 7; unsigned int default_Freq_RX2 = 434665000; unsigned char default_rps_RX2 = 134; unsigned char maxPowerIndex = 5; unsigned char limitRX1DrOffset = 6; unsigned int minFrequency = 433050000; unsigned int maxFrequency = 434665000]' src/lmic/lmic.eu433.cpp:24:83: required from here src/lmic/channelList.h:99:23: error: passing 'const value_type' {aka 'const ChannelDetail'} as 'this' argument discards qualifiers [-fpermissive] channels[channel] = ChannelDetail{newfreq, drmap}; src/lmic/channelList.h:11:8: note: in call to 'ChannelDetail& ChannelDetail::operator=(ChannelDetail&&)' struct ChannelDetail { ^~~~~~~~~~~~~ src/lmic/channelList.h: In instantiation of 'void ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::updateAvailabitility(uint8_t, OsTime, OsDeltaTime) const [with BandsType = BandSingle<100>; short unsigned int defaultChannelDrMap = 63; unsigned int ...defaultChannelFreq = {433175000, 433375000, 433575000}; uint8_t = unsigned char]': src/lmic/lmicdynamicchannel.h:134:5: required from 'void DYNAMIC_CHANNEL::DynamicRegionalChannelParams<ChannelListType, MaxEIRP, MaxJoinDR, MinJoinDR, dr_table, MaxDr, default_Freq_RX2, default_rps_RX2, maxPowerIndex, limitRX1DrOffset, minFrequency, maxFrequency>::updateTxTimes(OsDeltaTime) [with ChannelListType = ChannelList<BandSingle<100>, 63, 433175000, 433375000, 433575000>; signed char MaxEIRP = 12; unsigned char MaxJoinDR = 5; unsigned char MinJoinDR = 0; const uint8_t* dr_table = (& EU433::constant_table__DR2RPS_CRC); unsigned char MaxDr = 7; unsigned int default_Freq_RX2 = 434665000; unsigned char default_rps_RX2 = 134; unsigned char maxPowerIndex = 5; unsigned char limitRX1DrOffset = 6; unsigned int minFrequency = 433050000; unsigned int maxFrequency = 434665000]' src/lmic/lmicdynamicchannel.h:133:8: required from here src/lmic/channelList.h:106:5: error: passing 'const BandSingle<100>' as 'this' argument discards qualifiers [-fpermissive] bands.updateBandAvailability(getBand(channel), txbeg, airtime); ^~~~~ In file included from src/lmic/channelList.h:4, from src/lmic/lmic.eu433.h:17, from src/lmic/lmic.eu433.cpp:13: src/lmic/bands.h:31:8: note: in call to 'void BandSingle<dutyCycle>::updateBandAvailability(uint8_t, OsTime, OsDeltaTime) [with short unsigned int dutyCycle = 100; uint8_t = unsigned char]' void updateBandAvailability(uint8_t, OsTime lastusage, ^~~~~~~~~~~~~~~~~~~~~~ In file included from src/lmic/lmic.eu433.h:17, from src/lmic/lmic.eu433.cpp:13: src/lmic/channelList.h: In instantiation of 'void ChannelList<BandsType, defaultChannelDrMap, defaultChannelFreq>::setCheckDutyCycle(bool) const [with BandsType = BandSingle<100>; short unsigned int defaultChannelDrMap = 63; unsigned int ...defaultChannelFreq = {433175000, 433375000, 433575000}]': src/lmic/lmicdynamicchannel.h:314:5: required from 'void DYNAMIC_CHANNEL::DynamicRegionalChannelParams<ChannelListType, MaxEIRP, MaxJoinDR, MinJoinDR, dr_table, MaxDr, default_Freq_RX2, default_rps_RX2, maxPowerIndex, limitRX1DrOffset, minFrequency, maxFrequency>::setRegionalDutyCycleVerification(bool) [with ChannelListType = ChannelList<BandSingle<100>, 63, 433175000, 433375000, 433575000>; signed char MaxEIRP = 12; unsigned char MaxJoinDR = 5; unsigned char MinJoinDR = 0; const uint8_t* dr_table = (& EU433::constant_table__DR2RPS_CRC); unsigned char MaxDr = 7; unsigned int default_Freq_RX2 = 434665000; unsigned char default_rps_RX2 = 134; unsigned char maxPowerIndex = 5; unsigned char limitRX1DrOffset = 6; unsigned int minFrequency = 433050000; unsigned int maxFrequency = 434665000]' src/lmic/lmicdynamicchannel.h:313:8: required from here src/lmic/channelList.h:125:65: error: assignment of member 'ChannelList<BandSingle<100>, 63, 433175000, 433375000, 433575000>::checkDutyCycle' in read-only object constexpr void setCheckDutyCycle(bool check) { checkDutyCycle = check; } ~~~~~~~~~~~~~~~^~~~~~~ *** [.pio\build\esp32dev\src\lmic\lmic.eu433.cpp.o] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.