-
Notifications
You must be signed in to change notification settings - Fork 7.4k
modem_cellular: Add support for the simcom a76xx modem #90081
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright (C) 2021 metraTec GmbH | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
description: Simcom A76XX modem | ||
|
||
compatible: "simcom,a76xx" | ||
|
||
include: uart-device.yaml | ||
|
||
properties: | ||
mdm-power-gpios: | ||
type: phandle-array | ||
required: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright (c) 2025 Olivier Lalonde | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Configuration options for cellular modem sample | ||
|
||
mainmenu "Cellular modem sample application" | ||
|
||
config SAMPLE_CELLULAR_MODEM_ENDPOINT_HOSTNAME | ||
string "Endpoint hostname" | ||
default "test-endpoint.com" | ||
|
||
source "Kconfig.zephyr" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,3 +55,16 @@ | |
``CONFIG_UART_ASYNC_API=y``. The driver doesn't support UART polling. | ||
|
||
Lastly, the APN must be configured using ``CONFIG_MODEM_CELLULAR_APN=""``. | ||
|
||
Server setup | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe mention There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a small paragraph about that 👍. |
||
************ | ||
|
||
Deploy the server on a publicly accessible host, then set the | ||
`CONFIG_SAMPLE_CELLULAR_MODEM_ENDPOINT_HOSTNAME` variable in `prj.conf` to the | ||
server's hostname. | ||
|
||
.. code-block:: shell | ||
|
||
git clone --depth=1 https://github.com/zephyrproject-rtos/zephyr.git | ||
cd zephyr/samples/net/cellular_modem/server | ||
python te.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Otherwise we run into DLCI buffer overruns (maybe due to lack of UART hardware flow control?) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI there is now an async UART backend with HWFC available. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm pretty new to Zephyr/embedded but the module I'm testing with doesn't have a CTS pin, so unless I misunderstand something, I don't think it's possible to fix that in software (e.g. by using a different UART driver). The modem still won't know whether the microcontroller is ready to receive. Or maybe I'm misunderstanding something... PS: I am currently waiting for a better module with UART flow control pins, but shipping is slow. |
||
CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE=1507 | ||
CONFIG_NET_IPV6=n |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/ { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not look right. Now anyone having this DK will get this simcom modem added automatically even if he/she does not have one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I used the nrf52840dk board for testing the modem as none of the supported Zephyr boards uses it. There's no reason to run the cellular modem sample with it since it doesn't have a modem, so the chance of confusing someone is low. Is there a better way to do this? Or should i just remove it from the sample? I don't mind either way it was mostly just to facilitate my testing. |
||
aliases { | ||
modem = &modem; | ||
}; | ||
}; | ||
|
||
/* Tested with Simcom A7672SA module connected via UART | ||
* TX: P1.2 | ||
* RX: P1.1 | ||
* PWRKEY: P0.02 | ||
*/ | ||
&uart1 { | ||
compatible = "nordic,nrf-uarte"; | ||
status = "okay"; | ||
current-speed = <115200>; | ||
/* The module I tested with doesn't expose RCS/CTS pins | ||
* hw-flow-control; | ||
*/ | ||
|
||
pinctrl-0 = <&uart1_default>; | ||
|
||
modem: modem { | ||
compatible = "simcom,a76xx"; | ||
status = "okay"; | ||
mdm-power-gpios = <&gpio0 2 (GPIO_ACTIVE_HIGH)>; | ||
}; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! @bjarki-andreasen something really should be done with regards to
test-endpoint.com
... cc @kartbenUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a side note, in my own project, I recently added this to my
CMakeLists.txt
to avoid committing secrets to git:And I also added
local.conf
to.gitignore
.It would be useful here to allow developers to set a private
CONFIG_SAMPLE_CELLULAR_MODEM_ENDPOINT_HOSTNAME
without having to edit a version controlled file. And for other configurations (e.g. logging) that are useful for testing but that you don't necessarily want to commit to git.