Installing 3G/UMTS ( Huawei e220 ) onto WRT 160nl and Openwrt(Part 3)

Author: stephan  |  Category: Linux, Netzwerk, openwrt

[lang_en]

First we need to install a bunch of packets

opkg install kmod-ar9170 kmod-usb-core kmod-usb-serial comgt kmod-usb-uhci kmod-usb2 kmod-ppp huaweiaktbbo

The E220 has two modes . To switch from USB Stick to UMTS you need huaweiaktbbo

root@OpenWrt:~# huaweiAktBbo
Searching modem...found supported modem!
Modem poked!

Its a clever idea to put it into init.d for startup. I used this script by Simon Josefsson


root@OpenWrt:/etc/init.d# cat huaweiAktBbo
#!/bin/sh /etc/rc.common
# Written by Simon Josefsson 2009-03-05. Released into the public domain.

START=70
start() {
huaweiAktBbo
}

Make the script accessible and enable it
And you need the following

root@OpenWrt:/# cat /etc/modules.d/60-usb-serial
usbserial vendor=0x12d1 product=0x1003

Then Reboot the Router

Next step ist to get ppp working. My working scripts ( I had a few tries before I found a working config)

root@OpenWrt:/# cat /etc/chatscripts/3g.chat
ABORT BUSY
ABORT 'NO CARRIER'
ABORT ERROR
REPORT CONNECT
TIMEOUT 10
"" "ATX"
OK "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
OK 'AT+CGDCONT=1,"IP","$USE_APN","0.0.0.0"'

SAY "Calling UMTS/GPRS"
TIMEOUT 30
#OK "ATD*99***1#"
OK "ATD*99#"
CONNECT ' '


root@OpenWrt:/# cat /etc/ppp/options
115200
logfile /dev/null
noaccomp
nopcomp
nocrtscts
lock
maxfail 0
lcp-echo-failure 0
lcp-echo-interval 0
ipcp-max-failure 30


root@OpenWrt:/# cat /etc/config/network
...
#### UMTS configuration
config interface ppp0
option ifname ppp0
option proto 3g
option device /dev/ttyUSB0
option 'service' 'umts'
option apn internet.eplus.de
option pincode 0000
option 'defaultroute' '1'
option 'peerdns' '1'

With an ifup ppp0 , the 3G modem should start connecting

My Sources
http://www.it-slav.net/blogs/2010/06/12/howto-use-3g-dongle-huawei-e1750-in-openwrt/
http://josefsson.org/openwrt/dongle.html

[/lang_en]
[lang_de]

Zuerst benötigen wir eine Menge Packete

opkg install kmod-ar9170 kmod-usb-core kmod-usb-serial comgt kmod-usb-uhci kmod-usb2 kmod-ppp huaweiaktbbo

Das E220 hat Zwei Modi .
Um vom USB STick zum Modem zu wechseln benötigt man das Program huaweiaktbbo

root@OpenWrt:~# huaweiAktBbo
Searching modem...found supported modem!
Modem poked!

es ist jetzt eine gute Idee , das ganze via Startup zu automatisieren.
Ich verwende hierfür das Script von Simon Josefsson


root@OpenWrt:/etc/init.d# cat huaweiAktBbo
#!/bin/sh /etc/rc.common
# Written by Simon Josefsson 2009-03-05. Released into the public domain.

START=70
start() {
huaweiAktBbo
}

Das Script sollte man nun ausführbar machen und enablen damit es bei jedem Start wieder ausgeführt wird

Und man braucht das folgende

root@OpenWrt:/# cat /etc/modules.d/60-usb-serial
usbserial vendor=0x12d1 product=0x1003

Danach den Router neu starten

Der nächste Schritt ist den PPP zum Laufen zu bekommen . Anbei meine funktionierenden scripte ( Ich habe ein bischen probieren müssen bevor es lief)


root@OpenWrt:/# cat /etc/chatscripts/3g.chat
ABORT BUSY
ABORT 'NO CARRIER'
ABORT ERROR
REPORT CONNECT
TIMEOUT 10
"" "ATX"
OK "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
OK 'AT+CGDCONT=1,"IP","$USE_APN","0.0.0.0"'

