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
drivers: modem: add Quectel EG25-G #64746
Conversation
Commit should have message and sign-off |
bb325c4
to
e56049c
Compare
Would be not better if we put all of those definitions into separate headers? I mean something like ...snip... #if DT_HAS_COMPAT_STATUS_OKAY(quectel_eg25_g) #include "quectel_eg25_g.h" #endif #if DT_HAS_COMPAT_STATUS_OKAY(quectel_egXX) #include "quectel_egXX.h" #endif ...snip... (or use some macrology) MODEM_CHAT_SCRIPT_CMDS_DEFINE(quectel_eg25_g_init_chat_script_cmds, MODEM_CHAT_SCRIPT_CMD_RESP("ATE0", ok_match), MODEM_CHAT_SCRIPT_CMD_RESP("AT+CFUN=4", ok_match), MODEM_CHAT_SCRIPT_CMD_RESP("AT+CMEE=1", ok_match), MODEM_CHAT_SCRIPT_CMD_RESP("AT+CREG=1", ok_match), MODEM_CHAT_SCRIPT_CMD_RESP("AT+CGREG=1", ok_match), MODEM_CHAT_SCRIPT_CMD_RESP("AT+CEREG=1", ok_match), MODEM_CHAT_SCRIPT_CMD_RESP("AT+CREG?", ok_match), MODEM_CHAT_SCRIPT_CMD_RESP("AT+CEREG?", ok_match), MODEM_CHAT_SCRIPT_CMD_RESP("AT+CGREG?", ok_match), MODEM_CHAT_SCRIPT_CMD_RESP("AT+CGSN", imei_match), MODEM_CHAT_SCRIPT_CMD_RESP("", ok_match), MODEM_CHAT_SCRIPT_CMD_RESP("AT+CGMM", cgmm_match), MODEM_CHAT_SCRIPT_CMD_RESP_NONE("AT+CMUX=0,0,5,127,10,3,30,10,2", 0)); MODEM_CHAT_SCRIPT_DEFINE(quectel_eg25_g_init_chat_script, quectel_eg25_g_init_chat_script_cmds, abort_matches, modem_cellular_chat_callback_handler, 10); MODEM_CHAT_SCRIPT_CMDS_DEFINE(quectel_eg25_g_dial_chat_script_cmds, MODEM_CHAT_SCRIPT_CMD_RESP_MULT("AT+CGACT=0,1", allow_match), MODEM_CHAT_SCRIPT_CMD_RESP("AT+CGDCONT=1,\"IP\"," "\""CONFIG_MODEM_CELLULAR_APN"\"", ok_match), MODEM_CHAT_SCRIPT_CMD_RESP("AT+CFUN=1", ok_match), MODEM_CHAT_SCRIPT_CMD_RESP_NONE("ATD*99***1#", 0),); MODEM_CHAT_SCRIPT_DEFINE(quectel_eg25_g_dial_chat_script, quectel_eg25_g_dial_chat_script_cmds, dial_abort_matches, modem_cellular_chat_callback_handler, 10); |
@bbilas We definitely need to separate it out somehow, I still don't know exactly what the best solution is though, and it should be its own PR I think :) |
11f2f56
to
82ce689
Compare
241c70a
to
b1021fe
Compare
c76a60d
b1021fe
to
c76a60d
Compare
rebased and added periodic chat scripts |
96aa829
to
008797b
Compare
This commit introduces support for the modem EG25-G from Quectel. Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
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.
Is it possible to generalize Quectel chat scripts? They look pretty similar, EC21 and its variants would be using the same init process as well
They all look very similar tbf, I think there's a potential for a refacto there but should it be done in a separate PR ? |
Hello, what's the update on the status of this PR ? |
Sorry, forgot about it :) @rerickson1 @ycsin |
No description provided.