GithubHelp home page GithubHelp logo

stm32duino / i-nucleo-lrwan1 Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 14.0 122 KB

Arduino library to support I-NUCLEO-LRWAN1 LoRa® expansion board based on USI® LoRaWAN™ technology module.

C++ 19.88% C 80.12%

i-nucleo-lrwan1's People

Contributors

fpistm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

i-nucleo-lrwan1's Issues

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

Hi,

I've got 2 I-Nucleo-LRWAN1 shields on 2 STM32 Nucleo64 F103-RB boards. I've uploaded PingPong example and it works but I've tried to modify code and send longer message (for example "ABCDEFG123") and what i receive on second board is first four characters "ABCD".

I checked module by BridgeSerial and it works. It's software version: 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.

Cannot compile

When I try to compile RAW example get devEUI I get:

getDevEUI:27: error: 'PA_0' was not declared in this scope
 HardwareSerial SerialLora(PA_1, PA_0);

I tried to declare PA_1 and PA_0 as 23 and 22. I get next error when compiling:

exit status 1
no matching function for call to 'HardwareSerial::HardwareSerial(int&, int&)'

Any idea why is that happening? I didn't change anything, but want to get a terminal to sent AT commands and receive commands.

Problem SoftwareSerial

Hi, I'm a student, I'm using the I-NUCLEO-LRWAN1 in my application, all it's working but I have a problem.
For my application I need to send AT comand to an other board ( sim7000), so I have to use an other serial to send this command. With Arduino I can do this using the SoftwareSerial library, but here I can't do this (Why? SoftwareSerial is not supported? ).
I know that with my hardware I have 3 (?) USART periphericals and I can set one of this to send this AT commands but I don't know how.
I'm using the serial bridge with wires that connects D0 and D1 to PC_11 and PC_10. In the pin map I see that D0 and D1 are usart2 and PC_11 and PC_10 are usart1; maybe is this the problem?
I try to write something like
#define mySerial Serial2
that in the pin map they are PA_15 and PA_14 but when I program it to send "AT" with
mySerial.write("AT \r\n");
I see the message in the COM port of STM but I don't see nothing in PA_15 and PA_14; I'm confused.
Ty for the help.

frequency hopping in ADR mode

can i add more frequency (channels) for hopping in this mode ?
In my observations its use only 3 channels (868.1 868.3 and 868.5).

Lora module not ready

Hello. I have an issue regarding my node. When I use the serial monitor, it says that the Lora module is not ready. I tried solving it with the solutions at the other thread but it did not still work. I am a newbie at LoRaWan. Please help.

I have a STM32F411 Nucleo-64 board and a I-NUCLEO-LRWAN1 shield. This is my setup.
52755190_1212066382302308_7009686411494293504_n

My serial monitors of LoRaWANABP and BridgeSerial
123124
123asd21

Thank you.

receive and transmit

Hello.
Mayby this is not an issue but i don't known how it works.

Why in example receive is before transmit since the gate first receives and then sends data ( when we use downlink to transmit data).

Is it that the data received is still in the buffer (in the node) and are read from this buffer only before the next transmit?

Library should only use standard Arduino API

Some internal definition of the STM core are present in the library and could probably be removed:

See http://stm32duino.com/viewtopic.php?f=14&t=3499

Not exhaustive list:

HAL_StatusTypeDef HW_UART_Modem_Init(void *serial, uint32_t BaudRate);

#define DBG_GPIO_WRITE( gpio, n, x ) HAL_GPIO_WritePin( gpio, n, (GPIO_PinState)(x) )

HAL_StatusTypeDef HW_UART_Modem_Init(void *serial, uint32_t BaudRate)

return (HAL_OK);

return (HAL_ERROR);

static HAL_StatusTypeDef at_cmd_send(uint16_t len);

if ( HW_UART_Modem_Init(serial, BAUD_RATE)== HAL_OK )

HAL_StatusTypeDef HAL_Status;

https://github.com/stm32duino/I-NUCLEO-LRWAN1/blob/master/src/i_nucleo_lrwan1_wm_sg_sm_xx.c#L200
static HAL_StatusTypeDef at_cmd_send(uint16_t len)


This could probably be tested quickly using define.
ex:
#define HAL_Delay delay

LoRa_GetRSSI and LoRa_GetSNR error

Hi,

I have been trying without success to return RSSI and SNR stats from received packets. However, each time either the LoRa_GetRSSI() and LoRa_GetSNR() functions are called from the lora_driver.c library, the Modem_AT_Cmd() called within the functions returns AT_UART_LINK_ERROR.

Does anyone know why this might be the case? Are there some limitations on when these functions can be called? I have not been able to find anything in the ST, USI or Semtech documentation to shed any light on this.

Hardware:
2 x I-NUCLEO-LRWAN1 shields hosted by NUCLEO-L073RZ boards. Firmware is a minor variant of the PING PONG firmware to achieve local end node-end node comms.

Thanks in advance!

Problem removing alimentation

Hi, I programmed this expansion board with Nucleo-L053R8. It's work but if I remove and I reconnect the board I don't see anything on terminal.
Why?

LoRaWANOTAA example not working ?

Hello.
I have problem with LoRaWanOTAA example. nucleo-L452RE + I-Nucleo-lorawn1 (rx & tx connected to pc11 & pc10
i have only "joinOTAA failed!"
There is is no needed devEUI ??

LoRaWANABP work fine (btw: how disable confirmation by downlink?)

Send message in OTAA mode

Hello,

Im using I-nuclei-lrwan1 with a nucleo64 l073rz board, I want to know how to send bytes via the OTAA, because I find only the function sendFrame in the example. Thank you so much!

AS923 Support

Hi,
I cant find any information for the support of AS923. Pls advice

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.