FreeBSD driver for Option HSDPA modemNewer HSDPA/UMTS/3G devices (USB dongles) from Option comes with a “packet interface” and requires a special driver, older cards should work just fine with ubsa(4), u3g(4) or any similar serial-over-USB driver.
The driver should support most new hardware from Option. The following
Note that the driver currently doesn’t recognize other devices, although most newer Option HSDPA devices should work. More devices IDs will be added as devices are found. If you own any newer Option device that appears as a USB device, please report back with the device ID. Note: iCON 7.2 devices with older firmwares are supported by ubsa(4) if you add the correct device ID, or by the new u3g driver available in 8.0 or later. You have the old firmware the device ID of the mass storage device is 0×05C6 and changes when you switch the device. Note: This is NOT for cards based on the Nozomi chipset. FreeBSD 9/CURRENTIncluded in BASE. > kldload uhso See uhso(4) and uhsoctl(1) for more information FreeBSD 8The FreeBSD 8 driver can be installed through FreeBSD ports. It’s available in comms/uhso-kmod > cd /usr/ports/comms/uhso-kmod > make install FreeBSD 8 Driver – uhso-20100416.tar.gz FreeBSD 8 Connection utility – uhsoctl-20100416.tar.gz FreeBSD 7Not that this version of the driver is unmaintained The FreeBSD 7 driver can be installed through FreeBSD ports. It’s available in comms/hso-kmod > cd /usr/ports/comms/hso-kmod > make install Please see hsoctl(1) for instructions on how to connect to your provider. FreeBSD 7 Driver – hso-20081023.tar.gz FreeBSD 7 Connection utility – hsoctl-20081023.tar.gz option-iconf.conf for devd (automatic mode switching) Manual installA simple make should do the trick. If the build would fail for some reason, make sure you have the latest tarball and that the usbdev patch was applied properly. If it still fails, send me a mail with the (whole) error message together with which FreeBSD version you are using. The following is only required for FreeBSD 7 These devices are so-called ZeroCD devices that when plugged in appears as a mass storage device with windows drivers. To get the HSDPA interface the device needs to be switched, this can be done automatically with camcontrol and devd. The umass(4) driver must be present in the kernel or loaded as a module for this to work. Add the following to a file called option.conf and place it in /etc/devd/ (create the directory if it doesn’t exits) then restart devd with /etc/rc.d/devd restart Make sure you replace the product id (0×6911) with the one your device has, you should be able to get it with usbdevs -v attach 100 { match "device-name" "umass[0-9]+"; match "vendor" "0x0af0"; match "product" "0x6911"; match "devclass" "0x00"; action "sleep 1; /sbin/camcontrol cmd `/sbin/camcontrol devlist | /usr/bin/grep ZCOPTION | /usr/bin/awk '{match($11, /pass[0-9]+/); print substr($11, RSTART, RLENGTH) }'` -c '01 00 00 00 00 00' -i 1 i1 > /dev/null"; }; Note that this is optional, you can always switch the device manually using camcontrol or with a program called usb_modeswith. Using the driverLoad the kernel module and plug in your device > kldload uhso.ko If the driver identifies your device you should see something like this uhso0: <Network port> at <Option N.V. Globetrotter HSDPA Modem> on usbus5 uhso1: <Diagnostic port> at <Option N.V. Globetrotter HSDPA Modem> on usbus5 And a new network interface should have appeared > ifconfig hso0: flags=0<> metric 0 mtu 2048 In addition to this several TTY devices should have been created, you can figure out how many by using sysctl. sysctl dev.uhso Connection with the uhsoctl connection utilityThe uhsoctl connection utility automatically creates and maintains a connection. It can run both in background and in foreground mode. The execution syntax is hsoctl [options] interface, the following options are recognized (most of with are optional). -a APN – Access point name Foreground example Hitting CTRL-C will close the connection. > uhsoctl -n -a bredband.tre.se -p 1234 uhso0 Searching for network (UMTS) Registered to "3" (UMTS) Connected to "3" (bredband.tre.se), carrier UMTS IP address: 78.156.206.64, Nameservers: 80.251.192.244, 80.251.192.245 Status: connected (UMTS), signal: -87 dBm ^C > Background example > uhsoctl -a bredband.tre.se -p 1234 uhso0 Searching for network (UMTS) Registered to "3" (UMTS) Connected to "3" (bredband.tre.se), carrier UMTS IP address: 78.156.206.64, Nameservers: 80.251.192.244, 80.251.192.245 > > uhsoctl -d uhso0 Disconnecting uhso0 > Manual connectionLook up the serial ports # sysctl dev.uhso dev.uhso.0.netif: uhso0 dev.uhso.0.type: Network/Serial dev.uhso.0.ports: 2 dev.uhso.0.port.control.tty: cuaU0.0 dev.uhso.0.port.control.desc: Control dev.uhso.0.port.application.tty: cuaU0.1 dev.uhso.0.port.application.desc: Application ... dev.uhso.1.type: Serial dev.uhso.1.ports: 1 dev.uhso.1.port.diagnostic.tty: cuaU1 dev.uhso.1.port.diagnostic.desc: Diagnostic Open one of them, for example the Control or Application port, in a terminal AT+CPIN="1234" # Your PIN OK AT+CGDCONT=1,,"bredband.tre.se" OK AT_OWANCALL=1,1,1 OK AT_OWANDATA=1 _OWANDATA: 1, 95.209.79.126, 0.0.0.0, 80.251.201.177, 80.251.201.178, 0.0.0.0, 0.0.0.0, 72000 Configure the interface and set a default route # ifconfig uhso0 95.209.79.126 # route add default -interface uhso0 Manual connectionFigure out which serial ports that Open /dev/cuaHSO0.0 (or cuaHSO0.1) with a terminal program (for example minicom), baud rate doesn’t matter. If your SIM card requires a PIN AT+CPIN? +CPIN: SIM PIN AT+CPIN="1234" OK AT+CPIN? +CPIN: READY Next, configure the APN (you should have the details from your provider), you only need to do this once (or when you change APN). AT+CGDCONT=1,,"bredband.tre.se" OK If a username and password is required, it can be specified with AT$QCPDPP=1,1,"pass","user" To create the connection, type AT_OWANCALL=1,1,0 The LED on your device will stop blinking and get a steady shine when you’re connected. AT_OWANDATA=1 _OWANDATA: 1, 79.138.181.171, 0.0.0.0, 80.251.192.244, 80.251.192.245, 0.0.0.0, 0.0.0.0, 72000 The first address is your ip-address, the third and the fourth are your name servers. Now simply configure the network interface with this information as any other network connection. > ifconfig hso0 79.138.181.171/32 > route add default -interface hso0 > echo "nameserver 80.251.192.244" >> /etc/resolv.conf > echo "nameserver 80.251.192.245" >> /etc/resolv.conf Your connection should be ready now > ping ping.sunet.se PING ping.sunet.se (192.36.125.18): 56 data bytes 64 bytes from 192.36.125.18: icmp_seq=0 ttl=251 time=131.873 ms 64 bytes from 192.36.125.18: icmp_seq=1 ttl=251 time=130.545 ms ^C --- ping.sunet.se ping statistics --- 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 130.545/131.209/131.873/0.664 ms The connection can be closed with the following command AT_OWANCALL=1,0,0 |
Entries (RSS)