Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22

Thread: usb modem on wl500g?!!

  1. #16
    Join Date
    Dec 2003
    Location
    Czech Republic
    Posts
    270

    Thumbs up

    A good job, Nenik! Thanks for your effort!

  2. #17

    step-by-step please....

    so it works...

    may i ask please make a detailed step-by-step guide on how to make this works?
    for newbie sakes or at least for my slow brain...


    detailed things like, where do i put those file i download from here?
    is it upload using ftp or what?
    where to put username/passwd?
    how to dial? etc...

    btw.
    since it's not so big, why not put all these into the firmware?
    so we all can easily set it up

    tia.
    Last edited by rexster; 14-08-2005 at 04:08.
    aztech adsl router -> asus wl500g w/ 1.9.2.7-5a fw -> linksys wrt54g w/ dd-wrt & hyperwrt as WDS

    http://www.ngobrol.com

  3. #18
    This thread and others here were very helpful for me to get a wl500g conected to the internet with a USB modem (through ISDN, but principle is exactly the same for analogue dialup modem). I wrote a little howto as i went, basically in case i had to start again. I thought the community might like it also. Please let me know if there are any errors, as sometimes its easy to fix a problem and not document it.

    ASUS wl500g USB modem howto.

    After trawling through the forums at wl500g.info and asking questions, I eventually succeeded to get my wl500g connected to the internet with a USB modem via openwrt.
    In my case the USB modem was a Telstra NT1 PlusII ISDN modem, and my wl500g was actually a Mitsubishi Electric R100 (Mitsubishi rebrands them; they are the same thing, I opened up and checked). I assume things are pretty similar with some of the wl500g hacked firmwares - not sure about package support, which is why im using openwrt.

    This assumes you know your way around linux, and the wl-500g. IF you dont, play a little with it. If you can get WPA working (by following one of the various HOW-TOs) then you get this to work too. Most of the info i obtained from:

    http://wl500g.info/showthread.php?t=...ight=usb+modem

    On to it then!

    Install openwrt via bootwait (remember to use the brcm versions). I used squashfs because thats what ive always used.

    Be sure do a

    mtd erase nvram
    reboot

    to get the system clean of the previous firmware, and thus we can start from scratch. IF you know what your doing then this isnt neccessary.

    Install packages from whiterussian packages:

    ipkg install .....

    kmod-usb-core
    kmod-usb-ohci
    kmod-usb-uhci

    And also

    kmod-usb-acm

    usb-acm one wasnt a whiterussian - i found it via google; at openSplot (http://ipkg.hotsplots.de/openSplot/ipkg/). It provides acm.o: I found one compiled (again via google) for a wl-500g hacked firmware (oleg's Wl500g-1.9.2.7-6b.trx) and tested this all out first. For some reason it failed on dependancy check, so the -force-depends option was required.

    Anyway, now i have this:

    root@OpenWrt:/lib/modules/2.4.30# ls
    acm.o ppp_async.o pppox.o usb-ohci.o wlcompat.o
    diag.o ppp_generic.o slhc.o usbcore.o
    et.o pppoe.o uhci.o wl.o

    make a file called 60-acm in /etc/modules.d with the line "acm" in it:

    root@OpenWrt:/etc/modules.d# cat /etc/modules.d/60-acm
    acm

    I also noticed that in /etc/modules.d the file 60-usb-ohci had "ohci" in it, when really it should have been "usb-ohci" to match the module file name in /lib/modules/2.4.30. So i changed that.

    reboot

    plug in the modem and look at dmesg:

    usb-ohci.c: USB OHCI at membase 0xb8004000, IRQ 2
    usb-ohci.c: usb-00:04.0, PCI device 14e4:4715
    usb.c: new USB bus registered, assigned bus number 1
    hub.c: USB hub found
    hub.c: 2 ports detected
    uhci.c: USB Universal Host Controller Interface driver v1.1
    device eth0 entered promiscuous mode
    hub.c: new USB device 00:04.0-1, assigned address 2
    ttyACM0: USB ACM device

    Almost there!!

    Now install the microcom (a small terminal emulator) package:

    ipkg install microcom_1.02-1_mipsel.ipk

    before we can run this to talk to the modem (ie we are looking for AT-OK), we must figure out what device ttyACM0 is - ie it doesnt appear in /dev/usb! The link to it appears to be created as /dev/usb/acm/0

    root@OpenWrt:~# microcom -D/dev/usb/acm/0
    at
    OK

    Yeahaa...so it worked. The ~ character gets you a window in microcom to exit.

    Now to try PPP, and figure out what Telstra do?

    First, install package chat (this is whiterussian package)

    And have to run:

    insmod slhc.o
    insmod ppp_generic.o
    insmod ppp_async.o

    In the end, these should go into /etc/modules:

    root@OpenWrt:~# cat /etc/modules
    et
    wl
    slhc
    ppp_generic
    ppp_async


    Now make up some files:

    root@OpenWrt:/etc/ppp# cat chap-secrets
    #USERNAME PROVIDER PASSWORD IPADDRESS
    yourusername * yourpassword

    root@OpenWrt:/etc/ppp# cat pap-secrets
    yourusername * yourpassword

    root@OpenWrt:/etc/ppp# cat options
    debug
    lock
    auth

    root@OpenWrt:/etc/ppp/peers# cat bigpond
    lock
    /dev/usb/acm/0
    921600
    persist
    noauth
    defaultroute
    noipdefault
    user *yourusername
    connect "chat -t 3 -f /etc/ppp/peers/bigpond_chat"
    usepeerdns
    Note that the default example points chat to /sbin/chat: my chat didnt end up there, and I spent a long time trying to figure this one out.

    root@OpenWrt:/etc/ppp/peers# cat bigpond_chat
    '' 'AT'
    'OK' 'ATZ'
    'OK' 'AT Z !Z=9 !T0=0 !T2=10 !T4=1 E0 V1 &D2 &C1'
    'OK' 'ATDT*your number'
    CONNECT

    Note the long AT Z ... init string is specific to my ISDN modem. This would need to be changed if not using the NT1 PlusII.

    Now that should be about it! Ahh, but the directory /var/lock doesnt exist: pppd has been failing on this due to the lock option.

    mkdir /dev/lock

    pppd call bigpond

    logread

    Jan 1 07:33:05 (none) kern.notice pppd[2180]: pppd 2.4.3 started by root, uid 0
    Jan 1 07:33:10 (none) kern.info pppd[2180]: Serial connection established.
    Jan 1 07:33:10 (none) kern.debug pppd[2180]: using channel 5
    Jan 1 07:33:10 (none) kern.info pppd[2180]: Using interface ppp0
    Jan 1 07:33:10 (none) kern.notice pppd[2180]: Connect: ppp0 <--> /dev/usb/acm/0
    Jan 1 07:33:13 (none) kern.notice pppd[2180]: local IP address 144.139.25.211
    Jan 1 07:33:13 (none) kern.notice pppd[2180]: remote IP address 139.134.58.250


    And the final test:

    root@OpenWrt:/etc# ping www.bigpond.com
    PING www.bigpond.com (144.135.18.32): 56 data bytes
    64 bytes from 144.135.18.32: icmp_seq=0 ttl=245 time=86.6 ms
    64 bytes from 144.135.18.32: icmp_seq=1 ttl=245 time=87.0 ms


    So it works:

    root@OpenWrt:/etc/ppp/peers# pppd call bigpond updetach
    Serial connection established.
    using channel 2
    Using interface ppp0
    Connect: ppp0 <--> /dev/usb/acm/0
    Warning - secret file /etc/ppp/pap-secrets has world and/or group access
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x2***5466> <pcomp> <accomp>]
    rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x****5466> <pcomp> <accomp>]
    rcvd [LCP ConfReq id=0x2 <mru 1524> <auth chap MD5> <asyncmap 0x0>]
    sent [LCP ConfAck id=0x2 <mru 1524> <auth chap MD5> <asyncmap 0x0>]
    rcvd [CHAP Challenge id=0x1 <567d***b>, name = "Dial IP"]
    sent [CHAP Response id=0x1 <77f5***>, name = "*******"]
    rcvd [CHAP Success id=0x1 "\000"]
    CHAP authentication succeeded:
    CHAP authentication succeeded
    sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
    rcvd [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr xx.250>]
    sent [IPCP ConfAck id=0x1 <compress VJ 0f 01> <addr xx250>]
    rcvd [IPCP ConfNak id=0x1 <addr 144.xxxxxx> <ms-dns1 203.49.70.20> <ms-dns3 139.134.2.190>]
    sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr xx51> <ms-dns1 203.xx> <ms-dns3 139.xx>]
    rcvd [IPCP ConfAck id=0x2 <compress VJ 0f 01> <addr xx.51> <ms-dns1 xx.20> <ms-dns3 139xx0>]
    local IP address 144.***********
    remote IP address 139.**********
    primary DNS address 203.49.70.20
    secondary DNS address 139.134.2.190

    Test out a ping:

    root@OpenWrt:/etc/ppp/peers# ping 66.249.89.99
    PING 66.249.89.99 (66.249.89.99): 56 data bytes
    64 bytes from 66.249.89.99: icmp_seq=0 ttl=241 time=228.7 ms
    64 bytes from 66.249.89.99: icmp_seq=1 ttl=241 time=235.8 ms

    Unfortunately DNS isnt working (ie ping www.google.com didnt work), nor is routing via the wireless interface.

    Kill the pppd connection:

    killall pppd

    After some help in forum.openwrt.org (thanks EnderWiggen) i found the solutions. Turned out to be trivial.

    It seems pppd writes the dns obtained to /etc/ppp/resolv.conf, whereas the system looks to /etc/resolv.conf. On my system /etc/resolv.conf points to /tmp/resolv.conf (ie in the ram area), but i dont remember if i set it that way or if thats how it comes. This gets a little confusing now. Either way we have to make symlinks from /etc/ppp/resolv.conf and /etc/resolv.conf to /tmp/resolv.conf

    If the files exist and are linked to /rom/... delete them (rm /etc/resolv.conf) and create the symlink

    root@OpenWrt:/etc# ln -s /tmp/resolv.conf resolv.conf

    in both /etc and /etc/ppp

    Log in again (ie pppd call ...) and check DNS - works! Routing still does not.

    Now there are two ways to skin this cat: the manual way by adding the routes:

    iptables -A FORWARD -i br0 -o ppp0 -j ACCEPT
    iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

    This will be lost on reboot. Another way is to tell the wl-500g that the ppp interface is the connection out to the internet. This is fine if this is always the case (for me it is until i can get ADSL again)

    nvram set wan_ifname=ppp0
    nvram commit
    reboot

    And that should be it.

    You can now run pppd manually, or we can cleanup a few things.

    To /etc/init.d/S10boot add the line:

    mkdir /var/lock

    (ie if you get the read only error, remember to delete the symlink and copy the file back from ROM)

    Now make pppd start up automatically and maintain a permanent connection to the internet, add the last line to inittab. Make sure you really want to do this – it may get expensive if, like me, pppd made 400 calls in one day. Didn’t bother me, as calls to the ISDN modem line are free:

    root@OpenWrt:/etc# cat inittab
    ::sysinit:/etc/init.d/rcS
    ::shutdown:/sbin/halt
    tts/0::askfirst:/bin/ash --login
    ::respawn:/usr/sbin/pppd call bigpond nodetach

    Now reboot and make sure the connection fires up automatically.

    A few possible bugs ive noticed:

    If the modem is disconnected from the USB port in a particular way (I think if pppd is still running) then when it is plugged back in it may be assigned /dev/usb/acm/1 and thus you wont be able to dial it. Easy way around this is to instruct family member how to power cycle the wl500g.

  4. #19
    Join Date
    Aug 2005
    Location
    Bratislava, Slovakia, Europe
    Posts
    21

    Thanx for great effort, but...

    ...but I have a problem.
    I get everything to work according to your guide, but:
    - I use pppd from Oleg's firmware (and so I use the chat program). Probably because of this the pppd asks for scripts in the /tmp/ppp directory.
    - the GPRS config file has a wrong name of the chat file (the config asks for gprs_chat and the filename is gprs-connect-chat) - costed me a fortune of time to find out this tiny thing
    - everytime I try to connect to the internet using pppd call gprs nodetach I get following result:
    Code:
    OK
    
    OK
    
    OK
    AT+CGDCONT=1,"IP","internet"
    OKSerial connection established.
    using channel 3
    Using interface ppp0
    Connect: ppp0 <--> /dev/usb/tts/0
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x226a0382> <pcomp>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x226a0382> <pcomp>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x226a0382> <pcomp>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x226a0382> <pcomp>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x226a0382> <pcomp>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x226a0382> <pcomp>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x226a0382> <pcomp>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x226a0382> <pcomp>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x226a0382> <pcomp>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x226a0382> <pcomp>]
    LCP: timeout sending Config-Requests
    Connection terminated.
    Receive serial link is not 8-bit clean:
    Problem: all had bit 7 set to 0
    and the syslog contains a lot of lines with
    Code:
    Jan  3 10:21:56 kernel: pl2303.c: pl2303_read_int_callback - usb_submit_urb failed with result -22
    The phone seems to freeze and after the error message I get a phone restart.

    Can you give me some advice where to search for some solution?
    Thanx in advance.

  5. #20

    acm.o and Nokia 7610 cell phone

    I'm trying to connect a Nokia 7610 to my wl500g router via a DKU-2 USB cable, so I can recieve SMS messages.
    Unfortunately it seems that acm.o wont recognize the phone so ttyACM0 wont get loaded/initialized.
    The Nokia 7610 has USB vend/prod 0x421/0x411.
    I've tried with a bootable Knoppix CD (3.9). There the phone work fine and get recognized as /dev/ttyACM0. Then I tried microcom and there were no problems communicating with the phone.
    Is it because acm.o needs updating with a vendor/prod list or can I "force" Linux to recognize the phone with the acm.o module?

    BTW: Running on firmware 1.9.2.7-6b with a USB-harddisk mounted as /opt. Also tried to "insmod usbserial" before loading acm.o with the same result...

    Here are some input/output from the router:

    Code:
    Shell:
    [xxx /opt/microcom]$ insmod /opt/microcom/acm.o
    Using /opt/microcom/acm.o
    
    Syslog:
    usb.c: registered new driver acm
    acm.c: v0.21:USB Abstract Control Model driver for USB modems and ISDN adapters
    hub.c: new USB device 00:04.0-1.2, assigned address 7
    usb.c: USB device 7 (vend/prod 0x421/0x411) is not claimed by any active driver.
    
    Shell:
    [xxx /opt/microcom]$ lsmod
    Module                  Size  Used by
    acm                     6380   0 (unused)
    usb-storage            62144   3
    sd_mod                 13268   6
    scsi_mod               70176   2 [usb-storage sd_mod]
    audio                  50120   0 (unused)
    soundcore               5280   0 [audio]
    printer                12652   0 (unused)
    lp                      8628   0
    parport_splink          2956   1
    parport                25664   1 [lp parport_splink]
    usb-ohci               21764   0 (unused)
    usbcore                77224   1 [acm usb-storage audio printer usb-ohci]
    wl                    420904   0 (unused)
    et                     34912   0 (unused)
    
    [xxx /opt/microcom]$ cat /proc/bus/usb/drivers
             usbdevfs
             hub
      0- 15: usblp
             audio
             usb-storage
             acm
    
    [xxx /opt/microcom]$ cat /proc/bus/usb/devices
    T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
    B:  Alloc= 11/900 us ( 1%), #Int=  1, #Iso=  0
    D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
    P:  Vendor=0000 ProdID=0000 Rev= 0.00
    S:  Product=USB OHCI Root Hub
    S:  SerialNumber=b8004000
    C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
    I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
    E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms
    T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 4
    D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=04b4 ProdID=6560 Rev= 0.09
    C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
    I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
    E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=255ms
    T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  7 Spd=12  MxCh= 0
    D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=0421 ProdID=0411 Rev= 0.00
    S:  Manufacturer=Nokia
    S:  Product=Nokia 7610
    S:  SerialNumber=0123456789
    C:* #Ifs= 7 Cfg#= 1 Atr=c0 MxPwr= 30mA
    I:  If#= 0 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=08 Prot=00 Driver=(none)
    I:  If#= 1 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=0b Prot=00 Driver=(none)
    I:  If#= 2 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
    I:  If#= 2 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
    E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
    E:  Ad=03(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
    I:  If#= 3 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=0b Prot=00 Driver=(none)
    I:  If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
    I:  If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
    E:  Ad=87(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
    E:  Ad=08(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
    I:  If#= 5 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=(none)
    E:  Ad=84(I) Atr=03(Int.) MxPS=   8 Ivl=128ms
    I:  If#= 6 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
    E:  Ad=8c(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
    E:  Ad=09(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
    T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  4 Spd=1.5 MxCh= 0
    D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
    P:  Vendor=10cf ProdID=5500 Rev= 0.00
    S:  Manufacturer=Velleman
    S:  Product=USB K8055
    C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
    I:  If#= 0 Alt= 0 #EPs= 2 Cls=03(HID  ) Sub=00 Prot=00 Driver=(none)
    E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
    E:  Ad=01(O) Atr=03(Int.) MxPS=   8 Ivl=10ms
    T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=03 Dev#=  5 Spd=12  MxCh= 0
    D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=067b ProdID=2507 Rev= 1.00
    S:  Manufacturer=Prolific Technology Inc.
    S:  Product=Mass Storage Device
    C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
    I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
    E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
    --
    I am Bill Gates of Borg. Resistance is futile. You will be assimil-
    --- Error - General protection fault in module "BORG.EXE"

  6. I was wondering if anyone succeeded in doing ISDN-dialin?

    What I mean, to dial in to the ASUS box with USB ISDN-modem from another PC with ISDN card (as a way to reach the remote router via a telephone line if the network connection doesn't work).
    WPKG - http://wpkg.org
    Software deployment / silent installation with Samba

  7. Quote Originally Posted by mangoo View Post
    I was wondering if anyone succeeded in doing ISDN-dialin?

    What I mean, to dial in to the ASUS box with USB ISDN-modem from another PC with ISDN card (as a way to reach the remote router via a telephone line if the network connection doesn't work).
    I described setting up ISDN dialin and dialout here: http://wpkg.org/index.php/Configurin...m_command_line

    The instructions are generic, can be used on any Linux system, including our ASUS boxes.
    WPKG - http://wpkg.org
    Software deployment / silent installation with Samba

Page 2 of 2 FirstFirst 12

Similar Threads

  1. USB ADSL Modem
    By fabiosantos in forum WL-500g Q&A
    Replies: 45
    Last Post: 19-09-2008, 09:44
  2. USB Modem
    By Rom666 in forum WL-500g Q&A
    Replies: 2
    Last Post: 25-03-2007, 16:45
  3. Set up USB CDMA modem
    By bverbrugge in forum WL-500g Q&A
    Replies: 2
    Last Post: 31-05-2005, 10:24
  4. wl500g and linksys cable modem
    By bayoe in forum WL-500g Q&A
    Replies: 2
    Last Post: 09-12-2004, 22:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •