Closed duduita closed 1 year ago
@duduita unfortunately is not a straight answer but you may want to consider the following aspects
Could you give me an example that what would be an extra functionality? @jerpelea
@duduita unfortunately those extra features are dependent on each modem, usually modems have special commands for special features
Thank you for your explanation @jerpelea!
Just to let you know, that I could get connected using an LTE-M module (Quectel BG770A-GL) with NuttX, by using the PPP protocol.
Basically, I had to use the PPPD app on NuttX, and change a few things on the connect_script
on the pppd_main.c
static FAR const char connect_script[] =
"ECHO ON "
"TIMEOUT 30 "
"\"\" AT+CGDCONT=1,\\\"IP\\\",\\\"virtueyes.com.br\\\" "
"OK AT+COPS=1,2,\\\"72410\\\",7 "
"OK ATD*99# "
"CONNECT \\r\\c";
static FAR const char disconnect_script[] =
"\"\" ATZ "
"ERROR \\r\\c";
I only had to define my PDP context, use AT+COPS to get registered and connected, and use ATD*99# to start the dial-up on the modem.
To define the PDP context (replace the variables according to your internet provider):
AT+CGDCONT=1,“IP”,“virtueyes.com.br”
And use the CONFIG_NETUTILS_PPPD_PAP
, setting the pap authentication in the pppd_main.c
:
#ifdef CONFIG_NETUTILS_PPPD_PAP
.pap_username = "virtu",
.pap_password = "virtu",
#endif
To get registered manually:
AT+COPS=1,2,“72410”,7
A hint to see your internet provider ID is using the AT+COPS=?, since it will show all the networks your module sees.
If you are not seeing anything, you can set the band used in your country, for instance, in Brazil we use Band 3 (0x4) for CATM1 and Band 28 (0x8000000) for NB-IOT, so you need to find the correspondent hex numbers in the datasheet to use in the following command:
AT+QCFG=“band”,0x0,0x4,0x8000000
Finally, the dial-up command:
ATD*99#
Another important thing: some modems as BG770A-GL requires the \\r
at the end of the connect_script
(Carriage Return).
I was wondering if it would be possible to use LTE-M modems with PPP on NuttX, but I haven't found any tutorials involving that, it's why I decided to explain in detail what I've done.
I need to add support for a Quectel BG770A modem.
After looking at this commit, I realized that NuttX has native code that handles some kind of modems, not requiring the creation of a driver from scratch. But, maybe it does not cover all types of modems, since NuttX has a separate driver for the ALT1250 modem.
Then, I’m not sure if I’ll need to create a driver from a scratch, as the driver for the ALT1250 modem, or if I can just configure it, as it was done in this commit.
Could anyone help me to decide which approach I’ll have to follow?