-
Notifications
You must be signed in to change notification settings - Fork 7.8k
drivers: modem: Sim7080 modem driver refactor #94929
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
Open
lgehreke
wants to merge
25
commits into
zephyrproject-rtos:main
Choose a base branch
from
metratec:sim7080-refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rerickson1
previously approved these changes
Aug 26, 2025
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.
Do a rebase and see if CI is fixed.
Placed sim7080 driver in separate directory and split it in multiple source files for better readability. Signed-off-by: Lukas Gehreke <[email protected]>
On first boot a fixed baudrate is set for the sim7080. This makes power on detection more reliable. Signed-off-by: Lukas Gehreke <[email protected]>
Check the modem model on boot. Signed-off-by: Lukas Gehreke <[email protected]>
PDP context handling takes place in separate source file for better readability. Signed-off-by: Lukas Gehreke <[email protected]>
Modem can either attach to network after initialization or be turned off. Signed-off-by: Lukas Gehreke <[email protected]>
Network and gnss can be disabled with stop functions instead of power cycling the modem. The start functions will also not power cycle the modem. In order to call the start functions the modem needs to be booted. Signed-off-by: Lukas Gehreke <[email protected]>
Moved socket related urc handling to dedicated file. Signed-off-by: Lukas Gehreke <[email protected]>
Socket functions return EINVAL instead of EAGAIN when modem is not in networking mode. Using EAGAIN could lead to a infinite sleep loop in offload_sendmsg(). Signed-off-by: Lukas Gehreke <[email protected]>
Removed sleep to prevent infinite loop in sendmsg. Signed-off-by: Lukas Gehreke <[email protected]>
Connection id and pdp index were swapped. Corrected this and hardcoded pdp index since 0 is always used as index. Signed-off-by: Lukas Gehreke <[email protected]>
Query available tx size before sending data instead of using hardcoded number. Removed unnecessary strg+z send after data. Signed-off-by: Lukas Gehreke <[email protected]>
The modem handler error can not be used to transport the result of CAOPEN since it is overwritten by the trailing OK. Socket does not get closed forcefully when connecting failed. Signed-off-by: Lukas Gehreke <[email protected]>
Removed connected check from offload_close in order to be able to close non-connected sockets. Signed-off-by: Lukas Gehreke <[email protected]>
If a socket gets closed by the network while waiting on data in offload_recvfrom this would hangup forever since modem_socket_wait_data does not support timeouts. When the socket gets closed this wait is unblocked. Signed-off-by: Lukas Gehreke <[email protected]>
Added functionality to set modem gpio pins. Signed-off-by: Lukas Gehreke <[email protected]>
Added function to get the iccid number. Signed-off-by: Lukas Gehreke <[email protected]>
Added function to measure battery voltage, battery charge status and battery connection level. Signed-off-by: Lukas Gehreke <[email protected]>
Added function to query the modem state from application side. Signed-off-by: Lukas Gehreke <[email protected]>
Added command to query ue system information from the modem. Signed-off-by: Lukas Gehreke <[email protected]>
Added funtions to download a gnss xtra file, query its validity and use it in gps. Signed-off-by: Lukas Gehreke <[email protected]>
Added funtion to query local time and added injection time to gnss xtra validity query function. Signed-off-by: Lukas Gehreke <[email protected]>
Starting gnss with xtra functionality is only possible if the validity of the xtra file was queried. Enabling xtra will be skipped if the file is not valid Signed-off-by: Lukas Gehreke <[email protected]>
Added function to forcefully reset the modem by holding the pwrkey for 15 seconds. Signed-off-by: Lukas Gehreke <[email protected]>
Added check that makes sure ftp works when the network context is already active. Signed-off-by: Lukas Gehreke <[email protected]>
71317b4
to
3981738
Compare
Fixed zephyr style violations. Signed-off-by: Lukas Gehreke <[email protected]>
3981738
to
f7cc080
Compare
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The sim 7080 driver has a lot functionality crammed into one source file. This makes it hard to maintain. Furthermore some bugs were fixed during the refactor.
Changes:
Additions:
Bugfixes: