Skip to main content
JeffSm
Associate II
February 2, 2021
Solved

LocalNetwork Concentrator-Sensor Connection issue

  • February 2, 2021
  • 12 replies
  • 5987 views

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

This topic has been closed for replies.
Best answer by YBOUV.1

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

12 replies

YBOUV.1
ST Employee
February 3, 2021

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
JeffSmAuthor
Associate II
February 3, 2021

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
ST Employee
February 3, 2021

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

thank you

JeffSm
JeffSmAuthor
Associate II
February 3, 2021

CubeIDE version = 1.0.0 ?

YBOUV.1
ST Employee
February 3, 2021

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
JeffSmAuthor
Associate II
February 3, 2021

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
YBOUV.1Best answer
ST Employee
February 4, 2021

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
JeffSmAuthor
Associate II
February 8, 2021

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?

YBOUV.1
ST Employee
February 9, 2021

Hi,

The LoRaWAN_End_Node application is LoRaWan compliant project application.

Therefore, it follows the LoraWan Alliance specification in particular the Regional Parameter specification.

The Preamble format is defined in this document and hence its length is frozen.

For example for Europe it is defined as:

and is defined the same way for all regions

hope it answers your question.

JeffSm
JeffSmAuthor
Associate II
February 4, 2021

Thanks for the help. It worked!

YBOUV.1
ST Employee
February 11, 2021

Hi,

you can download the documentation from https://lora-alliance.org/