Hi Nuttx,

This is a follow-up to GitHub issue #15856
<https://github.com/apache/nuttx/issues/15856> initiated by raiden00pl. The
discussion there provides useful context for this proposal.

*--- Summary ---*
Currently, the IOCTL API for character-driven RF devices lacks a common
interface across different modulation technologies, such as LoRa, FSK, and
OOK. As a result, driver-specific IOCTL commands are created even when they
could be shared across multiple radios. This fragmentation makes
application portability more difficult to maintain.

*--- Impact ---*
This does require some changes to be made to 4 RF drivers.

   - My SX126x (New, experimental)
   - Raiden SX127x,
   - Linguini RN2xx3 (New, experimental)
   - nRF

The three of us—Raiden, Linguini, and I—support this idea and are already
involved in the development. Once implemented, this common API would make
it easier for IoT applications to run on NuttX with minimal driver-specific
modifications, reducing maintenance overhead and eliminating redundant
implementations.

*--- Breaking ---*
This is considered a breaking change if the following IOCTL command may be
changed:

WLIOC_SETTXPOWER takes an integer value for dB. This can be changed to
steps of 1/100 dB instead. Because the RN2xx3 and some radios can take
smaller values. (*Open for discussion)*

However, the RN2xx3 and SX126x drivers are marked experimental, so any
modifications to these are *not* considered breaking.

*--- Strategy ---*

   1. Introduce new IOCTL commands without modifying legacy implementations.
   2. Gradually migrate existing drivers to the new API while testing and
   documenting.
   3. Remove legacy implementations

To avoid breaking changes, we could retain the legacy APIs if desired and
only remove the *experimental* ones.

*--- Proposal API header ---*
https://github.com/keever50/nuttx/blob/common_wireless_character_driver_API/include/nuttx/wireless/ioctl.h
I collaborated with Raiden and Linguini on defining these IOCTL commands.
Feedback and suggestions from the community would be greatly appreciated.

*--- Note about "Experimental" ---*
The SX126x and RN2xx3 drivers are marked as experimental, meaning users are
explicitly warned that changes may occur in the near future. They were
labeled as such before being merged.

Looking forward to your thoughts!

Best regards,

Kevin (Keever50 on github)

Reply via email to