Comments (4)
Your query is timely. I will be making updates this weekend to focus on board type (Stm32wlSx1262, Stm32l0Sx1276, and Rak4631Sx1262 are the initial ones) rather than chip type (Sx1261, Sx1262, Sx1276, etc.) within a radio kind (Sx1261/2, Sx1276/7/8/9). This will allow us to better account for differences in LoRa boards even with the same LoRa chip. As we add more LoRa boards to the mix, we will discover variations on a theme that can be captured in a better manner than adding a bunch of board type checks.
from lora-phy.
There is a LoRa/LoRaWAN group chat using Element:
It is currently not public, but I would be glad to invite you if you have (or create) an Element account and let me know the name of the account.
from lora-phy.
The latest update supports board type (and within board type, chip type).
pub enum BoardType {
GenericSx1261, // placeholder for Sx1261-specific features
Rak4631Sx1262,
Stm32l0Sx1276,
Stm32wlSx1262,
}
pub enum ChipType {
Sx1261,
Sx1262,
Sx1276,
Sx1277,
Sx1278,
Sx1279,
}
impl From<BoardType> for ChipType {
fn from(board_type: BoardType) -> Self {
match board_type {
BoardType::GenericSx1261 => ChipType::Sx1261,
BoardType::Rak4631Sx1262 => ChipType::Sx1262,
BoardType::Stm32l0Sx1276 => ChipType::Sx1276,
BoardType::Stm32wlSx1262 => ChipType::Sx1262,
}
}
}
which prevents generic chip type checks from having to be modified each time a new board is added:
match self.radio_kind.get_board_type().into() {
ChipType::Sx1261 | ChipType::Sx1262 => {
ModulationParams::new_for_sx1261_2(spreading_factor, bandwidth, coding_rate, frequency_in_hz)
}
ChipType::Sx1276 | ChipType::Sx1277 | ChipType::Sx1278 | ChipType::Sx1279 => {
ModulationParams::new_for_sx1276_7_8_9(spreading_factor, bandwidth, coding_rate, frequency_in_hz)
}
}
while making true board type checks evident:
async fn init_rf_switch(&mut self) -> Result<(), RadioError> {
if self.board_type != BoardType::Stm32wlSx1262 {
let op_code_and_indicator = [OpCode::SetRFSwitchMode.value(), true as u8];
self.intf.write(&[&op_code_and_indicator], false).await?;
}
Ok(())
}
The chip type name is included in the board type name in case the same board type may include different chip types.
Therefore:
- in mod_params.rs, add your board type and update the From specification for the board's chip type;
- update the pertinent radio kind function as in the init_rf_switch() sample above.
from lora-phy.
Awesome.
I'll take a whack at it, and making the Tcxo control part of the board type this weekend
from lora-phy.
Related Issues (11)
- Considering Serial Modules HOT 5
- Join failure on The Things Network using stm32wl HOT 1
- Consider upgrading for embedded-hal-async HOT 1
- Tips for inclusion in README
- Evaluate read status handling for IRQ events HOT 1
- Allow custom LoRa boards HOT 2
- Implement deep sleep for maximum power savings HOT 1
- LoRa Receive Soft Lock HOT 12
- index out of bounds: the len is 9 but the index is 9; HOT 3
- Allow the LoRa chip to share the SPI bus HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lora-phy.