Skip to content

cellular_modem : modem_chat_run_script and simple single AT sending and receiving possible? #65491

Discussion options

You must be logged in to vote

Hi, the entire modem subsystem, including the modem_cellular driver is asynchronous. All modules and the driver itself are run using a single thread, the system workqueue thread, using work items.

If you block the work queue, by using a non async function, it will deadlock. The change you are making here is blocking the work queue, which then blocks all other modem modules, so it will never complete.

You can rewrite the driver to be sync, by for example creating a dedicated work queue for it, but this requires more resources :)

To see an example of how the modem modules are used sync, see https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/gnss/gnss_quectel_lcx6g.c

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@MY201314MY
Comment options

Answer selected by MY201314MY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
Converted from issue

This discussion was converted from issue #65264 on November 20, 2023 20:31.