cancel
Showing results for 
Search instead for 
Did you mean: 

LocalNetwork Concentrator-Sensor Connection issue

JeffSm
Associate II

Hi, I tried the LocalNetwork demonstration in which one NUCLEO board acts as a concentrator and other NUCLEO boards act as sensor unit. Its available in STM32Cube_FW_WL_V1.0.0/Projects/NUCLEO-WL55JC/Demonstrations/LocalNetwork

I loaded and ran one NUCLEO board with LocalNetwork_Concentrator and one NUCLEO board with LocalNetwork_Sensor code. But my sensor NUCLEO board is not able to receive the beacon sent by the concentrator. I am not sure why this is happening. I have also attached the terminal image. Can you please guide why is the sensor not receiving the beacon?

0693W000007DfPBQA0.png

1 ACCEPTED SOLUTION

Accepted Solutions
YBOUV.1
Senior

Hi,

there seems to be an issue with the vsnprint and special formating with 'hh' or 'h' with gcc

They must be removed.

for example (in demo_report.c):

 APP_PPRINTF("AT+RCV=0x%08x,0x%02hhx,%hhu:%hhu,%hi,%hhi,",

      Header->eui, Header->packet_cnt, Header->version_major, Header->version_minor, Rssi, Snr);

should be replace by

 APP_PPRINTF("AT+RCV=0x%08x,0x%02x,%u:%u,%i,%i,",

      Header->eui, Header->packet_cnt, Header->version_major, Header->version_minor, Rssi, Snr);

sorry for the inconvenience

Let me know

View solution in original post

12 REPLIES 12
YBOUV.1
Senior

Hello,

i tried the demo compiling LocalNetwork_Sensor and LocalNetwork_Concentrator with Keil 5.30.

I can not reproduce your issue.

Can you please detail the board version you are using? the IDE/compiler version? anything that could help us to reproduce.

On top of this, i'm wondering why you have the strange printing on the log, e.g. 0x0hx,hu,hu?

JeffSm
Associate II

Hi, I compiled the concentrator and sensor code using STM32CubeIDE version = 1.5.1

The issue I am facing with the board is, after giving the concentrator board AT+Beacon_ON command, the concentrator starts sending beacon and green LED starts blinking. Similarly on sensor board, LED 3 blinks rapidly with red color. As soon as the sensor board receives the beacon, the concentrator LED stops (i.e. it stops sending beacon). I guess the issue is with the concentrator somehow, I am not sure why does it stops sending beacon after finding a sensor node. I have tried to upload the concentrator code on two different boards, the same issue exists with both.

I tried it using a new NUCLEO board without compiling it with STM32CubeIDE, it works well with in this case, I have attached the image below. I am able to establish a connection between concentrator and sensor node in this case. Not sure why the issue is occurring after compiling the NUCLEO board with STM32CubeIDE.0693W000007DnenQAC.png

YBOUV.1
Senior

Can you please try compile the concentrator in release mode Cube IDE ?

thank you

JeffSm
Associate II

CubeIDE version = 1.0.0 ?

YBOUV.1
Senior

in Cube IDE, there is 2 build configuration: the 'debug' and the 'release'

Could you please compile the concentrator project in release mode and try?

thank you

JeffSm
Associate II

Thanks. I am able to connect the sensor now. But still one issue, in AT+RCV, the temperature data is correct, rest is not correct. Can you please tell why is this issue occurring?0693W000007DqK2QAK.png

YBOUV.1
Senior

Hi,

there seems to be an issue with the vsnprint and special formating with 'hh' or 'h' with gcc

They must be removed.

for example (in demo_report.c):

 APP_PPRINTF("AT+RCV=0x%08x,0x%02hhx,%hhu:%hhu,%hi,%hhi,",

      Header->eui, Header->packet_cnt, Header->version_major, Header->version_minor, Rssi, Snr);

should be replace by

 APP_PPRINTF("AT+RCV=0x%08x,0x%02x,%u:%u,%i,%i,",

      Header->eui, Header->packet_cnt, Header->version_major, Header->version_minor, Rssi, Snr);

sorry for the inconvenience

Let me know

JeffSm
Associate II

Thanks for the help. It worked!

Hi,

In SubGHz_Phy_PingPong and LoRaWAN_AT_Slave applications, there is a way to change the preamble length by #define LORA_PREAMBLE_LENGTH. How can we change the preamble length in LoRaWAN_End_Node application?