-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Common interface for LORA chips #15856
Comments
my idea was to use the current WLIOC, but extend it with the modulation. ex: WLIOC_LORA, WLIOC_GFSK, WLIOC_OOK, WLIOC_QPSK etc. LoRa devices often can use multiple modulation techniques like that. This allows you to have And leave the WLIOC_SET_FREQ and WLIOC_SET_PWR as is. These are common across nearly all RF chips. Except for the super cheap ones. Then there are some more specific commands such as CRC, fixed header etc. I guess these can be left in familly specifics. Obviously with default values. The result would be an API that all apps can work with. Including ones that allow adaptive data rate, like LoRaWAN. |
@keever50 it's a good idea to introduce 3 levels of ioctl: 1. common RF commands, 2. modulation specific commands, 3. chips specific commands. However, the last type of commands should be avoided if possible, but I understand that it may be necessary in some cases. The ultimate goal should be an API enabling support for LoRaWAN. I haven't been following the LoRaWAN topic for a while, but the last time I saw 'loramac-node' implementation from Semtech it was awful, so I gave up on porting it to NuttX. |
I suppose this common interface would also still involve having |
yes, |
Maybe as an ioctl? |
I don't think so. This should be returned at the same time as the data from radio. Here is example how it's done for ieee802154: nuttx/include/nuttx/wireless/ieee802154/ieee802154_device.h Lines 52 to 64 in ff4d461
|
I used the SX127x way in my SX126x already, but i guess we also need to standardize this too. nuttx/include/nuttx/wireless/lpwan/sx127x.h Lines 113 to 124 in ff4d461
The signal information is quite nice to have in the packet. Maybe nice to have in the common interface. I am not sure what the reserved bytes are for? |
I'm not sure what is the best way to figure out together what the best common interface is going to be and how to make one. What about the mailing list? — IOCTL —
LoRa:
Specific implementations
— Read header —
Now, because IOCTL is a limited resource, |
Is your feature request related to a problem? Please describe.
Currently NuttX supports only
sx127x
but more drivers for LORA are coming. All these drivers should use the same common API, so that it will be possible to create portable user applications.This most likely will involve breaking changes for
sx127x
(easy to detect and fix compiler errors).The problem is partly due to a decision that I made a long time ago when adding
sx127x
support with Greg approval, that the LORA chips in NuttX would be character drivers, not network devices. The reason for this is that edge devices supporting LORA are low-power devices with limited resources. For such devices, supporting the network stack is a waste of resources.The result of this decision is that we cannot use the portable interface provided by the network stack and we have to design a portable interface as a character device.
We want to avoid the fate of legacy sensors where there was no common interface, making it impossible to create portable applications with them.
Here are two PRs that add another LORA chips:
Describe the solution you'd like
Common API for LORA chips.
Describe alternatives you've considered
No response
Verification
The text was updated successfully, but these errors were encountered: