Open tcpipchip opened 12 months ago
I'm sorry because rust-lorawan seems to have dropped the support of CN470.(which is a dependency of embassy-lora) So I haven't re-checked this for months because I cannot test it.
I'll pick up this later. To make this compile is an easy task.
thank you! tryng here to make support to LSM110A
You can refer to examples in the embassy project.
./examples/stm32wl/src/bin/lora_p2p_receive.rs
./examples/stm32wl/src/bin/lora_p2p_send.rs
./examples/stm32wl/src/bin/lora_lorawan.rs
Yes, i am on on those now...
// Set CTRL1 and CTRL3 for high-power transmission, while CTRL2 acts as an RF switch between tx and rx
let _ctrl1 = Output::new(p.PB12.degrade(), Level::Low, Speed::High);
let ctrl2 = Output::new(p.PC13.degrade(), Level::High, Speed::High);
let _ctrl3 = Output::new(p.PC3.degrade(), Level::High, Speed::High);
let iv = Stm32wlInterfaceVariant::new(Irqs, None, Some(ctrl2)).unwrap();
let mut delay = Delay;
// Transmit Message
_usart.blocking_write("INIT LoRaWAN".as_bytes()).unwrap();
let lora = {
match LoRa::new(SX1261_2::new(BoardType::Stm32wlSx1262, spi, iv), true, &mut delay).await {
Ok(l) => l,
Err(err) => {
_usart.blocking_write(":(:(:(:(:(".as_bytes()).unwrap();
info!("Radio error = {}", err);
return;
}
}
};
working on variants...
about the
info!("Radio error = {}", err);
how can i know this error using uart ?
or redirect to the j-tag ?
In Rust Embedded, probe-rs is used to program, flash and debugging(use RTT).
info!("Radio error = {}", err);
can be rewritten to _usart.blocking_write
.
UartTx
also implements fmt::Write
. So you could write write!(usart, "whatever {}", args);
Hi @andelf , i am getting progress on messages...
but still not getting JOIN... (AU915)
but i will need your answers, if possible
-Do you know where to define the AU915 submask (subbands)? -The LSM110A use 2 GPIOS do control the RF... PB12, PC13 and the example use 3 gpios
// Set CTRL1 and CTRL3 for high-power transmission, while CTRL2 acts as an RF switch between tx and rx
let _ctrl1 = Output::new(p.PC4.degrade(), Level::Low, Speed::High);
let ctrl2 = Output::new(p.PC5.degrade(), Level::High, Speed::High);
let _ctrl3 = Output::new(p.PC3.degrade(), Level::High, Speed::High);
i modified to
// Set CTRL1 and CTRL3 for high-power transmission, while CTRL2 acts as an RF switch between tx and rx
let _ctrl1 = Output::new(p.PB12.degrade(), Level::Low, Speed::High);
let ctrl2 = Output::new(p.PC13.degrade(), Level::High, Speed::High);
i believe that PC12 is not connected inside the LSM110A
Here the datasheet, if you can help me! :)
https://github.com/Support-SJI/LSM110A
btw, p2p LoRa send an p2p LoRa receive works, then looks that PB12 AND PC13 are ok to control the RF SWITCH need to make work LoRaWAN
Hi @andelf
can you you see if still compiles ?
Looks that the Crates versions are not updated...
Thanks
I am tryng to port to STM32WL55 (LSM110A)
PS: getting error during cargo lorawan.rs compile, incorrect versions of dependecies