zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.6k stars 6.49k forks source link

Cellular modem API development #64405

Open bjarki-andreasen opened 11 months ago

bjarki-andreasen commented 11 months ago

Introduction

We need a device driver API to configure and control cellular modems. This RFC will list every individual feature the API should cover, documenting the requirements and rationale behind every individual feature. This RFC will then be used to track the development of each individual features development, which should be in large part developed in parallel driven by a variation of developers.

Cellular modem API progress overview

The following tasks indicate whether a feature has been successfully implemented or not.

Cellular modem API documentation

Each individual feature is described in detail here

Setting network credentials

Assignee: Unassigned PR: None

Getting network signal quality

Assignee: @ldenefle PR: #65685

Getting network status

Assignee: PR: #67025

Setting radio access technologies

Assignee: @bjarki-trackunit PR: https://github.com/zephyrproject-rtos/zephyr/pull/64537

Getting supported radio access technologies and bands

Assignee: @bjarki-trackunit PR: https://github.com/zephyrproject-rtos/zephyr/pull/64537

Getting modem properties

Assignee: @ldenefle PR: #65685

Status summary

The RFC is at this point only an initial proposal to which features we should implement, and what they should cover. Everything is open to change, and no actual work has begun.

The first step will be to discuss which features we should to cover to which degree :)

jeffwelder-ellenbytech commented 11 months ago

Looking forward to these improvements! :)

I'm interested in switching firmwares using the AT#FWSWITCH command for use with eSIM. In the USA there's often multiple carrier firmwares in a modem for different provider requirements: (AT&T/Verizon/Global) Maybe this would be part of Setting Radio Access Technologies, or maybe a new category is more appropriate.

Probably could find some time to work on it once something is defined, or with some guidance.

Also maybe a category for HW Settings such as Flow Control, Baud, etc.

naNEQ commented 10 months ago

Very much looking forward to that and willing to help.

Small input from my side, in the "Getting modem properties" part, I think these should be included:

JordanYates commented 3 months ago

Is there any appetite for pulling this functionality under an equivalent to the wifi_mgmt.h API?

For example, to me a single NET_EVENT_WIFI_CMD_IFACE_STATUS call which returns a struct wifi_iface_status is a nicer model than individually calling a host of functions, as currently defined in the cellular.h API.

It has the additional benefit of being an existing API that is proven and easily extensible.

beriberikix commented 3 months ago

Personally I think adopting something like this functionality for Wi-Fi would be a nice benefit. There's different protocols (ex. custom AT cmds), interfaces (SPI/UART/SDIO/USB), features (ex. co-existence) that may be similar across wi-fi vendors but are subtly different.