SAY "Calling UMTS/GPRS"
TIMEOUT 30
#OK "ATD*99***1#"
OK "ATD*99#"
CONNECT ' '


root@OpenWrt:/# cat /etc/ppp/options
115200
logfile /dev/null
noaccomp
nopcomp
nocrtscts
lock
maxfail 0
lcp-echo-failure 0
lcp-echo-interval 0
ipcp-max-failure 30


root@OpenWrt:/# cat /etc/config/network
...
#### UMTS configuration
config interface ppp0
option ifname ppp0
option proto 3g
option device /dev/ttyUSB0
option 'service' 'umts'
option apn internet.eplus.de
option pincode 0000
option 'defaultroute' '1'
option 'peerdns' '1'

Mit einem ifup ppp0 ,sollte das UMTS Modem anfangen sich zu verbinden

Meine Quellen
http://www.it-slav.net/blogs/2010/06/12/howto-use-3g-dongle-huawei-e1750-in-openwrt/
http://josefsson.org/openwrt/dongle.html

[/lang_de]

Another try with the wrt160nl and openwrt(Part 2) – Installing virtual WLANs

Author: stephan  |  Category: Linux, Netzwerk, openwrt

[lang_en]

The next goal was the Konfiguration of two „virtual“ WLANs on one physical router ; one private and protected WLAN and one open for Guests ( otherwise protected )

The Code is very simple :

config wifi-iface
option device radio0
option network lan
option mode ap
option ssid Secret-WLAN
option encryption psk
option key Secret
option hidden 1

config wifi-iface
option device radio0
option network lan2
option mode ap
option ssid OpenWLAN
option encryption none
option hidden 1

At last , you need a virutal ethernetdevice as bridiging point for the Second WLAN

config interface lan2
option ifname eth0.2
option type bridge
option proto static
option ipaddr 172.27.1.1
option netmask 255.255.255.0

[/lang_en]

[lang_de]

Der nächste Schritt war die Konfiguration zweier virtueller WLANs auf einem physikalischen Accesspoint ; ein geschützes für private Zwecke und ein offenes für Gäste ( auf anderem Weg geschützt)

Die Konfiguration ist sehr einfach:

config wifi-iface
option device radio0
option network lan
option mode ap
option ssid Secret-WLAN
option encryption psk
option key Secret
option hidden 1

config wifi-iface
option device radio0
option network lan2
option mode ap
option ssid OpenWLAN
option encryption none
option hidden 1

man braucht jetzt nur noch eine virtuelles Ethernet Device für die Bridge

config interface lan2
option ifname eth0.2
option type bridge
option proto static
option ipaddr 172.27.1.1
option netmask 255.255.255.0

[/lang_de]

Another try with the wrt160nl and openwrt (Part 1) – Installing Openwrt

Author: stephan  |  Category: Linux, Netzwerk, openwrt

[lang_en]

After being unused for over an year I gave the WRT 160 NL another try .
Now there are images ready to use[1]
You can easily flash the image over an older installation ( in my case ) this way
sysupgrade -n openwrt-ar71xx-wrt160nl-squashfs.bin
or you can do it with the webgui.

To get WLAN wokring , you have to install additional packets
opkg update; opkg install kmod-ath9k hostapd wpa-supplicant
and then you have to do the following

rm /etc/config/wireless
wifi detect > /etc/config/wireless

and WLAN is working

[1]
http://downloads.openwrt.org/backfire/10.03/ar71xx/
[/lang_en]

[lang_de]
Nachdem der Router ein Jahr lang unnütz in der Ecke stand gab ich ihm eine weitere Chance.
Inzwischen gibt es auch jede Menge fertiger images [1]

Der Schnellste Weg zur Installation ist mit dem Befehl ( bei alten Instaallationen wie in meinem Fall)
sysupgrade -n openwrt-ar71xx-wrt160nl-squashfs.bin
oder über die Weboberfläche

Um Wlan zum Laufen zu Bringen müssen ein paar Packete installiert werden
opkg update; opkg install kmod-ath9k hostapd wpa-supplicant
und dann das Wlan mit den Befehlen

rm /etc/config/wireless
wifi detect > /etc/config/wireless

einrichten und WLAN funktioniert

[1]
http://downloads.openwrt.org/backfire/10.03/ar71xx/
[/lang_de]