So that's the reason it didn't work before?fpiSTM wrote: Mon Jan 04, 2021 8:56 am Hi,
on Nucleo L476RG D0 and D1 are not connected by default:
D0D1L476RG.png
SB 62/63 are opened by default as PA2 and PA3 are used by the STLink.
Modifying library for the WSSFM10 Sigfox module for compatibility with STM32L476RG
-
- Posts: 10
- Joined: Fri Dec 11, 2020 3:09 pm
Re: Modifying library for the WSSFM10 Sigfox module for compatibility with STM32L476RG
Re: Modifying library for the WSSFM10 Sigfox module for compatibility with STM32L476RG
Yes if you do not closed the SB and use the D0/D1 connector then it could not work...
-
- Posts: 10
- Joined: Sun Dec 20, 2020 4:32 pm
Re: Modifying library for the WSSFM10 Sigfox module for compatibility with STM32L476RG
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));
![]()
-
- Posts: 10
- Joined: Sun Dec 20, 2020 4:32 pm
Re: Modifying library for the WSSFM10 Sigfox module for compatibility with STM32L476RG
i have upload a new example for STM32L476RG to the library in case anyone need this:
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-");
}
}