-
Notifications
You must be signed in to change notification settings - Fork 204
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
Radio
API
#48
Comments
Having spent most of my professional life making radios, I'm not entirely
convinced this will work. The purpose of a HAL is to ensure hardware can be
swapped out, and where that ability is useful, it will be part of that
particular wireless protocol spec. The HCI layer in the Bluetooth spec is a
good example - you can use any vendor's HCI baseband with any HCI
implementing stack (in theory).
The sort of HAL that might be useful for a wide range of packet networks is
a socket API, like the Berkeley Socket API. I don't know how that would
look in Rust though. It would also be good to see an AT command client
interface for communicating with AT devices too, but that's more of a
protocol implementation rather than a HAL.
Cheers
Jonathan
|
I tend to agree with @thejpster here. The only thing that would probably be applicable here is a PHY layer HAL which might actually work great for Ethernet but not others. I'd actually be down for that, I really would like to use https://github.com/m-labs/smoltcp some time soon. The mentioned implementations are full "OS"es with plenty of the OSI layers implemented so scope is really far beyond the Rust embedded-hal. |
@thejpster Same, but, after working on far too many ISM band digital radio IC drivers and ports for all the projects I listed, I have the opposite opinion 😂 Some protocols do have specs, but modern digital radio ICs are capable of supporting a huge number of protocols, so those protocol abstractions (when they exist) are typically too high level for drivers to be useful. Also I think the existence of this abstraction in every IoT OSs with a variety of protocols on top is pretty good validation that it's useful. The operating systems above run 802.15.4(g), Thread, Dash7, LoRA/LoRAWAN, and proprietary stuff, all on top of those common phy interfaces. @therealprof this is a physical layer HAL? Sorry if that was unclear, could rename to IMO having something like this to generalise the physical layer is the first step to building up the rest of the LP-WAN networking components (which is basically why I'm interested in rust). |
I'd very much support a PHY HAL, although I'm not quite sure whether this is possible for wireless protocols at all since those usually have far more drastic requirements than Ethernet or the usual serial busses. I'd be happy to be convinced otherwise. The OSes do quite a bit of black magic to make all layers work so I'm not sure whether that will compare. |
Closing until I've had a chance to prove it across a couple of devices. |
50: Embedded hal 1.0.0 alpha.3 r=ryankurte a=eldruin Builds on and superseeds rust-embedded#43 and rust-embedded#48. Co-authored-by: Diego Barrios Romero <[email protected]>
I suspect this is likely to be a bit contentious, but, how do we feel about the addition of a generic
Radio
interface for RF devices?On one hand, it's unlikely to generalise well to all radio implementations. On the other, if we cover most of them we might be able to avoid the fragmentation in radio driver styles that exists in the world of C (and that'd make me really happy).
Some examples of existing interfaces:
The requirements I have for such are:
I've been playing with an implementation based on what I think are the best bits of each of them, would definitely appreciate any thoughts.
The text was updated successfully, but these errors were encountered: