3G HSDPA Modem on Gentoo Linux

Disposition:

  • ozerocdoff
  • HSO Kernel Module

http://www.pharscape.org/forum/index.php?board=14.0

  • udev rules
  • HSOConnect for connections

Installation with HSOConnect Utility

Prior to about nov. 2009, the Gnome Network Manager, loved and hated alike, did not support ny Option iCON 225 modem. Thus, I had to find another way to use it. This is where the HSOConnect utility described in this section comes in. For a more recent setup, see the Installation with NetworkManager section below.

Prerequisites

System specs for installation:

  • Hardware: Option iCON 225 3G modem (USB stick model)
  • Kernel: Linux 2.6.27-r8 (Gentoo)
  • ISP: CyberCity - a Danish ISP (Installation will propably be much the same for Sonofon)
  • udev: Version 124-r1, installed from Portage

Kernel Options

You need various modules for the Linux kernel when you use 3G modems. Specifically, you need a serial USB driver and drivers for the PPP protocol. On my Linux 2.6.27-r8, I use the following modules:
For PPP:

CONFIG_PPP=m
# CONFIG_PPP_MULTILINK is not set
# CONFIG_PPP_FILTER is not set
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_MPPE=m
CONFIG_PPPOE=m
CONFIG_PPPOL2TP=m

FIXME It doesn't actually seem that the HCO module needs the PPP stuff…
And for the USB serial driver:

CONFIG_USB_SERIAL=y
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_OPTION=m

You propably don't want to compile the SERIAL_OPTION module into the kernel, as we'll be replacing it with the HCO module further on, but for the other modules you should be able to do so if you don't want to do modprobes every time.
The option module is supposed to support this modem, but it doesn't seem to work right, and the HCO module provides newer functionality of this module.

Installing ozerocdoff

When you plug in your iCON modem, your Linux will most likely recognize it as a storage device. You need to make it switch mode to act as a modem and for this you need the ozerocdoff utility. Download the package from http://www.pharscape.org/ozerocdoff.html and untar the archive somewhere. Install it as root using the standard make, make install procedure.
The utility will automatically spawn on modem insertion when we're done setting up your system.

Setting up udev

If you've used the installation guide above, you should already have udev rules installed that will recognize and activate the modem when it's inserted into the USB port. However, I've chosen to write a script that disables NetworkManager and starts the HCOConnect dialer upon insertion.
In /etc/udev/rules.d/51-hso-udev.rules, locate the line that says

ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6971", RUN+="/usr/sbin/ozerocdoff -wi 0x%s{idProduct}"

and alter it to

ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6971", RUN+="/etc/udev/scripts/hsdpa.sh 0x%s{idProduct}"

This will make udev execute the hsdpa.sh script whenever the modem is inserted into the USB port. For my own script I use the following:
/etc/udev/scripts/hsdpa.sh

#!/bin/sh -e

/etc/init.d/NetworkManager stop
/usr/sbin/ozerocdoff -wi $1
/bin/hostname winston                  # change winston to match your hostname or simply delete this line
/bin/su -l -s /bin/bash -c 'sleep 10 && PATH=/usr/local/bin/:$PATH: DISPLAY=:0.0 /usr/bin/nohup /usr/bin/python2.5 -m hsoc' fronck </dev/null >/dev/null 2>/dev/null &
Of course, you should change fronck in the last line to the user name you run your desktop as.

Adding the dailout group

Apparently, the tools used here are developed for Ubuntu or RedHat Linux which seem to have a group called dailout. This is the group that controls access to modem devices. The easiest way to make things work under Gentoo is to simply add the group.
As root:

> groupadd dailout

And add your user to the group:

> usermod -a dailout fronck

HCOConnect Setup

Last but not least, you need a connection manager. I use the HCOConnect software which you may download here: http://www.pharscape.org/HSOconnect.html
The above link also contains documentation for the software, so I'll just list what settings I'm using here. You might also have luck configuring the Gnome project's |NetworkManager software from version 0.7 and later.
As for my version of HCOConnect, it is launched like so:

> python2.5 -m hsoc

Profile information

Preference information

Main window

Follow these steps and hopefully you'll end up with a window like this: :)
HSOConnect main window

Troubleshooting

reset full speed USB device...

Problem
After installation, my modem would run perfectly for some time and then begin to hiccup, dumping these messages in my syslog: usb 3-1: reset full speed USB device using uhci_hcd and address 3
Solution
The problems seem to have disappeared after I updated the HSO_AUTOSUSPEND variable in /etc/hso-suspend.conf like so:

HSO_AUTOSUSPEND=NONE
I found the hint In this thread in the Pharscape forums.

Installation with NetworkManager

More recent version (~0.7.2+) of the Gnome Project's NetworkManager does support the Option iCON 225 just fine. You still need to enable the Option module and the PPP setup in your kernel setup (see above), but once that is done and NetworkManager is running, it should be able to handle your modem just fine. You still need to enter your network settings, which for Danish ISP Telenor (formerly Cybercity) works like this: (Nothing has been changed on the other tabs.)

You could leave a comment if you were logged in.
howto/net/hsdpa.txt · Last modified: 2010/03/21 12:48 by fronck
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki