Controlling secondary wp module modem

Hi all,

I have a mangOH board with primary and secondary wp modules inserted. I’ve configured the resistors according to the mangoh user guide to route the second sim slot to the secondary module.

But how can I control the secondary module with legato ? If I save the apn details for the secondary to a new profile, for instance, I can’t use the cm tool to start a data connection with that profile. But can I do it programmatically via the legato modem service, and how ? Is it even possible to associate a data profile with a secondary module, then use the modem Service api with that profile ?

And, on the mangOH, the secondary is connected to the primary via the on-board usb hub, but the secondary doesn’t get an address from dhcp so what exactly is the point of that usb connection and how is it used ? Is it via AT commands ?

Update: ok, so I detect it as a usb device, dmesg says its a Sierra modem and it gets a tty port, but how then to configure it, eg set the apn or change network options ? This would require some kind of driver on the primary surely ?

Is there an equivalent of qmi-network.conf or a way to send AT commands to the secondary module ?

Hi mahtab,

Yes, secondary module will connect to primary thru USB.
Using /etc/legato/usbmode setting on secondary WP, you can define and enable specific USB endpoint on your secondary WP.

Depends on your use case with two WP on MangOH, for example, you may set ECM on secondary WP, then primary WP can talk to 2nd WP over TCP/IP using ethernet usb0 interface.
(on primary WP, send “ifconfig usb0 up” then you can ping secondary by “ping”).

Hope it helps.

Hi @lotam,

thanks for answering, that’s great, but how would you set ECM and enable a usb endpoint on the secondary when, for example, the module is soldered to the board ? I mean, as I understand your answer, I could put the secondary into the primary slot, configure it as an endpoint and then put it back into the secondary slot, but how would I do that without being able to pre-prepare the secondary ?

OK, using a brand new WP module out of the box as the secondary ( I’d used the previous secondary for other things ), I now get three /dev/ttyUSB* devices, the third one - /dev/ttyUSB3 responds to AT commands from the primary !

I also can see a usb0 and usb1 when I do an ip addr…is this usb1 likely to be the secondary module ? I can get it up as an interface with an ip using ifconfig but I can’t for example ssh to it. So I’m not sure what this usb1 is. The end point I’m trying to get to is an interface on the primary that behaves like a modem and the ability to configure details on the secondary like apns, network preferences and so on, from the primary.

Hi mahtab,
Yes, latest software package may have ECM enabled by default, refer to AT cmd guide (!USBCOMP) if need to configure it.

About two usb0/1 in ifconfig, I think usb0 is the USB eth on primary (connect to your PC), while usb1 is from USB eth connect to secondary WP.
Both use by default, so to avoid conflict, please try on your primary WP:

ifconfig usb0
ifconfig usb1 up

Then the primary WP can access secondary using TCP/IP


Thanks @lotam,

That’s cleared it all up now, I can access the secondary from the primary ! :grin:

I did it a slightly different way to your suggestion, I used configEcm on the primary to move it to and then usb1 came up as the secondary exactly as you said it would.

I can’t ping from the primary when the secondary has a data connection, would that require adding some forwarding rules to the primary / secondary ? How is it possible to make the primary see the secondary cellular interface ?

Edit: When connecting a wp device to a windows pc (with Sierra drivers), as well as the ECM interface showing up in ipconfig, windows recognizes the cellular interface and that it can route traffic through it, without any intervention or configuration. This is where I need to get to, where the primary can route traffic through the secondary wp module’s interface. I thought just connecting the primary and secondary and then starting a data connection on the secondary would automatically provide the primary with an interface that it could route externally bound traffic through.