NSLU2-Linux
view · edit · print · history

HowTo.AddUsb3gModem History

Hide minor edits - Show changes to markup

May 13, 2008, at 10:52 AM by bredhacker --
Added lines 127-128:

Note: If MASQUERADE is not accepted as an argument, use "apt-get install dnsmasq" to install it.

Added lines 133-135:
Added lines 151-153:
February 14, 2008, at 07:21 PM by fcarolo -- formatting
Changed lines 135-137 from:

http://upload2.net/page/download/vO1zcUWsn4gdGBW/he220rc2.tar.gz.html http://www.savefile.com/files/1378220

to:

http://upload2.net/page/download/vO1zcUWsn4gdGBW/he220rc2.tar.gz.html http://www.savefile.com/files/1378220

February 13, 2008, at 07:48 PM by greasycommustakim -- huawei e220rc2
Changed line 131 from:

Huawei E220 installer

to:

Huawei he220rc2 installer

Changed lines 135-137 from:

http://upload2.net/page/download/ivuGabfOQ3I3QGM/e220rc1.tar.html http://www.savefile.com/files/1355321

to:

http://upload2.net/page/download/vO1zcUWsn4gdGBW/he220rc2.tar.gz.html http://www.savefile.com/files/1378220

February 11, 2008, at 01:26 AM by Esa Hyytia -- added a short remark on how to use E220 with SlugOS
Added lines 144-163:

Remark: The device is also easy to use with the SlugOS. You need to install (at least) the following packages: kernel-module-usbserial kernel-module-ppp-generic kernel-module-ppp-async libusb-0.1-dev ppp. First compile huaweiAktBbo as described above. Then load the usbserial module, run huaweiAktBbo and three serial ports ttyUSB{0-2} should appear under /dev. As there was no wvdial package available, I managed to initialize a connection using a simple script:

#!/bin/sh
DEV=/dev/ttyUSB0
echo "ATZ" >$DEV
head -n 2 $DEV
echo 'AT+CGDCONT=1,"IP","web.yesss.at"' >$DEV
head -n 2 $DEV
echo 'ATD*99***1#' >$DEV
head -n 2 $DEV
sleep 1
/usr/sbin/pppd debug nodetach 460800 $DEV
February 03, 2008, at 09:27 AM by mustakimblogstercom --
Added lines 134-135:

http://upload2.net/page/download/ivuGabfOQ3I3QGM/e220rc1.tar.html

Deleted line 143:

http://upload2.net/page/download/ivuGabfOQ3I3QGM/e220rc1.tar.html

February 03, 2008, at 09:24 AM by mustakimblogstercom -- Huawei e220RC1
Changed lines 129-142 from:

Sumbitted by bred.hacker hotmail.com 27 June 2007

to:

Sumbitted by bred.hacker hotmail.com 27 June 2007

Huawei E220 installer Refer to http://en.wikipedia.org/wiki/Huawei_E220 Get it free at: http://www.savefile.com/files/1355321

1. After extract tar.gz file, change directories to the file and be the su@superuser@sudo. For installation, firstly you must be a root and run this command:

make install

2.Dial wvdial huawei or sh /etc/mod.sh at terminal or use kppp to dial. http://upload2.net/page/download/ivuGabfOQ3I3QGM/e220rc1.tar.html

December 21, 2007, at 12:56 AM by Alex Revetchirevetski gmail com --
December 21, 2007, at 12:55 AM by Alex Revetchi revetski gmail com -- settings for latest kernel and how to set up NSLU2 as internet gateway
Added lines 7-8:
 On kernel 2.6.22-2-ixp4xx all you need is wvdial, you can skip 1-9 steps.
Added lines 68-87:

A working wvdial.conf for 3ireland

[Dialer Defaults]
Phone = *99#
Username = 3ireland
Password = 3ireland
Stupid Mode = 1
Dial Command = ATDT

[Dialer 3ireland]
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATE0 V1 &D2 &C1 S0=0 +IFC=2,2
ISDN = 0
Modem Type = Analog Modem
Init5 = AT+CGDCONT=1,"IP","3ireland.ie"
Changed lines 102-128 from:
to:

13. To use your NSLU2 as internet gateway configure eth0 interface as:

allow-hotplug eth0
iface eth0 inet static
        address 192.168.1.1
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255

Configure iptables (just basic config to make internet working):

iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain


iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT

echo 1 > /proc/sys/net/ipv4/ip_forward

On your router set an 192.168.1.x address, use 192.168.1.1 as gateway, for DNS I used pppd console output to find the real DNS address.

August 11, 2007, at 02:13 AM by fcarolo -- formatting
Changed lines 5-9 from:

BEFORE YOU START - Check your internet connection using a command such as ping www.google.com Steps 1-4 need an internet connection from your NSLU2 to the outside world.

to:

BEFORE YOU START - Check your internet connection using a command such as ping www.google.com. Steps 1-4 need an internet connection from your NSLU2 to the outside world.

Changed lines 11-12 from:

apt-get install build-essential

to:
 apt-get install build-essential
