OpenWrt Forum Archive

Topic: Modem Help - RNDIS - uBlox Toby L2 (L201)

The content of this topic has been archived on 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello All,

I am trying to successfully operate the uBlox Toby L201 in USA / California. (AT&T). SIM has been confirmed working with another modem.

Everything I can tell points to the fact this is a RNDIS modem (not typically something I have worked with).
Drivers
cdc_acm driver provides ttyACM0(at commands)
rndis_host driver provides usb0(net)

I am not able to get an IP address.

I have read through the wiki here:
https://wiki.openwrt.org/doc/recipes/et … rusb_rndis

I'm not sure the RNDIS is being handled correctly by the system.

See below logs, let me know what else I can provide, as well as what else I need to try.

Thank you for your help!
-Ryan



Log information:

root@OpenWrt:/# cat /etc/config/network 
config interface 'wan'
    option ifname 'usb0'
    option proto 'dhcp'
    option apn 'm2m.com.attz'
    option autoconnect '0'

root@OpenWrt:/# zcat /proc/config.gz | grep RNDIS
CONFIG_USB_NET_RNDIS_HOST=m
CONFIG_USB_F_RNDIS=m
CONFIG_USB_ETH_RNDIS=y

root@OpenWrt:/# cat  /sys/kernel/debug/usb/devices

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  5 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1546 ProdID=1146 Rev= 1.00
S:  Manufacturer=u-blox
S:  Product=MODEM-LTE
S:  SerialNumber=000000000100
C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03
A:  FirstIf#= 2 IfCount= 2 Cls=02(comm.) Sub=02 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm
E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

root@OpenWrt:/# ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:6940 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6940 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:471948 (460.8 KiB)  TX bytes:471948 (460.8 KiB)

usb0      Link encap:Ethernet  HWaddr 16:B7:91:9C:F3:E2  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@OpenWrt:/# ls /dev/tty*
/dev/tty      /dev/ttyS0    /dev/ttymxc0  /dev/ttymxc4
/dev/ttyACM0  /dev/ttyS1    /dev/ttymxc1
root@OpenWrt:/# lsusb
Bus 003 Device 001: ID 1d6b:0002
Bus 002 Device 005: ID 1546:1146
Bus 001 Device 001: ID 1d6b:0002
Bus 004 Device 001: ID 1d6b:0003
Bus 002 Device 001: ID 1d6b:0002

root@OpenWrt:/# cat /etc/banner
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 Gateworks Gateworks Ventana 18.02@2064b9b, r5904+5-94f5a7c
 -----------------------------------------------------
root@OpenWrt:/# uname -r
4.14.13
config interface 'wan'
    option ifname 'usb0'
    option proto 'dhcp'
    option apn 'm2m.com.attz'
    option autoconnect '0'

You can't set the APN in a RNDIS network like that.  It needs to be pre-stored inside the modem.  First get the modem configured and working on a desktop or laptop.  The wan network should just be proto dhcp and ifname usb0.  If the modem is properly configured it should issue a DHCP address.

(Last edited by mk24 on 7 Feb 2018, 14:54)

Thank you mk24.

So I removed this and set the APN in the AT commands.

Now, it appears I'm connected with an IP address (according to the AT commands) but I'm afraid the IP is not attaching to usb0 in ifconfig.

I'm thinking this has to do with the proto 'dhcp' script. Perhaps it doesn't handle this? (/lib/netifd/proto/dhcp.sh )

See below logs:

at+cgdcont?
+CGDCONT: 4,"IP","m2m.com.attz.mnc170.mcc310.gprs","10.48.106.159",0,0,0,0,0,0

root@OpenWrt:/# ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:264 errors:0 dropped:0 overruns:0 frame:0
          TX packets:264 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:18008 (17.5 KiB)  TX bytes:18008 (17.5 KiB)

usb0      Link encap:Ethernet  HWaddr 7A:55:EA:4B:8E:57  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
root@OpenWrt:/# cat /etc/config/network 

config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config globals 'globals'
    option ula_prefix 'fd1b:0829:ac90::/48'

config interface 'wan'
    option ifname 'usb0'
    option proto 'dhcp'
    option autoconnect '0'

I have never used autoconnect '0'.  It sounds like something that might, prevent it from automatically connecting?

mk24 wrote:

I have never used autoconnect '0'.  It sounds like something that might, prevent it from automatically connecting?

This is required by another one of the modems we use, but I have tried with and without this and neither work.

As a side note, I have this modem + SIM + board all working on Ubuntu and the usb0 interface gets a 192.168.1.100 IP address after issuing a dhclient command to the usb0.

At this point, I have also tried now statically setting the IP of the usb0 interface on OpenWrt but still cannot ping 8.8.8.8 as the wan. I understand this could be do to some routing, so I also added statically the same routing from Ubuntu into OpenWrt with no luck.

Obviously, I would like to avoid all the static setting if I could get usb0 to grab the IP automatically.

**** ISSUE SOLVED *****

There were two usb interfaces being populated on the system, usb0 and usb1.

As soon as I changed to usb1, everything started working.

So to recap:

  • Set the APN on the modem with AT commands

  • Config shown below:

config interface 'wan'
    option ifname 'usb1'
    option proto 'dhcp'

Actually very simple, just had to get through a few things! smile

The discussion might have continued from here.