cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with sending message longer than 4 characters & Problem with firmware update

PTyl.1
Associate

Hi,

I've got 2 I-Nucleo-LRWAN1 shields on 2 STM32 Nucleo64 F103-RB boards. I've uploaded PingPong example from : https://github.com/stm32duino/I-NUCLEO-LRWAN1 and it works but when I've tried to modify code and send longer message (for example "ABCDEFG123") i received on second board only first four characters "ABCD".

I checked modules by BridgeSerial and it works. Software version is: 2.9.

I cannot update firmware to newer version, after connection to ST-Link on STM32 Board there is info in ST-Link utility that it has Read Out Protection.

I also paste my simple code I used for testing.

Tx:

#include "LoRaRadio.h"
 
 #define SEND_PERIOD_MS 2000
 
HardwareSerial SerialLora(PC_11, PC_10);
 
uint8_t Message[] = "ABCDEFGH";
 
 //uint8_t len=0;
 
 //int timer=0;
 
 //uint8_t x=0;
 
void setup() {
 
 Serial.begin(115200);
 
 Serial.println("!! Tx !!");
 
while(!loraRadio.begin(&SerialLora)) {
 
 Serial.println("LoRa module not ready");
 
 delay(1000);
 
 }
 
Serial.println("LoRa module ready\n");
 
 }
 
 // len=sizeof(Message);
 
 // loraRadio.write(Message,len);
 
 // timer=millis();
 
 //
 
void loop() {
 
 //len=sizeof(Message);
 
 loraRadio.write(Message,9);
 
 Serial.println("Message sent : ");
 
 //Serial.println(x);
 
 delay(3000);
 
}

Rx:

#include "LoRaRadio.h"
 
HardwareSerial SerialLora(PC_11, PC_10);
 
//uint8_t x=0;
 
void setup() {
 
 // put your setup code here, to run once:
 
 Serial.begin(115200);
 
 Serial.println("!! Rx !!");
 
while(!loraRadio.begin(&SerialLora)) {
 
 Serial.println("LoRa module not ready");
 
 delay(1000);
 
 }
 
Serial.println("LoRa module ready\n");
 
 }
 
 // if(loraRadio.read(rcvData) > 0) {
 
 // Serial.println((char *) rcvData);
 
 // }
 
 //}
 
void loop() {
 
uint8_t rcvData[64];
 
// put your main code here, to run repeatedly:
 
 if(loraRadio.read(rcvData) > 0){
 
 Serial.println("Receiver");
 
 Serial.println((char *)rcvData);
 
 delay(500);
 
 Serial.println((char *)rcvData);
 
 }
 
//Serial.println((char *)rcvData);
 
 // if(x > 0) {
 
 //Serial.println((char *) rcvData);
 
// Serial.println(x);
 
memset(rcvData, 0, 10);
 
 delay(1000);
 
}

I'd be grateful for any help.

Thanks in advance!

T.

2 REPLIES 2

>>I cannot update firmware to newer version, after connection to ST-Link on STM32 Board there is info in ST-Link utility that it has Read Out Protection.

The firmware provided by USI is locked into the device, you'd need to mass-erase that to remove the ROP, and then to replace with your own firmware.

The code on the NUCLEO board typically talks to the USI module via AT commands.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
PTyl.1
Associate

Ok, It is understandable. If code works I assume that there is like you wrote, Nucleo talks to USI via AT commands, but unfortunatelly there is still problem with too short message that is received.