OpenWrt Forum Archive

Topic: Kamikaze 7.09 on WL-500gP with Verizon USB720 as WAN interface

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

I've been putting together the subject configuration for a friend's use, and thought I'd document it here in the hopes of helping some others...
  I chose the WL-500gP because it seemed to have the most capability (ram/flash & USB) for the $$.  I've been wandering all over the net, gathering info on all the pieces, and have yet to find someone who has treaded exactly this path before.  The following URL's have been most helpful:

http://josefsson.org/grisslan/internet.html
http://www.evdoforums.com/thread6621-0-asc.html
http://kenkinder.com/evdo-pc5740/
and of course:
http://downloads.openwrt.org/kamikaze/d … -80001.2.1

I have the basic functionality working, in that I can connect to the verizon network, and have had as many as three workstations (both wired and wifi) sharing the connection at one time.  I haven't really stress-tested it, in fact, I haven't asked it to stay up for more than an hour at a time.  But in the limited time I've used it, I've experienced no crashes or lockups.
  Where I'm at right now, I still have to ssh into openwrt and issue an `ifup wan` command.  I would like to get it to the point that the WAN link would be started automatically at boot, and maintained using the normal ppp 'demand dial' mechanism.  I've looked thru the /etc/init.d scripts, and at first glance it appears that the usb system is initialized before the network is brought up, but maybe not early enough?  The network start script issues an `ifup -a` command, but I don't find a /etc/network/interfaces in this distro, so I'm assuming ifup has been customized for openwrt to look elsewhere, but where?  If it's looking at /etc/config/network, then maybe it's a race condition, and the USB hardware isn't fully initialized when the ifup -a command is issued.

  Most of the howtos I've found, like the first URL above, talk about doing such a thing on the Linksys WRT54g3g with a PCMCIA EVDO card.  That hardware has a specific '3g' button, and '3g' LEDs.  I haven't found any documentation that indicates the LEDs on the WL-500gP can be software controlled, so even though I could probably bind the 'ezsetup' button to toggle `if(up|down) wan`, I don't know how to reflect the state externally.  My friend is non-technical, so I've got to make this automatic, or at least simple and obvious.

  As I get these last issues ironed out, I intend to publish all my config tweaks.  Would the 'howto's' section of the forum be the place, or the openwrt wiki?

If you have some time to go look at how another firmware does it have a look at this thread using Olegs firmware on the same router. Its currently what I am using for something pretty similar (usb modem to a 3G network) while I figure out exactly how to get it working with openwrt. Its my only access so need to know its going to work before I start playing with the config too much.....

http://www.wl500g.info/showthread.php?t=10249

The poster in that threat engy may have some pointers at least if you ask him as well.

I'm trying to do the same thing as the subject here without success, can someone help steer me in the right direction?  I have built my own Kamikaze 7.09 firmware from a recent subversion checkout and flashed it to my Asus wl500Gp, no problem.  I am using a 2.6 kernel (I don't care about wifi) and it seems that I can't get the airprime driver configured for my usb720 device.

Here is a log of hopefully the most pertinent info:

root@OpenWrt:~# uname -a
Linux OpenWrt 2.6.23.16 #1 Fri May 16 14:08:57 HST 2008 mips unknown

KAMIKAZE (bleeding edge, r11144) -------------------

I added this to my airprime.c code (the list was empty from my svn checkout)

       { USB_DEVICE(0x1410, 0x2110) }, /* Novatel Wireless U720


tail dmesg:

hub 4-0:1.0: USB hub found
hub 4-0:1.0: 4 ports detected
usbcore: registered new interface driver cdc_acm
drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
drivers/usb/serial/usb-serial.c: USB Serial support registered for airprime
usbcore: registered new interface driver airprime

Plug in usb720 & the following is added at the end of dmesg:

usb 2-1: new full speed USB device using uhci_hcd and address 2
usb 2-1: configuration #1 chosen from 1 choice

root@OpenWrt:~# lsusb
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 002: ID 1410:2110
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000




root@OpenWrt:/dev# ipkg list_installed
base-files-brcm47xx - 12-r11144 -
bridge - 1.0.6-1 -
busybox - 1.8.2-1 -
cfdisk - 2.13.0.1-1 -
chat - 2.4.3-10 -
comgt - 0.32-1 -
dnsmasq - 2.41-1 -
dropbear - 0.50-3 -
gkrellmd - 2.3.1-1 -
glib1 - 1.2.10-1 -
hotplug2 - 0.9+r102-2 -
hwclock - 2.13.0.1-1 -
iptables - 1.4.0-1 -
kernel - 2.6.23.16-brcm47xx-1 -
kmod-diag - 2.6.23.16-brcm47xx-4 -
kmod-fs-ext2 - 2.6.23.16-brcm47xx-1 -
kmod-fs-ext3 - 2.6.23.16-brcm47xx-1 -
kmod-fs-vfat - 2.6.23.16-brcm47xx-1 -
kmod-fs-xfs - 2.6.23.16-brcm47xx-1 -
kmod-ipt-nathelper - 2.6.23.16-brcm47xx-1 -
kmod-nls-base - 2.6.23.16-brcm47xx-1 -
kmod-ppp - 2.6.23.16-brcm47xx-1 -
kmod-pppoe - 2.6.23.16-brcm47xx-1 -
kmod-scsi-core - 2.6.23.16-brcm47xx-1 -
kmod-switch - 2.6.23.16-brcm47xx-1 -
kmod-tun - 2.6.23.16-brcm47xx-1 -
kmod-usb-acm - 2.6.23.16-brcm47xx-1 -
kmod-usb-core - 2.6.23.16-brcm47xx-1 -
kmod-usb-ohci - 2.6.23.16-brcm47xx-1 -
kmod-usb-serial - 2.6.23.16-brcm47xx-1 -
kmod-usb-serial-airprime - 2.6.23.16-brcm47xx-1 -
kmod-usb-storage - 2.6.23.16-brcm47xx-1 -
kmod-usb-uhci - 2.6.23.16-brcm47xx-1 -
kmod-usb2 - 2.6.23.16-brcm47xx-1 -
libgcc - 4.1.2-12 -
liblzo - 2.02-1 -
libncurses - 5.6-1 -
libopenssl - 0.9.8e-3 -
libpcap - 0.9.4-1 -
libpthread - 0.9.29-12 -
libuci - 0.3.4-1 -
libusb - 0.1.12-1 -
microcom - 1.02-1 -
mount-utils - 2.13.0.1-1 -
mtd - 6 -
nano - 2.0.7-1 -
openvpn - 2.0.9-2 -
ppp - 2.4.3-10 -
ppp-mod-pppoe - 2.4.3-10 -
robocfg - 0.01-1 -
tcpdump - 3.9.8-1 -
uci - 0.3.4-1 -
uclibc - 0.9.29-12 -
udev - 106-1 -
udevextras - 106-1 -
udevtrigger - 106-1 -
usbutils - 0.73-1 -
wireless-tools - 29-2 -
zlib - 1.2.3-5 -
Done.

root@OpenWrt:/dev# insmod airprime
insmod: cannot insert '/lib/modules/2.6.23.16/airprime.ko': invalid parameters (17): Invalid argument


root@OpenWrt:/etc/modules.d# ls -la
drwxr-xr-x    2 root     root            0 Jan  1 00:16 .
drwxr-xr-x   13 root     root            0 May 17  2008 ..
-rw-r--r--    1 root     root            9 May 17  2008 20-nls-base
-rw-r--r--    1 root     root            9 May 17  2008 20-scsi-core
-rw-r--r--    1 root     root           35 May 17  2008 20-switch
-rw-r--r--    1 root     root            8 May 17  2008 20-usb-core
-rw-r--r--    1 root     root            5 May 17  2008 30-fs-ext2
-rw-r--r--    1 root     root            9 May 17  2008 30-fs-ext3
-rw-r--r--    1 root     root            9 May 17  2008 30-fs-vfat
-rw-r--r--    1 root     root            4 May 17  2008 30-fs-xfs
-rw-r--r--    1 root     root           37 May 17  2008 30-ppp
-rw-r--r--    1 root     root            4 May 17  2008 30-tun
-rw-r--r--    1 root     root           86 May 17  2008 40-ipt-nathelper
-rw-r--r--    1 root     root            7 May 17  2008 40-scsi-core
-rw-r--r--    1 root     root            9 May 17  2008 50-usb-ohci
-rw-r--r--    1 root     root            9 May 17  2008 50-usb-uhci
-rw-r--r--    1 root     root            9 May 17  2008 50-usb2
-rw-r--r--    1 root     root            8 May 17  2008 60-usb-acm
-rw-r--r--    1 root     root           10 May 17  2008 60-usb-serial
-rw-r--r--    1 root     root           28 May 17  2008 60-usb-storage
-rw-r--r--    1 root     root            9 May 17  2008 65-usb-serial-airprime

root@OpenWrt:/etc/modules.d# cat *
nls_base
scsi_mod
switch-core
switch-robo
switch-adm
usbcore
ext2
jbd
ext3
fat
vfat
xfs
crc-ccitt
slhc
ppp_generic
ppp_async
tun
nf_conntrack_ftp
nf_nat_ftp
nf_conntrack_irc
nf_nat_irc
nf_conntrack_tftp
nf_nat_tftp
sd_mod
ohci-hcd
uhci-hcd
ehci-hcd
cdc-acm
usbserial
scsi_mod
sd_mod
usb-storage
airprime

=-=-=-=-

Any ideas on how to make the wl500Gp recognize the usb720 (I presume as /dev/ttyUSB0)?  I have no problem with the USB720 in ubuntu, but I can't figure out the configuration on openWRT.  Thank you!

Still no success with recognizing my USB720.  It seems like the one thing possibly different between my setup and working tutorials is that I can't find kmod-usb-uhci-iv.  When I attempt to install it via the feeds, I get no error; in the following example I also try to install something nonexistant just for comparison:

$ cd ~/Svn/openwrt/kamikaze
$ ./scripts/feeds install kmod-usb-uhci-iv
$ ./scripts/feeds install xxxTMPxxx
WARNING: No feed for package 'xxxTMPxxx' found, maybe it's already part of the standard packages?

However, even after doing the above, there is no file named "*uhci-iv*" in my source code.

If I try to install the kmod-usb-uhci-iv module it fails, regardless of whether ipkg gets its sources from the internet or is pointed at my build:

root@OpenWrt:/etc# ipkg install kmod-usb-uhci-iv
Nothing to be done
An error ocurred, return value: 4.
Collected errors:
Cannot find package kmod-usb-uhci-iv.
Check the spelling or perhaps run 'ipkg update'


Might the missing kmod-usb-uhci-iv be related to my inability to recognize the USB720 EVDO modem?  Any ideas or pointers?

Thanks again.

More evidence of my flailing with tips that seemed to work for others:

root@OpenWrt:~# rmmod usbserial
rmmod: usbserial
root@OpenWrt:~# insmod usbserial vendor=0x1410 product=0x2110
insmod: cannot insert '/lib/modules/2.6.25.4/usbserial.ko': invalid parameters (17): Invalid argument

I use the USB720 in a WRTSL54G with the EVDO Forums r82 Evdowizard build (White Russian w/X-Wrt moded Webif2) I use the same settings with it as I do with my WRT54G3G-ST w/V740 Express Card in a XCA-3 Novatel CardBus adapter (flashed both with same firm).

I just put Kamikaze 7.09 (2.4 Kernal) w/X-WRT Webif2 on the WRT54G3G-ST and have it working but the Webif interface is for UMTS/GPRS so doing all settings with File Editor and slowly changing the webif pages so to be able to enter CDMA settings and comment out useless UMTS/GPRS stuff that slows ppp0 connect etc.

I have some un-necessary packages installed but it's a work in progress and I plan to do a build at some point thats lean and suited to my use.

USB Status looks like this:

USB Devices
All connected devices (excluding system hubs)
Bus Device      Product                       Manufacturer           VendorID:ProdID           USB version          Speed
02      2         Novatel Wireless CDMA  Novatel Wireless Inc.  1410:1120                    1.10                  12 Mbps


Mounted USB / SCSI devices


Loaded USB drivers
hub
serial
usbdevfs


My package list looks like this:

Package: bandwidthd
Version: 2.0.1-1

Package: base-files-brcm-2.4
Version: 10-11447

Package: bridge
Version: 1.0.6-1

Package: busybox
Version: 1.4.2-2

Package: chat
Version: 2.4.3-8

Package: comgt
Version: 0.32-1

Package: dnsmasq
Version: 2.39-1

Package: dropbear
Version: 0.50-2

Package: haserl
Version: 0.8.0-2

Package: hotplug2
Version: 0.9+r102-2

Package: iptables
Version: 1.3.7-1

Package: iptables-mod-extra
Version: 1.3.7-1

Package: kernel
Version: 2.4.34-brcm-1

Package: kmod-brcm-wl
Version: 2.4.34+4.80.53.0-1

Package: kmod-diag
Version: 2+2.4.34-brcm-1

Package: kmod-ipt-extra
Version: 2.4.34-brcm-1

Package: kmod-ipt-nathelper
Version: 2.4.34-brcm-1

Package: kmod-nozomi
Version: 2.4.34+060209-brcm-1

Package: kmod-pcmcia
Version: 2.4.30-brcm-5

Package: kmod-pcmcia-core
Version: 2.4.34-brcm-1

Package: kmod-pcmcia-serial
Version: 2.4.34-brcm-1

Package: kmod-ppp
Version: 2.4.34-brcm-1

Package: kmod-pppoe
Version: 2.4.34-brcm-1

Package: kmod-switch
Version: 2.4.34-brcm-1

Package: kmod-usb-core
Version: 2.4.34-brcm-1

Package: kmod-usb-ohci
Version: 2.4.34-brcm-1

Package: kmod-usb-serial
Version: 2.4.34-brcm-1

Package: kmod-usb-serial-ftdi
Version: 2.4.34-brcm-1

Package: kmod-usb-uhci
Version: 2.4.34-brcm-1

Package: kmod-usb-uhci-iv
Version: 2.4.34-brcm-1

Package: kmod-usb2
Version: 2.4.34-brcm-1

Package: kmod-wlcompat
Version: 2.4.34+brcm-6

Package: libgcc
Version: 3.4.6-10

Package: libgd
Version: 2.0.33-2
Depends: libjpeg, libpng

Package: libjpeg
Version: 6b-1

Package: libpcap
Version: 0.9.4-1

Package: libpng
Version: 1.2.8-1

Package: libusb
Version: 0.1.12-1

Package: mtd
Version: 5

Package: nas
Version: 4.80.53.0-1

Package: ntpclient
Version: 2003_194-4

Package: nvram
Version: 1

Package: pcmcia-cs
Version: 3.2.8-1

Package: pcmcia-utils
Version: 3.2.8-1

Package: ppp
Version: 2.4.3-8
Depends: kmod-ppp

Package: ppp-mod-pppoe
Version: 2.4.3-8

Package: uclibc
Version: 0.9.28-10

Package: webif
Version: 0.3-11

Package: wireless-tools
Version: 29-1

Package: wlc
Version: 4.80.53.0-1

Package: zlib
Version: 1.2.3-4

My config looks like this at this point:
#### VLAN configuration
config switch eth0
    option vlan0    '0 1 2 3 5*'
    option vlan1    '4 5'


#### Loopback configuration
config interface loopback
    option ifname    "lo"
    option proto    static
    option ipaddr    127.0.0.1
    option netmask    255.0.0.0


#### LAN configuration
config interface lan
    option type     bridge
    option ifname    "eth0.0"
    option proto    static
    option ipaddr    '192.168.0.10'
    option netmask    255.255.255.0
    option dns    '192.168.0.10'
    option nat    '1'
    option gateway    '192.168.0.10'

#### WAN configuration
config interface wan
        option ifname    'ppp0'
        option proto    '3g'
        option device   '/dev/usb/tts/0'
        option mtu    '1500'
        option ppp_redial    'demand'
        option defaultroute    '1'

Chat script I added the Verizon dial number #777 inplace of the $NUM variable since the Webif didn't provide an input and commented out the $APN variable since it's not needed for Verizon:

ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT ERROR ABORT 'NO CARRIER' ABORT DELAYED
'' AT
OK ATZ
#OK $APN
TIMEOUT 20
OK ATD#777
CONNECT ''

As per http://josefsson.org/grisslan/internet.html  I commented out the following in “/lib/network/3g.sh"  as per his instructions to stop a UMTS/GPRS related 'modem' handshake error:

#       if gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | grep Novatel 2>/dev/null >/dev/null; then
#               case "$service" in
#                       umts_only) CODE=2;;
#                       gprs_only) CODE=1;;
#                       *) CODE=0;;
#               esac
#               mode="AT\$NWRAT=${CODE},2"
#       else
#               case "$service" in
#                       umts_only) CODE=1;;
#                       gprs_only) CODE=0;;
#                       *) CODE=3;;
#               esac
#               mode="AT_OPSYS=${CODE}"
#       fi
#
#       PINCODE="$pincode" gcom -d "$device" -s /etc/gcom/setpin.gcom || {
#               echo "$cfg(3g): Failed to set the PIN code."
#               set_3g_led 0 0 0
#               return 1
#       }
#       MODE="$mode" gcom -d "$device" -s /etc/gcom/setmode.gcom

After doing an intial ifup wan or Connect via PPPoE Status page the dial on demand seems to work.

Crude at this point but working and it's a learning experiance I'm enjoying. If I can provide more info shout. Not sure if the WRTSL54GS White Russian info will help but if you need that info I'll happily post it.

(Last edited by Rangerw on 16 Jun 2008, 05:45)

Hi Rangerw,

Thanks for the reply, much appreciate the success story with similar hardware & I will consider trying something like your solution if I can't get 2.6 kernel working.  If you have a chance to test your throughput, I'd be interested in hearing about that, and also if your combination is stable & reliable.

My impression is that the 2.6 kernel and airprime driver might deliver better bandwidth, though I'm not sure why it seems less plug & play for others than in my configuration.  I wonder what is needed to see the EVDO modem on /dev/ttyUSB0, does it just work for anyone 'out of the box'?

Thanks for the White Russian offer, I may consider that in the future but at this time, I'm going to look for a Kamikaze solution.

Thanks again for your help, I will read everything you post about EVDO solutions.

Sorry I haven't checked in in so long.  I got that box working, delivered it, and went on to other projects....  Then another friend asked me to build one for him, so I had to go back and find my notes.
BTW, this is done on the original model.  I understand V2 is different hardware, and I haven't tried one of those yet.

So here's what I had to do:

Install kamikaze.
Log in via ssh as root.

ipkg update
ipkg install kmod-usb-core kmod-usb-ohci kmod-usb-uhci kmod-usb2 kmod-usb-serial chat comgt
cd  /etc/config
nano network
  (scroll to the bottom and edit the WAN section as follows:)

#### WAN configuration
config interface    wan
#    option ifname    "eth0.1"
#    option proto    dhcp
    option ifname     'ppp0'
    option proto    '3g'
    option device    '/dev/ttyUSB0'
# put your modem's phone number here:
    option username  'xxxxxxxxxxx@vzw3g.com'
    option password    'dontcare'
    option demand     '300'
# pincode is last four digits of phone #
    option pincode    'xxxx'

  (save it.)

cd  /etc/chatscripts
nano 3g.chat

ABORT   BUSY
ABORT   'NO CARRIER'
ABORT   ERROR
ABORT   'NO DIALTONE'
ABORT   'NO ANSWER'
REPORT  CONNECT
TIMEOUT 10
""      "ATTEV1&F&D2&C1&c2S0=0S7=60"
OK      "AT+CSQ;D#777"
TIMEOUT 70
CONNECT ' '

(save it.)

cd  /etc/init.d
nano done

   (insert two lines at the bottom, just inside the closing brace:)

        set_state done

        # bring up EVDO WAN
        ifup wan
}

save it.


That's it!  log out, power down, plug in the USB720, power up, and enjoy!

Hi.

I wonder if the comgt [1] package is useful for you? It has chatscripts or grps, umts, evdo and cdma. It also extends the network configuration so that one can specify "proto evdo" there without having to resort to custom scripts.

[1] https://dev.openwrt.org/browser/trunk/package/comgt

~ JoW

The discussion might have continued from here.