Christian

Kildau

Network Engineer


Welcome to my little blog. I am mostly techie over here, blogging about networking and system administration topics, but there will also be some Travel Reports from time to time…

How to OpenBSD with Huawei E1750 UMTS

March 21, 2011Christian Kildau0 Comments

Getting my OpenBSD (4.8) box to talk an Huawei E1750 USB UMTS Stick as a backup solution turned out to be not very straight forward, so in case you are in a similar situation…

Have a look at man umsm to see which devices are supported by OpenBSD.

The UMTS (USB)-Sticks are registered as /dev/cuaUX, where X is the number of your device… You’ll need userland pppd to connect. Place your peer configuration in /etc/ppp/peers/o2 for example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
cuaU0
connect /etc/ppp/connect.o2
disconnect /etc/ppp/disconnect.o2
nocrtscts
xonxoff
#:0.0.0.2 because 0.0.0.1 is the alias for my DSL default gateway
:0.0.0.2
noipdefault
ipcp-accept-local
defaultroute
novj
nobsdcomp
novjccomp
nopcomp
noaccomp
noauth
nomagic
persist

You’ll also need Chat scripts to connect and disconnect the connection. Note that you’ll need to at least adjust /etc/ppp/connect.o2 to suit your provider:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
chat -vs 
 ABORT 'NO CARRIER' 
 ABORT 'NO DIALTONE' 
 ABORT ERROR 
 ABORT 'NO ANSWER' 
 ABORT BUSY '' 
 at OK 
 atz OK 
 # uncomment the following if your SIM is PIN protected
 # and replace **** with your PIN
 #at+cpin=**** OK 
 'AT+CGDCONT=1,"IP","pinternet.interkom.de"' OK 
 'atdt*99***1#' CONNECT

And /etc/ppp/disconnect.o2 looks like:

1
2
3
4
5
6
7
8
#!/bin/sh
chat -vs 
 ABORT 'NO CARRIER' 
 ABORT 'NO DIALTONE' 
 ABORT ERROR 
 ABORT 'NO ANSWER' 
 ABORT BUSY '' 
 'K' '' '+++ATH'

Now make sure ppp0 is initialized on startup…

1
2
touch /etc/hostname.ppp0
sh /etc/netstart ppp0

… and to connect simply run pppd call o2 and pkill pppd to disconnect. Run ifconfig ppp0 to see if your connection is up and running:

1
2
3
4
ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
        priority: 0
        groups: ppp egress
        inet 10.150.81.109 --> 0.0.0.2 netmask 0xfffffffc

Next post will be about auto fail-over between this and my regular DSL connection.


Leave a Reply