Title
Reading EC200U VBAT (AT+CBC) while using Zephyr gsm_ppp driver on nRF5340
Environment
-
Hardware: nRF5340 (Application Core) + Quectel EC200U Cellular Modem
-
SDK: V2.5.1
-
RTOS: Zephyr
-
Modem Interface: UART
-
PPP: Zephyr
gsm_pppdriver
System Architecture
Our gateway consists of two MCUs/processors:
-
nRF5340 runs the main application firmware developed using Zephyr and nRF Connect SDK.
-
Quectel EC200U provides the LTE cellular connectivity.
The nRF5340 and EC200U communicate through a UART interface. Once the modem is initialized, the UART is used by the Zephyr gsm_ppp driver to establish a PPP connection for IP networking.
The application running on the nRF5340 handles:
-
BLE communication
-
AWS IoT connectivity
-
MQTT communication
-
Gateway application logic
The EC200U functions purely as the cellular modem.
Requirement
We would like to read the EC200U supply voltage (VBAT) from the modem.
According to the Quectel AT command manual, the modem reports its battery/supply voltage using:
AT+CBC
Our goal is to expose this value to the nRF5340 application so it can be periodically reported to the cloud.
Current Investigation
While investigating the gsm_ppp driver, we noticed that RSSI retrieval is already implemented.
The driver sends:
AT+CSQ
and parses the response using the existing command handler (for example, on_cmd_atcmdinfo_rssi_csq).
From our understanding, a similar implementation could be added for:
AT+CBC
by creating a new parser and exposing an API that returns the modem VBAT.
However, we are unsure whether modifying the gsm_ppp driver directly is the recommended approach.
Questions
-
Is extending
gsm_ppp.cto add support forAT+CBCthe correct and recommended solution? -
Is there an official extension mechanism or API that allows additional AT commands (such as
AT+CBC) to be implemented without modifying the internalgsm_pppdriver source? -
Since the modem is operating in PPP mode, what is the recommended way to execute additional AT commands like
AT+CBCwhile maintaining the PPP connection? -
Is there an existing Zephyr or Nordic API that already supports retrieving modem battery voltage from an external modem connected through the
gsm_pppdriver? -
If driver modification is required, what is the recommended way to maintain these changes across future nRF Connect SDK upgrades?
Any guidance or recommended implementation approach would be greatly appreciated.