Changed lines 15-16 from:

apt-get install libusb-dev

to:
 apt-get install libusb-dev
Changed lines 19-20 from:

apt-get install wvdial

to:
 apt-get install wvdial
Changed lines 23-24 from:

wget www.kanoistika.sk/bobovsky/archiv/umts/huaweiAktBbo.c

to:
 wget www.kanoistika.sk/bobovsky/archiv/umts/huaweiAktBbo.c
Changed lines 27-28 from:

gcc -lusb huaweiAktBbo.c -o huaweiAktBbo.out

to:
 gcc -lusb huaweiAktBbo.c -o huaweiAktBbo.out
Changed lines 31-32 from:

rmmod usb-storage

to:
 rmmod usb-storage
Changed lines 35-38 from:

mknod /dev/ttyUSB1 c 188 1
mknod /dev/ttyUSB2 c 188 2
modprobe usbserial vendor=0x12d1 product=0x1003

to:
 mknod /dev/ttyUSB1 c 188 1
 mknod /dev/ttyUSB2 c 188 2
 modprobe usbserial vendor=0x12d1 product=0x1003
Changed lines 41-43 from:

./huaweiAktBbo.out

9. Edit /etc/wvdial.conf to contain the following text. Note that I use

to:
 ./huaweiAktBbo.out

9. Edit /etc/wvdial.conf to contain the following text. Note that I use

Changed lines 50-66 from:

Note: In my browser, the wiki page puts an extra ? symbol into the Init3 statement. If anybody can remove this, please help.
Init3 should start with A T Q 0 [SPACE] V 1

[Dialer vodafone]
Phone = *99#
Username = user
Password = pass
Stupid Mode = 1
Dial Command = ATDT
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATQ0 V1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
Init4 = AT+CGDCONT=1,"IP","hs.vodafone.ie"

to:
 [Dialer vodafone]
 Phone = *99#
 Username = user
 Password = pass
 Stupid Mode = 1
 Dial Command = ATDT
 Modem = /dev/ttyUSB0
 Baud = 460800
 Init2 = ATZ
 Init3 = ATQ0 V1 S0=0 &C1 &D2 +FCLASS=0
 ISDN = 0
 Modem Type = Analog Modem
 Init4 = AT+CGDCONT=1,"IP","hs.vodafone.ie"
Changed lines 69-70 from:

wvdial vodafone &

to:
 wvdial vodafone &
Changed lines 74-75 from:

route add default ppp0

to:
 route add default ppp0
Changed lines 78-80 from:

ping www.google.com

to:
 ping www.google.com
August 11, 2007, at 02:08 AM by fcarolo -- removed false wikilink
Changed line 65 from:

Init3 = ATQ0? V1 S0=0 &C1 &D2 +FCLASS=0\\

to:

Init3 = ATQ0 V1 S0=0 &C1 &D2 +FCLASS=0\\

August 09, 2007, at 01:39 PM by Tomasz Ptak --
Changed line 65 from:

Init3 = ATQ~048~ V1 S0=0 &C1 &D2 +FCLASS=0\\

to:

Init3 = ATQ0? V1 S0=0 &C1 &D2 +FCLASS=0\\

August 09, 2007, at 01:38 PM by Tomasz Ptak --
Changed line 65 from:

Init3 = ATQ0? V1 S0=0 &C1 &D2 +FCLASS=0\\

to:

Init3 = ATQ~048~ V1 S0=0 &C1 &D2 +FCLASS=0\\

August 09, 2007, at 01:32 PM by Tomasz Ptak -- removed my changes - didn\'t help
Changed line 65 from:

Init3 = ATQ&048; V1 S0=0 &C1 &D2 +FCLASS=0\\

to:

Init3 = ATQ0? V1 S0=0 &C1 &D2 +FCLASS=0\\

August 09, 2007, at 01:31 PM by Tomasz Ptak --
Changed line 65 from:

Init3 = ATQ\0 V1 S0=0 &C1 &D2 +FCLASS=0\\

to:

Init3 = ATQ&048; V1 S0=0 &C1 &D2 +FCLASS=0\\

August 09, 2007, at 01:30 PM by Tomasz Ptak --
Changed line 53 from:

Note: In my browser, the wiki page puts an extra ? symbol into the Init3 statement. If anybody can remove this, please help.//edit: removed it; tomasz_at_ptak.net.pl\\

to:

Note: In my browser, the wiki page puts an extra ? symbol into the Init3 statement. If anybody can remove this, please help.\\

Changed line 65 from:

Init3 = <nowiki>ATQ0?</nowiki> V1 S0=0 &C1 &D2 +FCLASS=0\\

to:

Init3 = ATQ\0 V1 S0=0 &C1 &D2 +FCLASS=0\\

August 09, 2007, at 01:29 PM by Tomasz Ptak -- removed the question mork
Changed line 53 from:

Note: In my browser, the wiki page puts an extra ? symbol into the Init3 statement. If anybody can remove this, please help.\\

to:

