-
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?
Conversation
Hello @olalonde, and thank you very much for your first pull request to the Zephyr project! |
43d0b7c
to
41fa7b7
Compare
@@ -0,0 +1,27 @@ | |||
/ { |
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.
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 comment
The 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.
@@ -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 comment
The 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 comment
The 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 SAMPLE_CELLULAR_MODEM_ENDPOINT_HOSTNAME | ||
string "Endpoint hostname" | ||
default "test-endpoint.com" |
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 @kartben
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:
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/local.conf)
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/local.conf
"# This file is not version controlled, you can use it for local only configuration")
endif()
set(EXTRA_CONF_FILE
${CMAKE_CURRENT_SOURCE_DIR}/local.conf
)
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.
@@ -55,3 +55,12 @@ Next, the UART API must be specified using ``CONFIG_UART_INTERRUPT_DRIVEN=y`` or | |||
``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 comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe mention CONFIG_SAMPLE_CELLULAR_MODEM_ENDPOINT_HOSTNAME
?
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.
Added a small paragraph about that 👍.
drivers/modem/Kconfig.cellular
Outdated
config MODEM_CELLULAR_POWER_ON_GNSS | ||
bool "Power on the modem's GNSS module" | ||
depends on DT_HAS_SIMCOM_A76XX_ENABLED | ||
default n |
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.
default n |
Default is always n
.
Add support for the simcom a76xx modem which is similar to the simcom 7080 but has a few key differences. Tested with a simcom A7672SA module but as there is a single simcom A76XX AT commands manual, the driver should work with other modems of the series. Signed-off-by: Olivier Lalonde <o@syskall.com>
Add a shutdown script to the a76xx modem driver. Signed-off-by: Olivier Lalonde <o@syskall.com>
Optionally power on the GNSS module of simcom a76xx during the chat init script. This is necessary because it does not seem possible to power on the GNSS once the modem is in CMUX mode. Configurable through `CONFIG_MODEM_CELLULAR_POWER_ON_GNSS`. Signed-off-by: Olivier Lalonde <o@syskall.com>
|
Add support for the simcom a76xx modem which is similar to the simcom 7080 but has a few key differences. Tested with a simcom A7672SA module but as there is a single simcom A76XX AT commands manual, the driver should work with other modems of the series.