Re: Modifying library for the WSSFM10 Sigfox module for compatibility with STM32L476RG
Posted: Mon Jan 04, 2021 9:19 am
Everything relating to using STM32 boards with the Arduino IDE and alternatives
https://www.stm32duino.com/
Yes if you do not closed the SB and use the D0/D1 connector then it could not work...
good. its working now : )luka.banfi wrote: ↑Mon Jan 04, 2021 8:32 amI commented out:paulportohernan wrote: ↑Sun Jan 03, 2021 9:59 pm you dont get the message on the sigfox backend? are you sure the module its connected to the right Tx and Rx pins? your modules have leds to let you know when its transmitting?
also, you are using thefuntion, if you dont have a downlink configured useCode: Select all
wisol.send_rcv()
Code: Select all
wisol.send()
and uncommented:Code: Select all
//String valor_recibido = wisol.SEND_RCV(valor); //aproximandamente esperar 1 minuto //Serial.println(valor_recibido);
Apparently the module wasn't connected to the right TX and RX pins, because I received no message in the Sigfox backend when TX (BRKWS01) was connected to RX/D0 (PA_3) and RX (BRKWS01) was connected to TX/D1 (PA_2), so I switched it so that TX (BRKWS01) is connected to D2 (PA_10) and RX (BRKWS01) is connected to D6 (PB_10). I received messages:Code: Select all
Serial.println(wisol.SEND(valor));
Code: Select all
#include <Tinyfox.h>
#define btn PC13 // boton usuario azul / blue user button
#define RXLED PA5
#define rstPin PC12
//nucleo-64 STM32L476RG:
//HardwareSerial Serial2(USART2);
HardwareSerial Serial3(USART3);
Tiny<HardwareSerial,HardwareSerial> wisol(&Serial3,&Serial,rstPin,false);
void setup() {
pinMode(btn,INPUT_PULLUP);
pinMode(RXLED,OUTPUT);
Serial.begin(115200);
Serial.println("");
Serial.println("boot");
wisol.begin(9600);
while(!Serial); //comentar si usará una fuente de energía externa
Serial.println("-Presione botón PC13-");
}
void loop() {
if(digitalRead(btn)==0){
digitalWrite(RXLED,LOW);
Serial.println("Tx");
wisol.RST();
uint32_t valor =10;
Serial.println(wisol.SEND(valor));
//String valor_recibido = wisol.SEND_RCV(valor); //aproximandamente esperar 1 minuto
//Serial.println(valor_recibido);
digitalWrite(RXLED,HIGH);
wisol.SLEEP();
delay(3000);
Serial.println("-Presione botón PC13-");
}
}