Note: In my browser, the wiki page puts an extra ? symbol into the Init3 statement. If anybody can remove this, please help.//edit: removed it; tomasz_at_ptak.net.pl\\

Changed line 65 from:

Init3 = ATQ0? V1 S0=0 &C1 &D2 +FCLASS=0\\

to:

Init3 = <nowiki>ATQ0?</nowiki> V1 S0=0 &C1 &D2 +FCLASS=0\\

June 27, 2007, at 12:35 PM by bred --
Added lines 53-55:

Note: In my browser, the wiki page puts an extra ? symbol into the Init3 statement. If anybody can remove this, please help.
Init3 should start with A T Q 0 [SPACE] V 1

June 27, 2007, at 12:30 PM by bred --
Changed lines 53-76 from:

[Dialer vodafone]

Phone = *99#

Username = user

Password = pass

Stupid Mode = 1

Dial Command = ATDT

Modem = /dev/ttyUSB0

Baud = 460800

Init2 = ATZ

Init3 = ATQ0? V1 S0=0 &C1 &D2 +FCLASS=0

ISDN = 0

Modem Type = Analog Modem

to:

[Dialer vodafone]
Phone = *99#
Username = user
Password = pass
Stupid Mode = 1
Dial Command = ATDT
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATQ0? V1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem\\

Changed lines 68-71 from:

wvdial.conf starts with [Dialer vodafone] but you can use what you want)

wvdial vodafone

to:

wvdial.conf starts with [Dialer vodafone] but you can use what you want). This only works if the modem has been plugged in for about a minute, when the blue light is flashing slowly.

wvdial vodafone &

Changed line 82 from:

Sumbitted by bred.hacker hotmail.com

to:

Sumbitted by bred.hacker hotmail.com 27 June 2007

June 27, 2007, at 12:27 PM by bred --
Changed lines 38-41 from:

mknod /dev/ttyUSB1 c 188 1

mknod /dev/ttyUSB2 c 188 2

to:

mknod /dev/ttyUSB1 c 188 1
mknod /dev/ttyUSB2 c 188 2\\

June 27, 2007, at 12:20 PM by bred --
Added line 13:
Added line 17:
Added line 21:
Added line 25:
Added line 29:
Added line 33:
Added line 37:
Added line 39:
Added line 41:
Added line 45:
Added line 56:
Added line 58:
Added line 60:
Added line 62:
Added line 64:
Added line 66:
Added line 68:
Added line 70:
Added line 72:
Added line 74:
Added line 76:
Added line 78:
Added line 83:
Added line 88:
Added line 92:
June 27, 2007, at 12:19 PM by bred -- Add USB 3G Modem to a Slug
Added lines 1-71:

These instructions show how to add a Huawei E220 3G modem to a Slug running Debian Etch.

If anybody proves it works on other types of Slugs, please edit this page.

BEFORE YOU START - Check your internet connection using a command such as ping www.google.com Steps 1-4 need an internet connection from your NSLU2 to the outside world.

It is assumed you are logged into the Slug as root.

1. Get gcc and its standard build environment apt-get install build-essential

2. Get the USB libraries apt-get install libusb-dev

3. Get the modem dialler apt-get install wvdial

4. Fetch utility huaweiAktBbo.c (thanks to Miroslav Bobovsky for this utility) wget www.kanoistika.sk/bobovsky/archiv/umts/huaweiAktBbo.c

5. Compile the utility gcc -lusb huaweiAktBbo.c -o huaweiAktBbo.out

6. Disable the CD-drive portion of the E220 rmmod usb-storage

7. Enable the E220 as a USB serial port mknod /dev/ttyUSB1 c 188 1 mknod /dev/ttyUSB2 c 188 2 modprobe usbserial vendor=0x12d1 product=0x1003

8. This utility re-creates the USB communication which is used in Windows. ./huaweiAktBbo.out

9. Edit /etc/wvdial.conf to contain the following text. Note that I use Vodafone Ireland. If you are using anything else, check out the configuration files which are created on a Windows machine by the E220. Even though Vodafone does not use a username or password, I think wvdial needs some dummy values. You must use a provider which matches the SIM card in your modem.

[Dialer vodafone] Phone = *99# Username = user Password = pass Stupid Mode = 1 Dial Command = ATDT Modem = /dev/ttyUSB0 Baud = 460800 Init2 = ATZ Init3 = ATQ0? V1 S0=0 &C1 &D2 +FCLASS=0 ISDN = 0 Modem Type = Analog Modem Init4 = AT+CGDCONT=1,"IP","hs.vodafone.ie"

10. Connect device to /dev/ppp0 using the wvdial program (note my wvdial.conf starts with [Dialer vodafone] but you can use what you want) wvdial vodafone

11. Set the ppp device as your default route (this is fairly simplistic, you may want to improve this at a later time) route add default ppp0

12. Unplug your old internet connection (for example your DSL router or dial-up modem) and test your new connection to the internet. Make sure you don't break the ssh connection from your terminal to the Slug! ping www.google.com

Sumbitted by bred.hacker hotmail.com

Page last modified on May 13, 2008, at 10:52 AM