external modem connectivity over usb

pssibr's picture

How can I enable external modem functionality on the AT&T IoT Starter Kit (2nd Gen), as mentioned here: http://cloudconnectkits.org/product/lte-starter-kit-2? (See the comparison with the first gen starter kit.) One of the technical guides says that's not supported, but the current sales page says it is - also AT&T technical sales recently steered me to this device - and the embedded linux software seems to be capable of handling it. A linux board connected to the sk2 via usb enables port ttyACM0 and responds to various AT commands, although the external board I'm working with does not recognize the device as a modem. However, assigning an IPv4 address to the sk2's existing ecm0 interface for usb networking, and modifying the iptables to accept INPUT and FORWARD packets, turns this device into a simple router which linux does recognize as connecting to the internet, but changing these settings from their factory defaults seems like "fighting the firmware".

I can probably get this hack to work in a real iot mode - e.g. not connected to a keyboard and monitor - but is there a simpler and more secure way to achieve connectivity from a separate iot board connected to the sk2 via usb? I'm working with a jetson nano, but any solution for a raspberry pi or other iot linux board should also work. Connectivity either as a standard modem or as a usb network connection will suit my use case, I just need to enable internet connectivity over 4g lte. Thanks.

jflynn129's picture

Not sure I fully understand your question, but if you are wanting to use this as an external modem for say a RPI or other external SBC system, it isn't officialy supported for that configuration.  The intended use case was to have the on-board elinux configured to operate as a standalone solution with no extenral computer needed. There are several demonstration programs available on github that demonstrate that operation/programming.

There was some discussion of enabling an external modem configuration but it was never pursued  beyond internal discussions (I am not familiar with what was included in the released documentatioin documentation).  There was a subsequent firmware release that enabled the secondary UART but the primary UART has an ADB daemon attached to it.

When you connect to the board with the UART/USB, you are communicating with the Apps processor running elinux and it establishes a socket to talk with the modem processor over a radio interface link. To my knowledge WNC did not provide the flexibility to route raw data from the Modem over the RIL to the app process for export which is what is needed to turn this into an external modem.

Hope this helps some.

pssibr's picture

Thanks for responding so quickly. Yes, I want to use the sk2 as an external modem (or equivalent) for a single board computer. Given that the avnet page for the lte-starter-kit-2 advertises default configurations for "LTE Modem + Host (Internal)" and "LTE Modem + Host (External)", that was a reasonable expectation. I also had the same expectation after a phone call with AT&T technical sales. It's disappointing to find that's not officially supported.

I have found that the external usb connection sets up communication with the modem using AT commands over /dev/ttyACM0, which suggests it should be possible to use the device as an external modem, but I have not been able to get that to work. Maybe / presumably the issue is what you mentioned, that raw data from the modem cannot get back to the external computer over usb.

An alternative that also works for my use case would be to use the device as a primitive router, and that I have been able to work out. The embedded linux firmware on the sk2 includes an interface ecm0 which is configured but inactive. Assigning an IP address to that interface activates it, and modifying the iptables to permit INPUT and FORWARD traffic enables data to flow in both directions. An external linux computer then recognizes that interface as a network interface over usb, although I have had to assign an IP address and update the routing table on the external linux computer manually, and sometimes it requires multiple connection attempts before the interface is stable. I'm new to linux network system management, so I don't know if this is a standard approach or a risky hack, but it's working. it seems like there should be an equivalent and presumably more standard way to achieve this same result, either using the bridge interface configured by the firmware on the sk2, or using different startup parameters on the sk2, but I have not worked out either of those options.

dannyzadok's picture

I am also trying to cnnect the board to a PC and to get an internet connection over RNDIS or RMNET. 

Though the kernel messages say that "rndis_qc_init: initialize rndis QC instance", the RNDIS interface does not work.

Does anyone could make it work?