SIMCOM SIM7070G UART Support

Jorge Solla jorgesolla at gmail.com
Sun Oct 16 17:13:51 UTC 2022


Hi,

So I did the requested testing: Logs attached.

On Mon, Oct 10, 2022 at 10:13 AM Aleksander Morgado <
aleksandermj at chromium.org> wrote:

> Hey
>
> > I'm trying to configure a SIMCOM7070G modem to work with
> ModemManager/NetworkManager.
> >
> > I've observed there is already a plugin and some support, but unless I'm
> mistaken, it looks like the current support expects this modem to be
> connected via USB (4 ports provided by usb: AT cmds, data, gnss, etc).
> >
> > My problem is I'm using it in a board where the modem is NOT connected
> to the CPU via USB: The regular UART (UART1) provided by the modem is used.
> >
> > So far, I already have some signals of life:
> >
> > 1. MODEM is detected by ModemManager as Generic GSM modem: I added the
> following rule to /etc/udev/rules.d/ and works fine:
> >
> > ACTION!="add|change|move|bind", GOTO="mm_whitelist_end"
> > KERNEL=="ttyS4" ENV{ID_MM_DEVICE_PROCESS}="1"
> > LABEL="mm_whitelist_end"
> >
>
> There are several things missing here.
>
> The "simtech" plugin only expects USB modems right now. It should be
> updated to have MM_PLUGIN_ALLOWED_VENDOR_STRINGS, so that after the AT
> probing phase is run, ModemManager tries to guess the modem vendor
> based on the given string. Once that works, the simtech plugin will
> take control of your modem, with the simcom-specific features if any
> needed.
>
> Then given you're using a pure RS232 port, please note that you should
> explicitly configure how the TTY is supposed to work, in particular,
> you need to define ID_MM_TTY_BAUDRATE and ID_MM_TTY_FLOW_CONTROL
> explicitly. If your modem works fine AT-control wise, then probably
> the default baudrate MM uses was good (57600), but you should better
> explicitly define it. And if the data connection over PPP is not
> working as expected as in your case, it may indeed because of the
> missing ID_MM_TTY_FLOW_CONTROL (either "none", "xon-xoff" or
> "rts-cts").
>


New udev rules as follows:

ACTION!="add|change|move|bind", GOTO="mm_whitelist_end"
KERNEL=="ttyS4" ENV{ID_MM_DEVICE_PROCESS}="1",
ENV{ID_MM_TTY_BAUDRATE}="115200", ENV{ID_MM_TTY_FLOW_CONTROL}="rts-cts"
LABEL="mm_whitelist_end"

As you can see I'm setting ID_MM_TTY_BAUDRATE to 115200. Reason for this
is, the modem is capable of autobauding up to a maximum speed of 115200bps,
later on (during ppp) higher bps rates can be set.
I can see ModemManager talking to the modem on the AT stage without issues.
So I'm assuming baudrate/flow control are fine.



>
>
> > 2. I Added a gsm connection to set the APN: (iot.t-mobile.nl)
> > I can see in ModemManager logs how it exchanges a lot of AT commands,
> etc to finally launch PPP. And this is where I'm stuck.
> > After ppp gets launched, if I check the status of the connection using
> nmcli I can see it is "getting ip address" and stays like that forever.
> >
> > I'm attaching the whole log of ModemManager (debug mode). Not sure what
> I'm missing/doing wrong.
> >
>
> You're controlling the connection through NetworkManager, though,
> right? Can you reproduce it and gather both MM and NM debug logs? See
> https://modemmanager.org/docs/modemmanager/debugging/#daemon-debug-logs
>
> --
> Aleksander
>
>
So I performed the requested test
Steps as follows:
1. Just boot my board and switch on the modem (Manual operation using
GPIOSET & friends)
2. Start modemmanager and let it detect the modem.
3. Using nmcli I can see how the modem is detected and identified. Nmcli
displays DEVICE = ttyS4, TYPE=gsm
4. Setup a new connection using nmcli, as follows:
   nmcli c add type gsm ifname ttyS4 con-name 7070_connection apn
iot.t-mobile.nl
5. Connection now stays in "connecting (prepare)" status :(

Some clarifications:

1. The GPIO operations discussed in previous posts: This is required only
before using the modem. NOT during normal operation. For now I added a
systemd service which starts before modemmanager and simply performs the
required operations to guarantee the modem is operational whenever
modemmanager boots.
2. I'm attempting to connect to a "cat-m" network: Not sure how to
"explain" this to ModemManager so it selects the proper band/network before
attempting ppp
3. Baudrate: As it can be seen in the logs, AT commands are working fine at
the configured baudrate, but would be great to change baudrate when
starting ppp. Is this doable?
4. Following the "AT Commands Only" section on this site:
https://docs.iotcreators.com/docs/simcom-sim7070g-waveshare-dev-kit. I can
manage to ping a host from the modem.

So, as usual: Ideas, suggestions and test requests welcomed!

Thank you very much for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20221016/11282a5d/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sim7070g_modemmanager_test.zip
Type: application/zip
Size: 31946 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20221016/11282a5d/attachment-0001.zip>


More information about the ModemManager-devel mailing list