Home › Forum › Le librerie ospitate nel sito › EBYTE E220 dispositivi LoRa UART LLCC68 › E220 “Save mode returned not recognized!”
- Questo topic ha 22 risposte, 2 partecipanti ed è stato aggiornato l'ultima volta 1 anno, 1 mese fa da
Renzo Mischianti.
-
AutorePost
-
-
29 Giugno 2022 alle 16:07 #21525
fabioooPartecipanteHi Renzo,
I just replaced the E32 modem with the new E220 ones but I’m getting some problems, in serial I see this:
Avvio ModemTX Init TX OK Success 1 Save mode returned not recognized! 11 Avvio ModemRX Init RX OK -----------------MODEM TX----------------------- ---------------------------------------- HEAD : C1 0 8 AddH : 0 AddL : 65 Chan : 1 -> 851MHz SpeedParityBit : 0 -> 8N1 (Default) SpeedUARTDatte : 11 -> 9600bps (default) SpeedAirDataRate : 10 -> 2.4kbps (default) OptionSubPacketSett: 0 -> 200bytes (default) OptionTranPower : 0 -> 22dBm (Default) OptionRSSIAmbientNo: 0 -> Disabled (default) TransModeWORPeriod : 11 -> 2000ms (default) TransModeEnableLBT : 0 -> Disabled (default) TransModeEnableRSSI: 1 -> Enabled TransModeFixedTrans: 1 -> Fixed transmission (first three bytes can be used as high/low address and channel)
I have created two object:
Serial.println("Avvio ModemTX"); serialTX = new SoftwareSerial(6, 7); //(RX,TX) <= TX, RX MODEM e220ttlTX = new LoRa_E220(serialTX, 5, 16, 15); // AUX, M0 and M1 while (!e220ttlTX->begin()) { Serial.println("attendo init modem TX"); } Serial.println("Init TX OK");
And to configure it:
initModemTX(); delay(200); e220ttlTX->setMode(MODE_3_CONFIGURATION); delay(200); ResponseStructContainer c = e220ttlTX->getConfiguration(); Configuration configuration = *(Configuration *)c.data; Serial.println(c.status.getResponseDescription()); Serial.println(c.status.code); configuration.ADDL = 101; configuration.ADDH = 0; // MAX 0xFF=255 configuration.CHAN = 1; // 0x19; configuration.TRANSMISSION_MODE.fixedTransmission = FT_FIXED_TRANSMISSION; configuration.OPTION.transmissionPower = POWER_22; configuration.TRANSMISSION_MODE.WORPeriod = WOR_2000_011; configuration.SPED.airDataRate = AIR_DATA_RATE_010_24; configuration.SPED.uartBaudRate = UART_BPS_9600; configuration.SPED.uartParity = MODE_00_8N1; ResponseStatus rs = e220ttlTX->setConfiguration(configuration, WRITE_CFG_PWR_DWN_SAVE); Serial.println(rs.getResponseDescription()); Serial.println(rs.code); delay(200); e220ttlTX->setMode(MODE_1_WOR_TRANSMITTER);
-
29 Giugno 2022 alle 17:27 #21527
fabioooPartecipanteI have enabled debugging mode:
Avvio ModemTX RX MIC ---> -1 TX MIC ---> -1 AUX ---> 5 M0 ---> 16 M1 ---> 15 Init AUX pin! Init M0 pin! Init M1 pin! Begin ex Begin Software Serial Begin MODE NORMAL! AUX HIGH! Complete! Init TX OK MODE SLEEP CONFIG! AUX HIGH! Complete! MODE SLEEP CONFIG! AUX HIGH! Complete! 3 Available buffer: 11 structure size: 11 AUX HIGH! Complete! ---------------------------------------- HEAD : C1 0 8 AddH : 0 AddL : 65 Chan : 1 -> 411MHz SpeedParityBit : 0 -> 8N1 (Default) SpeedUARTDatte : 11 -> 9600bps (default) SpeedAirDataRate : 10 -> 2.4kbps (default) OptionSubPacketSett: 0 -> 200bytes (default) OptionTranPower : 0 -> 22dBm (Default) OptionRSSIAmbientNo: 0 -> Disabled (default) TransModeWORPeriod : 11 -> 2000ms (default) TransModeEnableLBT : 0 -> Disabled (default) TransModeEnableRSSI: 1 -> Enabled TransModeFixedTrans: 1 -> Fixed transmission (first three bytes can be used as high/low address and channel) ---------------------------------------- MODE SLEEP CONFIG! AUX HIGH! Complete! Status response Modem TX: Success Code response Modem TX: 1 MODE SLEEP CONFIG! AUX HIGH! Complete! AUX HIGH! Complete! Clear buffer...ok! Available buffer: 0 structure size: 11 ---------------------------------------- HEAD : C0 0 8 AddH : 0 AddL : 65 Chan : 1 -> 411MHz SpeedParityBit : 0 -> 8N1 (Default) SpeedUARTDatte : 11 -> 9600bps (default) SpeedAirDataRate : 10 -> 2.4kbps (default) OptionSubPacketSett: 0 -> 200bytes (default) OptionTranPower : 0 -> 22dBm (Default) OptionRSSIAmbientNo: 0 -> Disabled (default) TransModeWORPeriod : 11 -> 2000ms (default) TransModeEnableLBT : 0 -> Disabled (default) TransModeEnableRSSI: 1 -> Enabled TransModeFixedTrans: 1 -> Fixed transmission (first three bytes can be used as high/low address and channel) ---------------------------------------- MODE SLEEP CONFIG! AUX HIGH! Complete! Save mode returned not recognized! 11 MODE WOR! AUX HIGH! Complete! Avvio ModemRX RX MIC ---> -1 TX MIC ---> -1 AUX ---> 10 M0 ---> 14 M1 ---> 13 Init AUX pin! Init M0 pin! Init M1 pin! Begin ex Begin Software Serial Begin MODE NORMAL! AUX HIGH! Complete! Init RX OK MODE SLEEP CONFIG! AUX HIGH! Complete! 3 Available buffer: 0 structure size: 11 ---------------------------------------- HEAD : FF FF FF AddH : FF AddL : FF Chan : 255 -> 665MHz SpeedParityBit : 11 -> 8N1 (equal to 00 SpeedUARTDatte : 111 -> 115200bps SpeedAirDataRate : 111 -> 62.5kbps OptionSubPacketSett: 11 -> 32bytes OptionTranPower : 11 -> 10dBm OptionRSSIAmbientNo: 1 -> Enabled TransModeWORPeriod : 111 -> 4000ms TransModeEnableLBT : 1 -> Enabled TransModeEnableRSSI: 1 -> Enabled TransModeFixedTrans: 1 -> Fixed transmission (first three bytes can be used as high/low address and channel) ---------------------------------------- MODE NORMAL! AUX HIGH! Complete! MODE SLEEP CONFIG! AUX HIGH! Complete! AUX HIGH! Complete! Clear buffer...ok! Available buffer: 0 structure size: 11 ---------------------------------------- HEAD : C0 0 8 AddH : 0 AddL : 64 Chan : 1 -> 411MHz SpeedParityBit : 0 -> 8N1 (Default) SpeedUARTDatte : 11 -> 9600bps (default) SpeedAirDataRate : 10 -> 2.4kbps (default) OptionSubPacketSett: 11 -> 32bytes OptionTranPower : 11 -> 10dBm OptionRSSIAmbientNo: 1 -> Enabled TransModeWORPeriod : 111 -> 4000ms TransModeEnableLBT : 1 -> Enabled TransModeEnableRSSI: 1 -> Enabled TransModeFixedTrans: 1 -> Fixed transmission (first three bytes can be used as high/low address and channel) ---------------------------------------- MODE NORMAL! AUX HIGH! Complete! MODE NORMAL! AUX HIGH! Complete! -----------------MODEM TX----------------------- MODE SLEEP CONFIG! AUX HIGH! Complete! 3 Available buffer: 11 structure size: 11 AUX HIGH! Complete! ---------------------------------------- HEAD : C1 0 8 AddH : 0 AddL : 65 Chan : 1 -> 411MHz SpeedParityBit : 0 -> 8N1 (Default) SpeedUARTDatte : 11 -> 9600bps (default) SpeedAirDataRate : 10 -> 2.4kbps (default) OptionSubPacketSett: 0 -> 200bytes (default) OptionTranPower : 0 -> 22dBm (Default) OptionRSSIAmbientNo: 0 -> Disabled (default) TransModeWORPeriod : 11 -> 2000ms (default) TransModeEnableLBT : 0 -> Disabled (default) TransModeEnableRSSI: 1 -> Enabled TransModeFixedTrans: 1 -> Fixed transmission (first three bytes can be used as high/low address and channel) ---------------------------------------- MODE WOR! AUX HIGH! Complete! ---------------------------------------- HEAD : C1 0 8 AddH : 0 AddL : 65 Chan : 1 -> 851MHz SpeedParityBit : 0 -> 8N1 (Default) SpeedUARTDatte : 11 -> 9600bps (default) SpeedAirDataRate : 10 -> 2.4kbps (default) OptionSubPacketSett: 0 -> 200bytes (default) OptionTranPower : 0 -> 22dBm (Default) OptionRSSIAmbientNo: 0 -> Disabled (default) TransModeWORPeriod : 11 -> 2000ms (default) TransModeEnableLBT : 0 -> Disabled (default) TransModeEnableRSSI: 1 -> Enabled TransModeFixedTrans: 1 -> Fixed transmission (first three bytes can be used as high/low address and channel) ---------------------------------------- -----------------MODEM RX----------------------- MODE SLEEP CONFIG! AUX HIGH! Complete! 3 Available buffer: 0 structure size: 11 ---------------------------------------- HEAD : 46 69 78 AddH : 65 AddL : 64 Chan : 114 -> 524MHz SpeedParityBit : 0 -> 8N1 (Default) SpeedUARTDatte : 1 -> 2400bps SpeedAirDataRate : 0 -> 2.4kbps OptionSubPacketSett: 1 -> 128bytes OptionTranPower : 0 -> 22dBm (Default) OptionRSSIAmbientNo: 1 -> Enabled TransModeWORPeriod : 1 -> 1000ms TransModeEnableLBT : 0 -> Disabled (default) TransModeEnableRSSI: 0 -> Disabled (default) TransModeFixedTrans: 1 -> Fixed transmission (first three bytes can be used as high/low address and channel) ---------------------------------------- MODE NORMAL! AUX HIGH! Complete! ---------------------------------------- HEAD : 46 69 78 AddH : 65 AddL : 64 Chan : 114 -> 964MHz SpeedParityBit : 0 -> 8N1 (Default) SpeedUARTDatte : 1 -> 2400bps SpeedAirDataRate : 0 -> 2.4kbps OptionSubPacketSett: 1 -> 128bytes OptionTranPower : 0 -> 22dBm (Default) OptionRSSIAmbientNo: 1 -> Enabled TransModeWORPeriod : 1 -> 1000ms TransModeEnableLBT : 0 -> Disabled (default) TransModeEnableRSSI: 0 -> Disabled (default) TransModeFixedTrans: 1 -> Fixed transmission (first three bytes can be used as high/low address and channel) ----------------------------------------
-
30 Giugno 2022 alle 08:04 #21529
Renzo MischiantiAmministratore del forumHi Fabio,
as you can see at these linesAvailable buffer: 0 structure size: 11 ---------------------------------------- HEAD : C0 0 8
It seems that sometimes the device does not give a response, try to add more amperage to the device.
Bye Renzo
-
30 Giugno 2022 alle 16:52 #21531
fabioooPartecipanteIt’s the same circuit I used for the E32, I just replaced the modem.
I tried putting the voltmeter tips on M0 to test MODE_3_SLEEP but I noticed it never goes to zero.In addition, I noticed that the RX and TX pins are considered -1 !!
I’ve done other tests.
I have added two lines in your function in the library:LoRa_E220::LoRa_E220(SoftwareSerial *serial, byte auxPin, byte m0Pin, byte m1Pin, UART_BPS_RATE bpsRate) { DEBUG_PRINT("TX pin from call: "); DEBUG_PRINTLN(txE220pin); this->txE220pin = txE220pin; this->rxE220pin = rxE220pin; this->auxPin = auxPin; this->m0Pin = m0Pin; this->m1Pin = m1Pin; this->ss = serial; this->hs = NULL; this->bpsRate = bpsRate; }
And I get:
���Avvio ModemTX TX pin from call: -1 RX MIC ---> -1 TX MIC ---> -1 AUX ---> 5 M0 ---> 16 M1 ---> 15 Init AUX pin! Init M0 pin! Init M1 pin! Begin ex Begin Software Serial Begin MODE NORMAL! AUX HIGH! Complete! Init TX OK Setto in SLEEP il modem: MODE SLEEP CONFIG! AUX HIGH! Complete!
-
-
4 Luglio 2022 alle 08:00 #21560
Renzo MischiantiAmministratore del forumHi Fabio,
you must try to do a simple circuit on a breadboard and check your devices.
But If I remember you were forced to make a particular circuit due to resistance problems on your devices.Try a simple check and give feedback.
Bye Renzo -
12 Luglio 2022 alle 12:18 #21830
Renzo MischiantiAmministratore del forumHi Fabioo,
but SoftwareSerial is active by default or I’m wrong?
Bye Renzo -
6 Agosto 2022 alle 15:00 #22172
fabioooPartecipanteAt the end on the gateway (two modems one for TX and one for RX) I use SoftwareSerial for Transmitter modem and HardwareSerial on Receiver so I can use the Buffer.
But I have a strange problem, sometimes it happens that I no longer receive messages.
I have to put the E220 modem on a TTL / USB converter and with the eByte program do a “Reset” by clicking on the “Param Reset” button then put it back on the PCB and it works ….Do you know why? Is there some sort of reset in your library? Because when it happens it’s boring, I have to unsolder the modem, reset it and then resolder it.
But if this happens in production, I would have to go to the field and it’s really hard to do the work on site.Attachments:
You must be logged in to view attached files.-
6 Agosto 2022 alle 22:24 #22175
Renzo MischiantiAmministratore del forumHi Fabioo,
It’s very strange behavior. Did you try to change the device?Do you change configuration on the fly in your program? the voltage of the power supply is stable?
Bye Renzo
-
6 Agosto 2022 alle 22:55 #22194
fabioooPartecipanteYou mean if when I do setMode then I don’t put any delay?
-
6 Agosto 2022 alle 23:02 #22195
Renzo MischiantiAmministratore del forumNo no, if you use setConfiguration in the live code.
-
6 Agosto 2022 alle 23:23 #22197
fabioooPartecipanteOh ok.
Yes I have created two function:void CommunicationAbiot::setReceivingMode() { ResponseStructContainer c = e220ttl->getConfiguration(); Configuration configuration = *(Configuration *)c.data; configuration.ADDL = ID_NODE; configuration.ADDH = 0x0; // MAX 0xFF=255 configuration.CHAN = CHANNEL; configuration.SPED.uartBaudRate = UART_BPS_9600; configuration.SPED.airDataRate = TX_TO_NODE_AIR_DATA_RATE; configuration.SPED.uartBaudRate = UART_BPS_9600; configuration.SPED.uartParity = MODE_00_8N1; configuration.OPTION.subPacketSetting = SPS_200_00; configuration.OPTION.RSSIAmbientNoise = RSSI_AMBIENT_NOISE_DISABLED; configuration.OPTION.transmissionPower = POWER_22; configuration.TRANSMISSION_MODE.enableRSSI = RSSI_ENABLED; configuration.TRANSMISSION_MODE.fixedTransmission = FT_FIXED_TRANSMISSION; configuration.TRANSMISSION_MODE.enableLBT = LBT_DISABLED; configuration.TRANSMISSION_MODE.WORPeriod = WOR_2000_011; // configuration.CRYPT.CRYPT_H = CRYPH_TX_TO_NODE; // configuration.CRYPT.CRYPT_L = CRYPL_TX_TO_NODE; ResponseStatus rs = e220ttl->setConfiguration(configuration, WRITE_CFG_PWR_DWN_SAVE); c.close(); e220ttl->setMode(MODE_2_WOR_RECEIVER); delay(1000); } void CommunicationAbiot::setSendingMode() { e220ttl->setMode(MODE_0_NORMAL); delay(100); ResponseStructContainer c = e220ttl->getConfiguration(); Configuration configuration = *(Configuration *)c.data; configuration.ADDL = ID_NODE; configuration.ADDH = 0x0; // MAX 0xFF=255 configuration.CHAN = CHANNEL; // 0x19; configuration.SPED.uartBaudRate = UART_BPS_9600; configuration.SPED.airDataRate = NODE_TO_RX_AIR_DATA_RATE; configuration.SPED.uartBaudRate = UART_BPS_9600; configuration.SPED.uartParity = MODE_00_8N1; configuration.OPTION.subPacketSetting = SPS_200_00; configuration.OPTION.RSSIAmbientNoise = RSSI_AMBIENT_NOISE_DISABLED; configuration.OPTION.transmissionPower = POWER_22; configuration.TRANSMISSION_MODE.enableRSSI = RSSI_ENABLED; configuration.TRANSMISSION_MODE.fixedTransmission = FT_FIXED_TRANSMISSION; configuration.TRANSMISSION_MODE.enableLBT = LBT_DISABLED; configuration.TRANSMISSION_MODE.WORPeriod = WOR_2000_011; // configuration.CRYPT.CRYPT_H = CRYPH_NODE_TO_RX; // configuration.CRYPT.CRYPT_L = CRYPL_NODE_TO_RX; ResponseStatus rs = e220ttl->setConfiguration(configuration, WRITE_CFG_PWR_DWN_SAVE); c.close(); e220ttl->setMode(MODE_0_TRANSMISSION); delay(100); }
-
-
8 Agosto 2022 alle 08:21 #22199
Renzo MischiantiAmministratore del forumIt seems all correct, did you try to change the device?
I get that behavior with a broken device.The next test is to put a new device and not save the configuration, It remains active since you reboot or change It again.
Bye Renzo
-
9 Agosto 2022 alle 20:11 #22211
fabioooPartecipanteMaybe I found: I have atmega2560 normally in sleep and when I receive a message the modem wakes me up the MCU.
I raise the message and go back to sleep for 10 seconds, then wake up and transmit.
During the 10 second sleep I do not send the modem to sleep and perhaps this is the problem, because during these 10 seconds there are other communications in the air and I see that the aux pin goes low so it receives them.
If, on the other hand, I put the modem to sleep then it no longer blocks.
I believe that if the modem sends a message to the MCU but the MCU is not responding the modem could hang.
Now I have done some short tests, I will do longer and more thorough tests.In your opinion, can this really be?
P.S.: I use SoftwareSerial not HardwareSerial -
10 Agosto 2022 alle 08:22 #22213
Renzo MischiantiAmministratore del forumHi Fabio,
but if you send a WOR message with a different address the device doesn’t wake.
If you want, call me, and we try to better understand.
Bye Renzo -
12 Agosto 2022 alle 19:36 #22271
fabioooPartecipanteOK it’s good.
Before I call you I do some more tests so I have more documentation.
One question though: why is the resetModule () function half commented in the library?-
13 Agosto 2022 alle 07:42 #22272
Renzo MischiantiAmministratore del forumIn the e220 reset procedure isn’t present.
I’m going to check if they update the documentation.
Bye Renzo
-
-
13 Agosto 2022 alle 11:35 #22280
fabioooPartecipanteIn eByte software there is a “Param Reset” and actually does somethings because when E220 freezes is only way to unlok it.
So what doing the button? 🤔 -
16 Agosto 2022 alle 08:48 #22290
Renzo MischiantiAmministratore del forumHi Fabiooo,
I recheck the documentation, no existing reset process, so I think you can try to set all parameters with configuration, but I think It isn’t the same solution.
Bye Renzo -
16 Agosto 2022 alle 12:10 #22308
fabioooPartecipanteI have wrote you on TG, please check.
Now we have see that the M0 and M1 pin was not declared… We have to do it?
Furthermore we have put in platformio.ini:build_flags= -DFREQUENCY_868
Are we wrong?
-
16 Agosto 2022 alle 12:27 #22309
Renzo MischiantiAmministratore del forumIf you don’t declare in the constructor M0 and M1 the library can’t switch in the various modes.
So you can stay only in a single mode with GND or 3.3v on the LoRa M0 M1 pins.
Bye Renzo
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.