Huawei E169G on OLPC with Ubuntu

From Joyrex Wiki

Jump to: navigation, search

Contents

Background

  • OLPC from G1G1
  • Running Hardy from 2G memory card
  • Huawei E169G USB key
  • 3 Network in Australia
  • Connecting with gnome-ppp (uses wvdial in the background)


Setup

  • Install necessary packages
apt-get install ppp wvdial gnome-ppp
  • Make sure you're a member of the "dip" group. If not, add yourself too it and log out and back in.
  • Download usb_modeswitch. Uncompress/tar the file:
tar -xvjf usb_modswitch-0.9.4-tar-bz2
  • Copy the executable to your system
sudo cp usb_modeswitch-0.9.4/usb_modeswitch /usr/sbin
  • Edit a file called e169g_switch.sh in /usr/sbin
sudo nano /usr/sbin/e169g_switch.sh
  • Add the following lines to the file:
#!/bin/sh
/usr/sbin/usb_modeswitch -v 12d1 -p 1001 -d 1
/usr/sbin/usb_modeswitch -v 12d1 -p 1001 -H 1
  • Edit a file called 70-e169g.rules in in /etc/udev/rules.d
sudo nano /etc/udev/rules.d/70-e169g.rules
  • Add the following line to the file:
SUBSYSTEM=="usb" SYSFS{idProduct}=="1001", SYSFS{idVendor}=="12d1", RUN+="/usr/sbin/e169g_switch"
  • You should now be able to plug in the device. Wait until you either get a single blue flash or a single green flash. A double means it can't find the network it needs to connect to, and it's very frustrating to try and do this when you have no reception (and don't realize it). Trust me.
  • For the user that will be using gnome-ppp, create a file called .wvdial.conf in their home directory. This is the file gnome-ppp will use.
nano ~/.wvdial.conf
  • Add the following:
[Dialer Defaults]
Modem = /dev/ttyUSB0
ISDN = off
Modem Type = Analog Modem
Baud = 460800
Init = ATZ
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init4 = AT+CGDCONT=1,"IP","3netaccess" 
Init5 = 
Init6 = 
Init7 = 
Init8 = 
Init9 = 
Phone = *99***1#
Phone1 = 
Phone2 = 
Phone3 = 
Phone4 = 
Dial Prefix = 
Dial Attempts = 1
Dial Command = ATM1L3DT
Ask Password = off
Password = password
Username = username
Auto Reconnect = on
Abort on Busy = off
Carrier Check = off
Check Def Route = on
Abort on No Dialtone = on
Stupid Mode = on
Idle Seconds = 0
Auto DNS = on
;Minimize = on
;Dock = on
;Do NOT edit this file by hand!
  • Load gnome-ppp and hit "Connect". It should connect and you'll be online. If it doesn't, it should give a log of some sort as output so you understand what's going on. Google the error messages you're seeing and hopefully you'll get lucky.
  • You can also try this from the console with wvdial instead of using gnome-ppp. You can do this by editing /etc/wvdial.conf:
sudo nano /etc/wvdial.conf
  • Add the following:
# wvdial for Vodacom Data. Created by Tazz_tux
# Version 1.0

# Change Log:
#
# Added support for HSDPA.
# Added Headers and version control.

[Dialer Defaults]
Phone = *99***1#
Username = username
Password = password
Stupid Mode = 1
Dial Command = ATDT
Carrier Check = No

[Dialer hsdpa]
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init4 = AT+CGDCONT=1,"IP","3netaccess" 
ISDN = 0
Modem Type = Analog Modem
  • Then run:
wvdial hsdpa


Notes

  • There's a vodafone modem driver out there for this model, but the drivers just make kernel OOPSes and basically failed/didn't work for me. I was using 1.99.17, because 2.0.whatever is reported to not work in Hardy yet.
  • Some of what I have here may not be necessary (such as the e169g_switch stuff). I ripped this info from multiple sites (see External References below), and have pieced together something that works for me.

External References

Personal tools