stm32duino / STM32LoRaWAN

Arduino library to support LoRaWAN communication using the STM32WL series.
https://stm32duino.github.io/STM32LoRaWAN/
Other
34 stars 7 forks source link

Assync OTA #14

Closed tcpipchip closed 1 year ago

tcpipchip commented 1 year ago

Hi,

the basic.ino works cool, always JOIN to network...

But the simpleAsync.ino always fail to join.

Did you tested?

I am using on STM32WL55JC

fpistm commented 1 year ago

Hi, it was testes by @matthijskooijman and know to work.

tcpipchip commented 1 year ago

wow And with the most updated version ?

fpistm commented 1 year ago

AFAIK yes.

tcpipchip commented 1 year ago

:(

fpistm commented 1 year ago

Small update, I'm waiting LoRa network access, I will test when available.

tcpipchip commented 1 year ago

thank you! Can i test again ?

tcpipchip commented 1 year ago

Basic still works (JOIN) Assync not works (JOIN FAIL)

fpistm commented 1 year ago

That is normal as no changes done on the lib. I've just warn you that I will test when I can have access to LoRa network. πŸ˜‰

tcpipchip commented 1 year ago

☺️

fpistm commented 1 year ago

Hi @tcpipchip I've now access to LoRa network and tested the SimpleAsync example with Nucleo-WL55JC1 and it works as expected. I'm able to join and send packet while the LED is blinking.

tcpipchip commented 1 year ago

thank to your feedback. Here still not work...never join :(

fpistm commented 1 year ago

Well you should try to debug. Or at least enable the core log debug to see if you get some useful info. Uou used a nucleo? The JC1?

tcpipchip commented 1 year ago

how to enable the debug ? I am using WISOL LSM110A. We are representative in South America.

fpistm commented 1 year ago

Ah OK. Which variant you used? Because I guess clock config, RFswitch pins definition .... needs to be customised

fpistm commented 1 year ago

To get the core logs, select in the menu debug and trace.

tcpipchip commented 1 year ago

image

tcpipchip commented 1 year ago

where is the menu debug trace ? image

fpistm commented 1 year ago

Have you a link to the board.

Select "Core logs Enabled" in the "Debug symbols and core logs" menu where you have all options for the board...

image

fpistm commented 1 year ago

We are representative in South America.

Why would you mean by this?

Seems this repo hold support for your board: https://github.com/Support-SJI/LSM110A

So looking at the project above, you will need to create your own variant or at least configure properly RF Switch and RBI_CONF. https://github.com/Support-SJI/LSM110A/blob/f20ba0fa4edeb9a54b144f254fadd0cfc4ac27b0/Projects/NUCLEO-WL55JC/Applications/LoRaWAN_SigFox/LSM1x0A/Core/Inc/radio_board_if.h#L62

So I close this issue as it is not linked to an issue with the library but wrong board config. Please next time be more precise on the hardware you used.

tcpipchip commented 1 year ago

backing to tests on LSM110A

tcpipchip commented 1 year ago

Now all working Running 5 hours without problems I had to do the main change on radio_board_if.c

// Supported TX modes (LP/HP or both)
#if !defined(LORAWAN_TX_CONFIG)
  #define LORAWAN_TX_CONFIG RBI_CONF_RFO_HP
#endif

image image image

and too

void setup()
{
  pinMode(PA8, OUTPUT);
  Serial.begin(115200);
  Serial.println("Start");
  modem.begin(AU915);

  // Configure join method by (un)commenting the right method
  // calls, and fill in credentials in those method calls.
  modem.setAppEui("00000000000000XX");
  modem.setAppKey("FFXX138B40180AXX5D6846E0A0146954");
  modem.setDevEui("00XXEXX5051XX8XX");
  while(1)
  {
    //modem.setDevAddr("00000000");
    //modem.setNwkSKey("00000000000000000000000000000000");
    //modem.setAppSKey("00000000000000000000000000000000");
    //modem.joinABPAsync();
    modem.joinOTAAAsync();  
    wait_for_idle();
    if (modem.connected()) {
      Serial.println("Joined");
      return;
    } else {
      Serial.println("Join failed");
      //while (true) /* infinite loop */;
      delay(10000);
      }
  }
}

See the blog https://lom204-cli-wisol.blogspot.com/2023/05/o-objetivo-deste-blog-e-demonstrar-como_26.html

tcpipchip commented 1 year ago

still working perfectly 48Hrs!

tcpipchip commented 1 year ago

Plans to offer p2p ?

fpistm commented 1 year ago

Plans to offer p2p ?

What do you mean by p2p? Connect 2 boards thanks LoRa? If yes then you can use: https://github.com/jgromes/RadioLib @matthijskooijman add the support of STM32WL with some examples: https://github.com/jgromes/RadioLib/pull/649

tcpipchip commented 1 year ago

Thank you so much!!!!!!!!!!!!!!!!!!!!!!!

tcpipchip commented 1 year ago

i did a blog https://lom204-cli-wisol.blogspot.com/2023/05/o-objetivo-deste-blog-e-demonstrar-como_30.html

tcpipchip commented 11 months ago

ScheduleAsync now working here! image

tcpipchip commented 11 months ago

do you why JOIN always fail to

String setAppEuiString;
String setAppKeyString;
String setDevEuiString;

  setAppEuiString="0000000000000099";
  setAppKeyString="FF9F138B40180AA45D6846E0A0146954";
  setDevEuiString="XX80E115051XX80A";
  modem.setAppEui(setAppEuiString); //@
  modem.setAppKey(setAppKeyString); //#
  modem.setDevEui(setDevEuiString); //$

and always work to

  modem.setAppEui("0000000000000099"); //@
  modem.setAppKey("FF9F138B40180AA45D6846E0A0146954"); //#
  modem.setDevEui("0080E115051FD80A"); //$
tcpipchip commented 11 months ago

looks that is a problem here

bool setAppEui(String value) { return setDevEui(value.c_str()); }

Should be

bool setAppEui(String value) { return setAppEui(value.c_str()); }

tcpipchip commented 11 months ago

Yes, that was bug! :) I modified and now is WORKING :)

fpistm commented 11 months ago

Hi @tcpipchip please submit an issue or a PR in order to track and fix this. πŸ˜‰