|Home||Pauline's Pages||Howto Articles||Uniquely NZ||Small Firms||Search|
|Ubuntu Linux on the Move
Legacy page for Hardy & Jaunty
Fun with Ubuntu Linux | The Road to Freedom - The Journey Starts |The Road to Freedom - Base Camp | Ubuntu All Together - Sharing, Networking, Backup, Synchronisation and Encryption | Ubuntu on the Lookout - Browsing, Email, Contacts, Calendars and Tasks| Ubuntu on the Move | Ubuntu on the Take | The MSI Wind U100 Netbook for Global Communications and Computing
The main page covering my experiences in making the transition from Microsoft Windows to Ubuntu Linux - Fun with Ubuntu Linux quickly become excessively long. This is the first, and for me one of the most important, specialised pages in what is become a now turning into a series covering specific aspects of the transition and use of Ubuntu Linux. Much of the original work for this page was done under Dapper Drake but reached the end of its three year support cycle in 2009 and it was updated it to support Hardy Heron and covered use of Jaunty Jackalope which has advantages for mobile use although it was not a LTS (Long Term Support) issue.
One of my main reasons for making the transition were the huge flows of data with little control whilst on the move when using Microsoft Windows XP. I got so tired of the continual updates to Windows XP and the associated Virus checkers, Firewalls and Malware detectors. It is almost impossible to prevent a large data flow when one first connects and many programs seek information updates etc. There are dozens of processes running in the background under Windows XP and my hard drive is in continuous use minutes after the last user activity has finished. This all makes Windows XP difficult to use securely whilst traveling and costly on a mobile connection. Using the firewall to restrict the programs accessing the internet used to work but now many share common service interfaces and it has become less easy. In contrast Ubuntu uses under a 100 bytes (bytes not Kbytes) when make an average GPRS connection and will sit there for 10 minutes and use no more. Furthermore it has no virus checkers or firewalls which need updating and no unstoppable or essential automatic system updates.
This page is a record of what I have done with details of all the changes I have made (and how) to the systems so I can repeat them in the future. It is a bit difficult to know where to start as there are hardware aspects (modems, phones, specialist cards etc) connection/interface aspects (Bluetooth, USB cables, serial cables etc) and low (Terminal) and high level Graphical User Interface (GUI) software for communications as well as some application which can be optimised for the mobile user to reduce data use. It is still in a sort of chronological order although considerable backfilling has occurred in many sections and have brought some common software forwards.I have done some re-ordering to avoid swapping back and forwards between different aspects. I hope it will be useful to others and perhaps avoid yet more reinventions of the wheel.
The proof of what I have written here is how we make use of the MSI Wind U100 Netbook which is more powerful than a Toshiba Satellite yet only weighs in at 1.1 Kgs - this is entirely used with Linux and I am fully covering the transition to Ubuntu on the MSI Wind U100 for Global Communications This page is currently being modified using it and so far it is all looking very good and Wifi and mobile internet via Bluetooth/Mobile phone and mostly a Mobile broadband USB dongle are fully operational - the only lack is a built in modem for landline on the Wind.
Ubuntu does not give users the ability to use a modem or access the internet by modem by default. This applies to the initial user as well as any additional users you set up. This part of the implementation of strong security on the system and is carried out by requiring the user to be in various groups to which the various activities are allocated.
Many of the modem related activities need administrative privileges. When you set up Ubuntu, it automatically adds the first user to the admin group, allowing that user to make changes as the super user (root) by typing in their password. It does not automatically provide the privileges to use modems or connect to the internet via a modem. If you have several users on the machine it is useful to know how to give them the ability to use sudo as well as the modem related privileges. The following is the easy way to set all this up using a GUI interface.
Go to System -> Administration -> Users and Groups then unlock with your password and highlight your user name and click Properties and on the User Privileges Tab check the box that says "Executing system administration tasks" which adds you to the admin group and also tick 'Connect to Internet using a Modem' which adds you to the dip group and 'Use Modems' which adds you to the dialout group. These changes do not come into effect immediately and you need to restart or logout and back in as the same user.
A better long term approach is to use gnome-ppp, an excellent GUI (Graphic User Interface) tool which puts an connection icon in the panel so you easily check on the connection and terminate it - I see no real reason why one should not use it from the start - I go into use of gnome-ppp below. If you are planning to use gnome-ppp then you must make sure all the three privileges are set - the last two are not set by default even for the initial user.
When you connect a new device such as a modem there are no messages or other indications to show that it has been recognised by the kernel and installed or simple way to tell the device/port it has been allocated. The simplest way to find out what has gone on is to look in the log file created by the kernel which contains all the major activities during start up and when devices are plugged in. As you would expect, the 'file' is quite long but activities from a new device will be in the last ten or twenty lines and it is fairly verbose so you should be able to see if it has been successful and spot the device which has been allocated. It will usually not be the full device which looks something like /dev/ttyUSB0 or /dev/ttyS1 but probably just the ttyUSB0 part.
dmesg: The command dmesg shows all the main kernel activities from startup and the end shows what happens when you plug in a [new] device to see the channels which are allocated.
[ 198627.856147] usb 1-2: new high speed USB device using ehci_hcd and address 13
[198628.000131] usb 1-2: configuration #1 chosen from 1 choice
[198628.006249] usb-storage: probe of 1-2:1.0 failed with error -1
[198628.010213] usb 1-2: USB disconnect, address 13
[198634.640182] usb 1-2: new high speed USB device using ehci_hcd and address 14
[198634.784596] usb 1-2: configuration #1 chosen from 1 choice
[198634.787709] usb-storage: probe of 1-2:1.0 failed with error -5
[198634.787767] option 1-2:1.0: GSM modem (1-port) converter detected
[198634.791543] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
[198634.816178] usb-storage: probe of 1-2:1.1 failed with error -5
[198634.816240] option 1-2:1.1: GSM modem (1-port) converter detected
[198634.816562] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
[198634.829277] usb-storage: probe of 1-2:1.2 failed with error -1
[198634.838152] usb-storage: probe of 1-2:1.3 failed with error -1
Above is a typical output from the end of dmesg which follows my inserting a USB broadband dongle. I have highlighted the lines which are of interest - there are many other 'probes' to investigate what device was connected which were unsuccessful. Note in this case there are two ports identified and connected as /dev/ttyUSB0 and /dev/ttyUSB1. This is correct - these dongles have two ports, the first is used for data and the second monitoring and control so, for example, the signal strength can be monitored during an active connection.
dmesg gives a lot of output so it is worth learning about the grep command (see below for man command) and piping the output through it. Piping is sending output from one command or program straight into another and is done by the | . In this case the output from dmesg is piped into the grep command which filters out all lines except those containing modem.
dmesg | grep "modem"
will just give you the lines including modem. You could also search for lines with tty or modem by
dmesg | grep -e "modem" -e "tty"
that is a good start for finding a built in modem which could be almost anywhere in the dmesg output
syslog: When you are doing initial checks it is very useful, to monitor the main system log which is /var/log/syslog by use ‘tail -f /var/log/syslog’ (in a separate terminal) to check real time that all the right things are happening and what data has been transferred by the time the connection is closed. This can also help identify what port has been allocated to a device although the output is much more dificult to unscramble.
tail -f /var/log/syslog
tail is a command which outputs the last 10 lines of a file, with the -f option it continues to monitor the file and keeps outputing any further additions appended to the file in real time.
man - provides help for terminal commands: If you do man anyterminalcommand it will give you a simple guide to its use and the various options. I like to understand before I mindlessly copy suggestions like mine above into a terminal so I understand what they do. For example if you type in a terminal:
you will get the mannual pages for the man command
I will start with what ought to be the simplest and certainly the most common type of connection to the internet used away from home. In practice it is not that simple and it is worth noting from the start that support for some types of built in modems is poor in all versions of Linux. The reason is simple - the type of modem which is used in many machines and built into many recent cards are often referred to as Winmodems or soft modems because they use the processor and Windows code to do much of the hard work in software rather than do it on the chip or card. This software is often proprietary and Linux is poorly supported by most manufacturers.
In my case Intel does support the chip set on the very cheap (£6.00) modem card in my AMD based desktop machine under some versions of Linux but I could not really face a long battle at an early stage in Linux. I therefore got out my old but very good US Robotics V90 external serial interface Fax modem for the desktop.
The laptop also has a soft modem and the information I have gathered shows that relatively easy driver support is likely in the near future but at present it is a nightmare to install. I then remembered that I had a combined Xircom PCMCIA modem and Ethernet card which I plugged in - it was recognised immediately and checking dmesg showed it was on port /dev/ttyS0 and I had a telephone connection working a few minutes later.
A starting point for testing a modem connection is to use System -> Administration -> Networking which allows a dial-up connection to be configured and provides simple and consistent swapping between a broadband Ethernet connection, WiFi connection and a modem. This allows setting up a basic connection on a serial, or specified device, and needed no editing of files for my Serial Modem - it even detected the port it was connected to. There is however one very important trick to swapping - you MUST use a tick box to set the modem as the default route to the Internet before connecting and un-check the box before switching back to Ethernet. If you do not do that you may find that there is no Internet functionality when you go back to broadband although one can still see other machines over the network! This switching of the default route took me some time to work out when I carried out my initial experiments in accessing my mobile phone. A disadvantage of is this approach is that you need to enter the superuser password every time you use Networking as it is a administrative function needing root privileges.
NOTE: The Network manager is no longer installed by default in Jaunty Jacalope
At an early stage you should add a connection icon to the top panel by right clicking on the top panel -> Add to Panel and ading the Network Monitor onto the Panel - it needs to be set by a double clicking and being set to monitor ppp0 for modems. It will also monitor the Ethernet connection eth0 and the Wifi connection ath0 which usefully shows the signal strength. See also the Netspeed Monitor which is written up in the mobile broadband section.
We are now getting to the more interesting stage - connecting up through a mobile phone (or PDA with mobile access). Before we can get to the use of a mobile phone we have to consider how to connect it. I prefer Bluetooth as it does not involve cables and has much greater range than Infra Red allowing a phone to be placed in a good signal area (in theory up to 10 metres away) so I will only discuss Bluetooth at this point.
Bluetooth is an excellent way to send contacts and files between machines and also allows the modem in one device to be used by another. Before you can do this the various devices must be 'paired' - this means that you set up a 'PIN' on both to give a secure communication without anybody else being able to hijack your mobile. The other security feature is that once paired you stop your devices being 'discovered' by other peoples machines which are searching for devices with Bluetooth (BT) turned on. This all sounds a bit complex and it does take a little while the first time.
When a Bluetooth dongle is inserted or a built in Bluetooth device such as that on the MSI Wind is turned on a Bluetooth icon appears in the system area in Ubuntu Hardy Heron and higher. The first activity is to pair the Phone or Mobile Device to the computer.
The way Bluetooth is paired varies a little between machines so here I will use one of our Windows Mobile 5 devices, an O2 XDA Executive as an example for pairing etc. On the XDA do Start -> Settings -> Connections tab -> Bluetooth -> Mode tab and tick both Turn On and Make Discoverable. Then go to the Devices tab and tap New Partnership to pair the first time. The XDA will scan for other devices which are 'Discoverable' and find the laptop and come back with its name (ie wind-ubuntu) and also any other devices in range. Tap the wind-ubuntu and you will be asked to enter a code ('PIN') and you then have to rush to the laptop where a message asking if you want to continue and enter a matching 'PIN' pops up. At any future time you can work down the same menus to the devices which are paired and click on one to set which functions on your machine you will allow the other machine to use from a list - on Windows Mobile machines this may only be Dial-up-Networking as file and contact transfers are covered under the Beam settings.
Once you have Paired the phone and the computer you need to find out several pieces of information to enable you to set up the connection to the modem in the phone so you can set up a configuration file - the ends result is you have what looks like a local device. You can scan the Bluetooth connections looking for Dial Up Network (DUN) connections (modems) in the phones by typing the following strings in a terminal, in this example both my T610 phone and the XDA have been paired and are with range.
sdptool search DUN
which gives an output like this for with both my T610 Phone and O2 XDA Exec on::
I will include both the code to set up the phone and the XDA in the configuration file as rfcomm0 and rfcomm1 - one can add extra devices to the configuration file as shown below:
The following is the contents of the file which contains the configuration information for both the T610 and the XDA and it lives in /etc/bluetooth/rfcomm.conf . It is safest to make a copy then edit the existing 'default' rfcomm.conf file. You will need to have root priviledges to edit the file so in a terminal do:
gksudo gedit /etc/bluetooth/rfcomm.conf
The two important pieces of information are the addresses of the bluetooth devices and the channel numbers for the DUN connections
# RFCOMM configuration file /etc/bluetooth/rfcomm.conf
# Bluetooth address of T610
# RFCOMM channel for the T610
# Description of the connection
comment "T610 Dial-up Networking via Bluetooth";
# Bluetooth address of XDA
# RFCOMM channel for the XDA
# Description of the connection
comment "XDA Dial-up Networking via Bluetooth";
Remember when testing that whenever you change a configuration file such as the above which you are going to use you must reboot the machine or restart the relevant sub-system, in this case by:
sudo /etc/init.d/bluetooth restart
The extra device appears in /dev so it can be accessed via the Network Manager, a terminal program such as wvdial but my preference is for the gnome-ppp Dialler we installed and set up earlier.
The next step is the extension from dialling an ISP on a land line or mobile phone via bluetooth to use of GPRS/3G on the mobile phone. GPRS/3G access does not involve use of a normal telephone number but uses a special code in place of the number to access internal 'registers' in the phone which contain information on the connection such as the APN (Access Point Node), login name, password and possibly an IP and a DNS address. Each phone will be slightly different but in general they will contain a set of registers sufficient to hold the configuration settings for about 8 connections (sometimes described as accounts or profiles in the manufacturers literature). Each of these will have a CID (connection ID) associated which identifies which one is to be used. A special code is sent to the phone instead of the usual access number. The number used is *99***X# where X is the single digit CID number referred to above. The default connection (CID 1) is more easily accessed by *99#.
A common way to set up a phone used as a modem is for the APN to be loaded by a modem initialisation string before the connection is initiated. There are also other options which need to be set up for a GPRS/3G PPP protocol connection (the usual standard). Neither are possible using the Network Manager alone so other means must be used to connect.
Returning to the chronological order you will recall that I wanted in particular to be able to use the XDA Exec as a modem via Bluetooth in Linux as I had failed in Windows. It has also proved challenging with Linux and it took me 5 or 6 weeks before I found a way to get it working - if you follow the procedures here it should take a similar number of minutes!
First pair the XDA and the laptop from the XDA Start -> Settings -> Bluetooth -> Tick make discoverable -> Devices -> New Partnership
The first problem was that I had difficulties in obtaining the channel used for Bluetooth as the command ‘sdptool browse <phone-bluetooth-address>’ gave no response. I did a man sdptool and sdptool -h and discovered that their were many more options and used an alternative option to search for all DUN connections which worked. You can use the following commands with the XDA:
sdptool search DUN
Once I discovered this on the XDA I started to use it as my standard method and it is documented above in the Bluetooth sections so I will not repeat the tables showing the output and the resulting configuration file for he XDA and T610 as they are both in the Bluetooth modem section.
I found, by trial and error that the T610 and XDA also responded to HF - Hands Free gateway (6 - 2) and HS - Voice Gateway (1 - 3) and OPUSH (10 - 3) The full list includes according to the help file includes: DID SP DUN LAN FAX OPUSH FTP HS HF SAP NAP GN PANU HID CIP CTP A2SRC A2SNK AVRCT AVRTG SR1 SYNCML ACTIVESYNC HOTSYNC PALMOS NOKID PCSUITE
Now one should note that the XDA Exec is supposed to need the Wmodem program to be running and to be set to Bluetooth before it can be used as a modem. It certainly needs it to act as a USB modem with Windows. I found this was not required for Bluetooth - the only difference I could find was that one got a display of 'lights'. We also have a Palm Treo 750v running Windows mobile and have added a third device and it does not need the Wmodem program running either.
I however still had one major problem - I could make a standard GSM dial up connection via the XDA but not a GPRS connection using the initialisation string followed by a dialing string of *99***1# - a mechanism that works perfectly with the T610. I tried using both wvdial and gnome-ppp and the same occurred with both - good GPRS connections via the T610 but only a GSM dial-up connection possible via the XDA. I recall that I never made a satisfactory GPRS connection under Windows via Bluetooth and the XDA either and gave up.
I was at a loss until after many weeks I read in a script for a Mac accessing a Windows Mobile machine that Windows for Pocket PCs does not allow GPRS configuration changes through the modem interface - I therefore tried taking out the setting-up Init string and used a dialing code of *99# which activates a connection using default parameters already in the XDA. It all then seemed to work fine. One obviously needs a working connection set up on XDA before using it as a modem and I note that the Options screen in WModem has a tick box to select a preset GPRS connection which was also set up in my case.
I initially tested it using a Prepay SIM then changed to a Contract SIM. I made a new connection for the Contract SIM in Start -> Settings -> Connections -> Connections -> Add a new modem connection in the usual way and then used it briefly so the new default route is set up. I also went into Start -> Programs -> Wireless Modem -> Tools -> Options and gave the new APN an left the box ticked - I do not know if that was necessary. I made no changes in gnome-ppp which then connected through the changed SIM
If you are going to regularly make connections to the internet by any form of modem you need a simple tool with a Graphical Interface. gnome-ppp is the best I have found and I have used it extensively for every type of modem. The PPP stands for Point to Point Protocol which is what is used by all modems to connect your machine to your ISP or mobile provider. The latest network manager available in Jaunty Jackalope handles Mobile Broadband connections but not other connects so gnome-ppp will remain as one of the first tools to install on a new laptop by me. Unfortunately it does require a little tweaking under the latest versions of Ubuntu which have remained strangely undocumented and probably merit a bug report.
GNOME PPP is installed via Add/Remove and seems to be an excellent way to get a simple dial up connection which also puts a icon in the bar which can be used to monitor and stop the connection - first class for a normal simple modem set up which detected my serial modem automatically and connected me up. It does not have a mechanism built in to handle multiple connection but it is so simple to change that may be not worth worrying.
Installing gnome-ppp: gnome-ppp is not installed automatically so install it with Add/Remove programs and searching for gnome-ppp.
On some versions of Ubuntu you do not automatically have all the permissions to run gnome-ppp if you are the first (default) user created even with though you should have all the normal administration privileges - you need to be both in the dip and the dialout groups to run it. This apparent mistake was probably done for additional security but is a nuisance. If this is the case the log file which is available from the Log button will have a line complaining about permissions for the executable file /usr/sbin/pppd.
The easiest way to get the required privileges is to do System -> Administration -> Users and Groups then unlock with your password and highlight your user name and click Properties and on the User Privileges Tab tick 'Connect to Internet using a Modem' which adds you to the dip group and 'Use Modems' which adds you to the dialout group. Neither act immediately and you need to restart or logout and back in as the same user.
If this does not work or you prefer to use a terminal then the following two commands will add YOURUSERNAME to the dip and dialup groups
sudo adduser YOURUSERNAME dip
sudo adduser YOURUSERNAME dialout
You can check which groups you are in (and get some other useful information by:
The output from id on my working system looks like the following:
uid=1000(pcurtis) gid=1000(pcurtis) groups=4(adm),20(dialout),24(cdrom),
If you want to save the username and password in gnome-ppp they are saved in /etc/ppp/pap-secrets and etc/ppp/chap-secrets and you need to give read and write access to them from group dip - if you do not then you will get an warning message in the connection log. In most cases this does not matter as the username and password are not actually used or checked by most mobile internet providers - they know who you are from the SIM which is already registered before you can access data. Even so it is best to set these permissions. I use a root file browser which is started in a terminal by:
You then navigate to folder /etc/ppp and right click on pap-secrets -> Properties -> Permissions tab then select dip from the drop down menu for Group and and then select read and write under Access. Repeat for chap-secrets. The annoying warning messages should now disappear.
Normal Configuration: Once you have done the preliminaries above the main configuration is done by a GUI interface and is all fairly obvious if you are making a simple land-line Dial-Up connection. The default modem initialisation strings and other settings will almost certainly work so only the initial screen needs the username, password and telephone number need setting for a simple land-line modem. You may have to set the device for your modem by clicking settings if it is a none standard types of modem. The only thing missing with gnome-ppp is help. It uses its own configuration file $HOME/.wvdial.conf which it is reported can have additions despite the warnings not to modify by hand.
Jumping ahead slightly, If you want to make a GPRS connection via most mobile phones you need to set up the APN via an initialisation string option on the second tab of the Setup Screen, and then use a special code in place of the phone number. Using Vodafone UK PrePay on the T610 as an example the Initialisation string 3 is set to:
Init 3 AT+CGDCONT=1,"IP","pp.vodafone.co.uk"
and the phone code used is
For other providers replace the pp.vodafone.co.uk with their APN (eg Vodafone UK Contract is internet, Guernsey Wave is pepper and Vodafone NZ is www.vodafone.net.nz)
In general the username and passwords are not checked but for most phones something needs to be present - check with your provider. I use web and web with vodafone. There are more details on my Global Communications and Computing page
Some other options need to be set for many mobile network connections to prevent them timing out. These are not possible via the GUI interface and I change them in the the 'master' pppd (I think that stands for ppp daemon) set up file which is /etc/ppp/options so the changes apply to all users. We can look at the current options which are set by:
sudo egrep -v '#|^ *$' /etc/ppp/options
It is desirable to make a backup before editing the /etc/ppp/options file so to make a copy and open a terminal:
sudo cp /etc/ppp/options /etc/ppp/options_bak
sudo gedit /etc/ppp/options>
I have made three changes to the file. The first two are essential for most GPRS connections and disable the sending and checking of the echo response sent to check the connection is alive - the echo is not implemented by most mobile service providers and the default result is that 4 echo response requests are sent at 30 second intervals and after the 4th failure to receive a response the connection is broken. If you are disconnected after 2 minutes that is the cause. The new values of 0 inhibit the sending and checking:
The third change is essential for the Vodafone PCMCIA Connect Card but does not impact other connections significantly so I do it routinely so I do not forget. It involves disabling negotiation of Van Jacobson style IP header compression by un-commenting
I have also tried modifying the /ect/ppp/options file to add an extra delay before connection as I was sometimes not getting a correct DNS delivered using gnome-ppp with the Vodafone but it seems to have little benefit but you can try.
Permissions again: I have once had a problem after installing and uninstalling the vodafone connect software with gnome-ppp complaining about permissions which did not seem to be cured by the setting your user permissions as above - it seemed that the other software had modified something and gnome-ppp or more precisely the pppd daemon needed to be run as root. This was cured by setting the setuid attribute with:
sudo chmod u+s /usr/sbin/pppd
When an executable file has been given the setuid attribute by root, normal users on the system can execute this file and gain the privileges of root who owns the file.
The signal strength on a mobile connection can in many cases be obtained by sending a special 'AT' string to it. I add an extra init string to gnome-ppp so it is reported in the connection log when using mobile broadband dongles which do not display signal strength. This is only a snapshot but does help if you have a poor connection and want to know why. I therefore set:
Init 4 = AT+CSQ
which writes a line in the log file in the format:
<rssi> is the Received Signal Strength Indicator
0 = 113 dBm or less
1 = 111 dBm
2 to 30 = 109 to 53 dBm
31 = 51 dBm or greater
<ber> is the Bit Error Rate, in percent (99 is not known or not detectable)
In practice, if the signal strength is below 10 then GPRS connections are unreliable. Values around 15 are good, 25 is excellent. The log file is accessible whilst connected by right clicking on the connection icon in the panel -> Connection Log.
This does not work with Windows Mobile based phones and will give an error which prevents a connection.
It is desirable to have a real time display of the data used during a mobile connection and the data rates being achieved. The Netspeed Applet has to be first installed by Add/Remove then added to the panel by right licking an empty spot on the top panel -> Add to Panel, Selecting and Adding. Right click it to change the display or give graphical information.
The writers of Firefox 3 have tried to be clever and automatically start Firefoz in the Offline Mode if there is no internet connection present. They have done that in Linux by checking if Network Manager has an open connection which is fine for the Ethernet and Wireless Network connections that are looked after by Network Manager. Unfortunately Network Manager does not know about Point to Point Protocol connections - that is dial up and other mobile connections using the PPP daemon. The result is that if you make a connection using gnome-ppp Firefox swithes into Offline Mode when it starts and it has to be switched back using File -> Work Offline. This is OK for the occasional connection but gets very tedious if you have mobile broadband in use all the time or have a old telephone dial up via a modem. This has been discussed at length and there is now an option to inhibit the feature but only deep in the configuration. The way to access it is by entering about:config in the address bar and then enter. This will bring up a warning screen about dragons being present so you have to take care - click Ok and then enter toolkit.networkmanager.disable into the filter which will reduce you down to a view of the required option which will be currently set to false. Right click -> Toggle - this will change the value to true and inhibit the check in network manager. Exit Firefox and when you next use it on a PPP connection it will no longer start up offline. For more details see The Mozillazine Article toolkit.networkmanager.disable
The first stages went well and the Vodafone Connect Card was detected when I plugged it in.
All the pages above refer to use of a communication terminal program called minicomm which is not available in Ubuntu Dapper Drake - Add/Remove the Serial Port Terminal instead. You can override the preset selections to use ttyUSB0. After plugging in the card and monitoring with dmesg I used the terminal to send a few AT commands and monitored/interrogated various settings OK. The card needs to be turned off with:
sudo cardctl eject
before taking it out if the machine is on otherwise there is a risk of damage (as with any card). This command is due for replacement and I will report when I find its replacement. I latter set up a script run from the desktop which ejects the card or warns to turn the machine off instead if you do not have access to the superuser password.
After studying the references above and other information, I started using wvdial with the following files when using the Vodafone Connect card, T610 and XDA:
# Seems to be overridden by the Auto DNS = 0
# The following turns off header compression -
# the first is essential for the Option card
# Following essential with many mobile telephones where
# there is no echo response implemented
# The following have also been suggested as appropriate but I have not used
# plugin passwordfd.so
They make use of various options (not to be confused with the card which is made by Option Wireless Technology and enable me to test the T610 and XDA as well as the Vodafone Connect Card with minimum editing. I am not sure I understand the value of all the possible optional sections and only used wvdial option internet in most cases. The pin option is required if your SIM has a pin set (my did not at the time) - however note that you can only enter the pin once - further times causes an error which these scripts do not handle. The easy way is to put the SIM in a mobile you understand and turn the pin off - fine for a Prepay SIM but a risk for a contract SIM. If you want to do it the hard way in a terminal I understand from Linux and the Vodafone Mobile Connect 3G/GPRS Datacard but have not tested the following. Send AT+CLCK="SC",0,"XXXX" (replacing xxxx with your own PIN) to turn off the PIN question. This way, your UMTS card will start searching for a network immediately. To turn the PIN question on again, type AT+CLCK="SC",1,"XXXX" and to check if it's on or off, type AT+CLCK="SC",2 if it says "+CLCK: 0" the PIN is off, if it says "+CLCK: 1" the PIN is on.
When using the main scripts above with wvdial and the Vodafone Connect Card I found I got a connection but did not get an IP address or DNS servers issued so I paused to ruminate. I have found from searches that the problem is not mine alone (see Linux - HOWTO - Page 11 . The default IP address provided is not a problem but the DNS (Domain Name Server) addresses of 10.11.12.13. and 10.11.12.14 seemingly coming from Vodafone are no use and their is no domain name resolution. The answer is to use fixed DNS servers and rather than use the Vodafone UK ones I have been using ones from OpenNic
Primary DNS 188.8.131.52
Alternative DNS 184.108.40.206
Pings show that the primary one is very fast although it is in Germany.
These can be set by using the Network Manager - System -> Administration -> Networking but they will not remain if you switch to an Ethernet or WiFi connection where new addresses are obtained so further work is needed. They are stored in /etc/resolv.conf which gets overwritten which gets overwritten. so /etc/wvdial.conf also needs to be modified to have a line in the Default setting when using the Vodafone Connect Card is not providing DNS of
Auto DNS = 0
I have updated the files above with the new settings. At least this has got me up and running with the Vodafone Connect Card so I do not need to move SIMs round.
There is also a very useful command mentioned in PHARscape - Vodafone 3G (UMTS) Howto that changes the way the V3G card behaves that I plan to try and use so I can prefer connections with the slower but more reliable GPRS:
Vodafone now offer a package with a USB broadband stick preloaded with 1 Gbyte of UK data for £49 reduced to £39 for Xmas. Top ups are £15 for 1 Gbyte. The stick I received even has a micro SD reader built. It is branded as a Vodafone K3565 which is detected as a Huawei E220. It handles GPRS, 3g and the latest HSDPA services providing 3.6 Mbaud rates. The MSI Wind has no PCMCIA slot so this is perfect for round the UK and I think I have persuaded Vodafone to unlock it for roaming with different Vodafone SIM cards. The service includes reception of texts but not sending.
I had been reading Linux Format which had an article on Mobile broadband which pointed me towards a control application writen by the Vodafone Group - it is not officially supported but is an Open Source development which can be used for many USB 3G sticks and service providers. It is succintly named the vodafone-mobile-connect-card-driver-for-linux which everyone appreviates to vmc. The vmc installation details are at http://www.betavine.net/bvportal/resources/datacards/os/ubuntu and there are also a series of support forums. It took me a little while to work out exactly how to install the software and there were a few things that I wish I had realised in advance which I will cover:
VMC Dependencies: A number of extra packages have to be installed to satisfy dependencies before running the vmc installer. I did realise about these and installed all the following packages - I used System - Administration -> Synaptic Package Manager. Note that you may have to enable some extra repositories. The other way used in their install scripts is:
sudo apt-get install python-dbus python-twisted python-serial python-glade2 python-pysqlite2 wvdial
sudo apt-get install python-notify python-gnome2 python-gnome2-extras python-serial hal python-tz
sudo apt-get install python-setuptoolsbluez-gnome python-gnome2-desktop
Installing: The package is installed by downloading the Auto Install file , copying to your home directory, changing the permissions to make it executable and then sudo ./vmcfilename.net . I took a while to realise the obvious and change the permissions to make the file executable. I installed the latest version 2.0 beta3 - they seem to update every couple of months and there is now a final version > 2.10. I had satisfied all the dependencies so I do not know what happens if you have missed any. Part way through it asks for you to give a list of users who need to run it - I latter found that the list should contain root to avoid the following problem. There is now a txt file included in the download package with full instructions.
VMC Permissions - when I had installed the Vodaphone the VMC software and ran it the first time it complained about the permissions for the opt/vmc/etc/ppp folder which I set to 777 the easy way by gksudo nautilus to change their properties as root. I actually set all the subdirectories at the same time which caused further complaints about pap-secrets and chap-secrets which I had to set back to 660 after which there program ran happily. They all belong to group vmc in the beta version - it may be dialout group now and you should be a member of that group to run it anyway
I found latter in a conference posting that during the install when it asks for users who have permission to run the device one should include root and then the permissions problem disappears. You can uninstall vmc to repeat the install by (both untested):
Multiple instances of the device: The only problem I have which is independent of software used is that modem is detected when you plug it in but it ends up with multiple installations of the USB devices the first time it is plugged in after the machine is booted up. If you unplug and plug in again it is perfect - you can do it many times without problems. This seems to be to do with the fact that it changes mode - initially it looks like a CD so the drivers can be automatically installed under Windows then switches to a modem mode.
You can check what you have after the first time you plug in by;
which should show the Modem as well as other USB devices
Bus 004 Device 006: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem
Bus 004 Device 002: ID 0c0b:2bcf Dura Micro, Inc. (Acomdata)
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
and then you can check the actual devices which have been installed by
ls -al /dev/ttyU*
you should only have two or three devices /dev/ttyUSB0 /dev/ttyUSB1 and possibly /dev/ttyUSB2 as it also has a built in card reader for a micro SDC card. If you have more it will not work. Unplug and plug in again, wait 30 seconds and check again. At one time I had 12 devices listed! You may want to write an alias for ls -al /dev/ttyU* or put it in a launcher on the desktop as one tends to use it quite often!
pcurtis@triton-ubuntu:~$ ls -al /dev/ttyU*
crw-rw---- 1 root dialout 188, 0 2008-12-21 19:00 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 2008-12-21 19:00 /dev/ttyUSB1
I tried the small program provided by vodafone called usb_modeswitch to switch between CD boot mode and Modem mode but it did not work even after trying various settings in the confg file - it recognised the device but does nothing. I am still into having to check if the devices are correct with ls -al /dev/ttyU* if it does not fire up correctly and pluging in again if still a problem. This problem does not occur with the kernel used by Jaunty Jakalope
When you set up gnome-ppp the only new information needed for vodafone PAYG Broadband is:
The APN is unusual as vodafone usually use pp.vodafone.co.uk for PAYG and internet for contract but I got it from the default under Windows and only that seemed to work when I tested in a normal phone as well as in the dongle. I just added an init string to set up the default APN (CID 1) and it also worked immediately. I use the following init strings:
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","pp.internet"
I am not sure that the init2 is needed - it is the standard set up for a fax modem as used through a mobile phone .
The 'number to dial' is set to be *99# or *99***1# and I use stupid mode to get a quick connection.
I have looked at the codes sent by vmc and tried the codes there to set GPRS prefered as an init code. It does not seem very effective but for completeness the codes I have extracted from the vmc source are:
For GPRSONLY set
For 3GONLY set
For GPRSPREF set
For 3GPREF set
I have not found a way to check ones credit under linux as the linux vmc software does not support - if the software is improved to do so I will install it. Currently credit checking and Topup via a vouchure is available under the Windows VMC or by telephone and credit card however 1 Gbyte should last a long time!
The Hauwei modems are detected correctly by the latest Linux kernel in Ubuntu 9.04 Jaunty Jacalope and the latest Network Manager Applet in Jaunty has full support for Mobile Broadband. The modems appear on the drop down list when you click the applet in the yop panel and you just click connect. You will have to set up the APN etc the first time after which it is just two clicks to connect and disconnect. The set up screens are reached by a right click on the applet -> Edit Connections -> Mobile Broadband tab
I need my dongle to be unlocked for use in New Zealand with an existing NZ Vodafone SIM card. Firstly some areas of Vodafone themselves are not sure if this can be done - it is no good ringing Customer Services on 191 who will tell you that they can not get unlock codes for mobile broadband - instead look at the posting on the Vodafone eForums http://forum.vodafone.co.uk/index.php?showtopic=27722 and then make a request on their form at http://help.vodafone.co.uk/contactus .
Whilst waiting for the unlock code I tried to find out how you enter it into a Dongle rather than a phone where you wrap it up in some codes and 'dial' the result. The Vodafone dashboard under Windows is based on the one from Huawei but has the facility removed. After a lot of searching I found that it can be done by sending a special AT string to the modem. Most modems still have a serial connection to the computer and are controlled by a set of serial commands sent to them which are extensions of the original Hayes Modem AT commands going back to the first serial dialup modems of 30 years ago. The AT stood for ATtention. Wikipedia wil give you a start if you want to understand a bit more - see http://en.wikipedia.org/wiki/AT_commands .
The AT commands I have found which seem to be relevant are:
This is the command to interogate the locking status of the dongle and SIM card which will respond
for an accepted and usable SIM or
for an unacceptable SIM ie one that you are locked out from
Checking the status is a good way to ensure you understand what you are doing and that you are entering AT commands correctly and you should try with your current working SIM and the one you wish to use just in case it is already usable.
Now how to we actually send the commands? This needs us to connect to the modem (USB Dongle) using a serial terminal where we can type the commands, send them and look at what response comes back. There is a terminal program available under Ubuntu which makes this very easy. Load it by Applications -> Add/Remove and search for Serial port terminal and Install it. It will then be avialable by Applications -> Accessories -> Serial Port Terminal
Make sure the dongle is plugged in:
Run the Serial Port Terminal. Ffirst set up the port by Configuration -> Port -> Port: which you set to be /dev/ttyUSB0 (type it in to the Port: box as it is not on the drop down list) -> OK . Note you have to do this every time you run the program, it is a very basic tool!
Now you can enter AT return and the response should be OK - if the AT is not echoed or you do not see the OK check the Port is set correctly.
You can now try: AT^CARDLOCK? with your current working SIM and then with the one you wish to use just in case it is already usable and as a baseline. The following screen shot shows the Window with this when using my Vodafone NZ SIM - it looks just the same but with a 2,10,0 when I use my Vodafone SIM provided with the Dongle.
Only after you have done the above and are happy with what you are doing should you use the code you are sent by vodafone as you have a limited number of attempts before you are locked out from the Dongle. The string you send has no spaces and I understand the quote are important and you should replace the 47938060 by your NUC code
You will see above this returned OK as the code was accepted
You can now try AT^CARDLOCK? again and it should now respond with: ^CARDLOCK: 2,10,0 instead of ^CARDLOCK: 1,10,0 as shown at the bottom above. The screen dump is of the actual proceedure when I unlocked my Dongle and has a couple of extra AT commands to check everything was working before each stage - note that the commands are not case sensitive although the convention is always to use upper case.
I have now reached NZ and have checked that the dongle has been unlocked so that it works with my NZ Vodafone card as (March 2010)
This proceedure needs care and is at your own risk as it is not in any way supported or authorised by Vodafone UK - they will offer to send you a program to do it if you telephone them and are in the UK and are using Windows and their dashboard.
I have been accessing a NZ Telecom T-Stick under Ubuntu Hardy Heron 8.04 which I got working in an hour or so using the software built in and that I had already installed for other Dial-up connections. I found sufficient information on the web at Nathan Cooks Blog Article on the Telecom T-Stick under OpenSuse to find the username and password (username: mobile@jamamobile password: telecom) and the pseudo dialling code for a CDMA connection (#777) which gave me the confidence to proceed.
I first plugged the t-Stick into a Windows machine so I was sure it worked and was enabled - I am not sure it is essential but recommend it as a sensible proceedure - no usernames or passwords were required and the Windows software looked very easy to use. The drivers self install as the T-Stick appears as a autostarting CD drive when first plugged in - a trick which is very good under Windows but can cause problems under Linux as I had found with the Vodafone equivalent.
Returning to Ubuntu 8.04.1 I first checked if there were drivers and their version in the system for the Sierra modem by:
which told be I had driver version v.1.2.5b available and I did not have to do any further work.
I pluged in the T-Stick and in a terminal typed
which had the following at the end of the output:
[ 1018.489995] usb 1-1: USB disconnect, address 3
[ 1018.491730] sierra3 ttyUSB0: Sierra USB modem (3 port) converter now disconnected from ttyUSB0
[ 1018.492344] sierra3 ttyUSB1: Sierra USB modem (3 port) converter now disconnected from ttyUSB1
[ 1018.493098] sierra3 ttyUSB2: Sierra USB modem (3 port) converter now disconnected from ttyUSB2
[ 1018.493180] sierra 1-1:1.0: device disconnected
[ 1022.738202] wlan0: no IPv6 routers present
[ 2886.821961] usb 1-1: new full speed USB device using uhci_hcd and address 4
[ 2886.896942] usb 1-1: configuration #1 chosen from 1 choice
[ 2886.920784] usb-storage: device ignored
[ 2886.925656] sierra: probe of 1-1:1.0 failed with error -5
[ 2887.123273] usb 1-1: USB disconnect, address 4
[ 2888.405129] usb 1-1: new full speed USB device using uhci_hcd and address 5
[ 2888.566272] usb 1-1: configuration #1 chosen from 1 choice
[ 2888.569185] sierra 1-1:1.0: Sierra USB modem (3 port) converter detected
[ 2888.577345] usb 1-1: Sierra USB modem (3 port) converter now attached to ttyUSB0
[ 2888.577514] usb 1-1: Sierra USB modem (3 port) converter now attached to ttyUSB1
[ 2888.577649] usb 1-1: Sierra USB modem (3 port) converter now attached to ttyUSB2
[ 2888.609553] scsi6 : SCSI emulation for USB Mass Storage devices
[ 2888.668915] usb-storage: device found at 5
[ 2888.668925] usb-storage: waiting for device to settle before scanning
[ 2890.561028] usb-storage: device scan complete
[ 2890.563971] scsi 6:0:0:0: Direct-Access Sierra Wireless Storage 2.31 PQ: 0 ANSI: 2
[ 2890.571046] sd 6:0:0:0: [sdc] Attached SCSI removable disk
[ 2890.571150] sd 6:0:0:0: Attached scsi generic sg2 type 0
This showed that the T-Stick had been detected and installed with three USB modem connectors - the one used for normal connections is ttyUSB0. There is also detection of the built in usb storage for booting and the MicroSD card slot - you will see some extra output when a MicroSD card is plugged in and it will appear on the desktop just like any other USB memory dongle
You can get further information to confirm that the modem has been installed correctly by using additional terminal commands to list the USB devices by lsusb and ls -al /dev/ttyU* as shown below. They were explained above for the Vodafone USB Broadband dongle.
Bus 005 Device 003: ID 0bda:0158 Realtek Semiconductor Corp.
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 008: ID 05c7:0113 Qtronix Corp.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 009: ID 1199:0023 Sierra Wireless, Inc.
Bus 001 Device 001: ID 0000:0000
pcurtis@wind-ubuntu:~$ ls -al /dev/ttyU*
crw-rw---- 1 root dialout 188, 0 2009-02-27 17:49 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 2009-02-27 17:49 /dev/ttyUSB1
crw-rw---- 1 root dialout 188, 2 2009-02-27 17:49 /dev/ttyUSB2
I then tried to connect using gnome-ppp with the username, password and a phone number of #777 having set the device to /dev/ttyUSB0 . I found that I needed to remove all by existing connection strings just leaving the inbuilt ATZ to reset the modem. I also found I needed to use root to set the username and password in the file /etc/ppp/pap-secrets by adding a the line:
mobile@jamamobile * telecom
to the end of the /etc/ppp/pap-secrets file - I think this was only because I do not have the permissions correctly set up for the access to the file from gnome-ppp so it may not be needed in your case - I did not investigate further as I have a philosophy of "If it's not broke don't fix it". The file can be edited by using:
sudo gedit /etc/ppp/pap-secrets
At this point I could make a connection using gnome-ppp and had fast efficient access. The connection time was also very fast, especially with the gnome-ppp 'stupid mode' option set.
It does not seem to have the problems of my Vodafone equivalent in the UK where it has to be plugged in when the machine is booted from cold - in this case there seems to be no problem in pluging in and removing with the machine on and after the machine has been suspended.
Before comparing the two major competing systems in New Zealand it is worth discussing the very different systems used:
New Zealand Telecom does not use the usual GPRS data coding for its data communication network and phones do not include a SIM card and the 'personalisation' (Phone number etc.,) information is hard wired into the phones/data cards. They use CDMA (Code Division Multiple Access) which is a wideband spread spectrum technique allowing many active users to share the same channel. Each user is assigned a unique digital code, which differentiates the individual conversations on the same channel. In contrast GPRS uses a time division multiple access (TDMA). In both cases further techniques are used to provide the very high data rates used in Mobile Broadband, in conventional systems they are 3G, UMTS etc., culminating in High Speed Downlink Packet Access (HSDPA), sometimes known as 3.5G. Currently, HSDPA can in some implementations provide downlink transfer speeds of up to 21 Mbit/s and Vodafone in the UK provides theoretical speeds of up to 7 Mbytes using the USB dongle described in an earlier section. In New Zealand I have been accessing Vodafone via a mobile phone and even with a rare UMTS connection it has been painfully slow in many locations and on one occasion it took nearly two hours to upload a litle over 2 mbytes of data from Pauline's OU teaching
Telecom uses Evolution Data Optimized ( EVDO) network access which uses multiplexing techniques including Code division multiple access (CDMA) as well as Time division multiple access (TDMA) to maximize both individual user's throughput and the overall system throughput. There are a number of different versions/speeds available and the type/speed of network detected is shown by the colour of the blinking LED on the T-Stick –the slower speed (Orange flashing) supports connections with data rates up to 153 Kbps. The higher speed (Blue flashing) standard Rev. A supports connections with data rates up to 3.1 Mbps (downlink from the network) and 1.8 Mbps (uplink to the network). The lights are continuous when a connection has been made.
The Mobile Broadband speed received in practice will vary based on the number of users on the network, coverage and environmental conditions, applications used, network traffic, and file type. Telecom claim that on average their Mobile Broadband cell sites enable download speeds of 800Kbps and upload speeds of 300Kbps when using a Mobile Broadband Rev A data device such as the T-Stick.
I have had reliable connections everywhere I have tried to use the T-Stick and they have provided good data rates close to the limits claimed by Telecom and in some places it has proved faster and more reliable than using broadband via Wifi. For example I checked the speed on a couple of Linux updates of 2 and 7 mbytes and the download rates never fell below 100 Kbytes/sec with the maximum 230 kbytes/sec (average about 1.5 Mbps) early morning on Waiheke Island near Auckland with a EVDO Rev A (blue light) connection. This exceeds what I get in practice in the UK on a hard wired (copper) broadband connection at most times of day and much better than I have seen on Vodafone in New Zealand on the few occasions I have had a UMTS connection via my phone. In the UK I have seen similar speeds on my Vodafone Mobile Broadband USB stick which has a 3.6 Mbps capability but I did not make extensive quantitative measurements in the few days I had it before leaving for NZ.
During connections with the T-Stick at the lower data rate (orange flashing light on modem) the downlink speed is still a very acceptable 17kbytes/sec in the Auckland area which is faster than I have had with the 2G connections with Vodafone which are all that is currently available over most of the Vodafone coverage areas. In very weak signal areas the rates seemed to fall dramatically with a Telecom connection through the T-Stick and on Great Barrier Island whilst sailing I found it beneficial to bring the laptop up on deck.
I have just bought an extra USB dongle in New Zealand which was on a special offer and was unlocked. I thought it was a K3565 like my existing one but I quickly discovered it was a K3565-Z which contained a completely different chipset from a different manufacturer ZTE, a large Chinese manufacturer, which was not recognised by by Ubuntu Jaunty or even under Windows by my existing Vodafone Dashboard. I found various bits of information on the internet and I have got it working. The stages I had to do were firstly to get it working under Windows to check it was not faulty, switch its mode using terminal commands under Windows so the auto-mounting function was turned off then do some configurstion so it could be started by GnomePPP - as yet it is not recognised by the NetworkMananager Appletin Jaunty. Initial indications from tests using the Lucid LiveCD are that there is some support built in. The stages I took on Jaunty were:
I uninstalled the existing Windows Vodafone Dashboard and reinstalled from the K3565-Z following the Vodafone instructions.
I then checked it was recognised as a modem by the dashboard and closed the dashboard.
I then looked in the Device manager to find which serial port had been used to mount it.
I started Hyperterminal and sent a magic AT command to permanently turn off the auto-mount function. This means that it will be detected as with a different 'product code ' (device) under Linux .
The AT command to turn off the CD autorun starting mode is:
and the response is
Close autorun state result(0:FAIL 1:SUCCESS):1
This is reported to work with many ZTE dongles but try googling first. It can be turned back on by AT+ZCDRUN=9.
(This might be possible under Linux by ejecting the drive when it mounts, seeing if you get a change under lsusb and then doing a modprobe as above to get a serial link at which point you could use the Linux Serial Port Terminal on /dev/ttyUSB1 to make the change - NOT TESTED)
Now I switched to Linux and checked the command had worked by using lsusb. The important change is that it is now detected as ID 19d2:0063 rather than ID 19d2:2000. Different versions of ZTE modems used by Vodafone seem to have a different code to the 0063 - earlier versions seem to have 0031 and 0052 and some Australian versions are 0065! It should look like:
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 19d2:0063
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0bda:0158 Realtek Semiconductor Corp. Mass Stroage Device
Note that there is still no identification of the device name, just the manufacturer and product codes.
Note - the device may also have been mounted as a memory stick rather than an autostart CD and this can be found in Places as VMC Lite 9.3.6 and ejected if you do not want it. After stages following that should not occur.
It still does not show up as being mounted as a modem - the easy way to check is by typing dmesg | grep tty in a terminal to see any lines in the log file which contain tty (If you want to know what this is all about :dmesg is the terminal command to print or control the kernel ring buffer and the output is piped to the grep program to select only lines containing the tty string).
So we now have to force the loading of the usbserial driver linked to the appropriate vendor and product after which the modem components should be detected as a series of serial USB ports.
sudo modprobe usbserial vendor=0X19d2 product=0x0063
after which you will see it being mounted in the log files and get
pxxxx@xxxxxxx-xxxxx:~$ dmesg | grep tty
[ 0.004000] console [tty0] enabled
[ 1131.722724] usb 1-3: generic converter now attached to ttyUSB0
[ 1131.722958] usb 1-3: generic converter now attached to ttyUSB1
[ 1131.723197] usb 1-3: generic converter now attached to ttyUSB2
[ 1131.723389] usb 1-3: generic converter now attached to ttyUSB3
[ 1131.723623] usb 1-3: generic converter now attached to ttyUSB4
I suggest that you now try to make a connection. I used gnomePPP to connect and that autodetected a modem on /dev/ttyUSB3 which enabled me to connect to the internet using an APN of www.vodafone.net.nz as usual. The setting up and use of gnomePPP is fully described above in the section GnomePPP connection utility for Ubuntu so I will not repeat it all here.
If you wonder why there are so many ports it is because the ZTE modems use the other ports for firmware update or GPS interface as well as monitoring the connection and the designers choose this port numbering. The 2 usable ports are the one used for data (ppp) and the other used for telemetry (signal strength, volume of data traffic, etc) and SMS - they are normally separated by 2. I have checked that the two ports can be used in parallel and have sent SMS messages through /dev/ttyUSB1 whilst connected to the internet on /dev/ttyUSB3.
Once you have tried out a connection you can do the loading of the usbserial module automatically by the following proceedure:
Open /etc/modules by
gksudo gedit /etc/modules
and add the string
usbserial vendor=0X19d2 product=0x0063
Note that the vodem is being periodically changed so the product string may change - get it by lsusb after turning off the autostart function as above.
You can now just prug in the K3565-Z when required and it will be ready for you to connect using gnomePPP.
It is currently not detected by the NetworkManager Applet which has a subroutine to detect the serial port for the connection - this does not handle the 5 five serial ports presented by the ZTE modem and fails to identify the port to use for the ppp connection. I can live with that and so will you have to until a new Kernel version and NetworkManager Applet comes along with support built in for the K3565-Z - several of the ZTE modems are now handled correctly so it is only a matter of time!
I have been using it extensively in New Zealand and it has worked very well. It seems to connect and hold a connection when phone calls are difficult on a good phone (0 bars).
If you do not want to inhibit the autostart facility then you should start looking for how to do it with usb_modeswitch and look at http://ubuntuforums.org/archive/index.php/t-1065934.html and https://lists.ubuntu.com/archives/ubuntu-za/2009-July/003718.html for more ideas. It s also reported to work with the latest Vodafone Connect Software from Betavine. Also see http://www.acomelectronics.com/GeorgeVita/ZTEonUBUNTU.html
You can install udev-extras using Synaptic Package Manager - This probaly has no benefit at present but at some point in development this should enable the Network Manager Applet to also detect the Vodem and remove the need to use gnomePPP. See http://ubuntuforums.org/showthread.php?t=1017630 for how it works with some similar ZTE modems.
I have used the K3565-Z for sending and receiving SMS messages successfully - this is required for querying the account balances etc. The port used for this is /dev/ttyUSB1 and it should be possible to send and receive whilst connected. I have written this up separately at Sending TXT (SMS) Messages from Telephones and USB Dongles which is a new Section under development.
For my future use I am recording some of the TXTs one uses to control and monitor with VFNZ
MYADDONS to 756 gives your mobile broadband addon balance
BAL to 777 gives you PAYG balance
CANCEL BBLITE to 756 stops the automatic renewal of your Mobile Broadband Lite (100Mbyte per month ) addon - needs a confirming TXT
This is detected and can be used under Jaunty by the NetworkManager. The New Zealand version is not locked and can be used with a Vodafone (or other) SIM from any country. The Vodem is a much larger unit than the Sticks described above and is connected via a USB cable. It does not have a built in slot to add a MicroSD card. It has two active USB ports - /dev/ttyUB0 is used for the Broadband data connect and /dev/ttyUSB1 can be used to send and receive SMS messages but unlike the K3565 and K3565-Z this does not seem possible whilst the Broadband connection is open. They are sometimes available second hand on the TradeMe site and being slightly older are well supported in many distributions as well as being automatically detected in SMS programs such as Wammu.
I have been looking for a while for a way to get mobile broadband through a WiFi router so we can share an internet connection and networking whilst we are away from home which uses a USB Mobile Broadband dongle. One big advantage is the way these work is identical to any other ADSL, Firewall, WiFi router and are indpendent of operating system as they are set up and controled by a web interface. This has been available for a while through 3 but it was locked to their system. Edimax, who I know little about, have brought out a box which seems to do almost everything I want and I have been trying it out. The only shortfall is that it runs off mains via the usual fat plug which supplies 12v at 1 amp to the box and there is no car adapter which would make it perfect for our narrowboat - I have discovered that the eeePC runs off 12volts 2 amps and thee are lots of cheap adapters and all I will need to do is adapt the plug into the router.
I bought Edimax Wireless 3G Broadband Router 3G-6200n from Digital Components Ltd for £37.99 plus the usual extortionate postage and packing but that was amortised as part of a larger order. The actual box is quite light and compact (300gms) and likewise the mains adapter is one of the smallest I have seen. It comes with instructions which are quaint but can be understood and a full manual on CD along with a program to install it on Windoz if you do not want to use the web interface. You first need to connect via a network cable which they provide so you can set up the Wifi. This is easy and you connect via a web interface to 192.168.2.1 which is an excellent choice as most people will be using 192.168.1.1 for their normal router. This takes you into a login screen which displays the default username and password of admin:1234 and then to a Quick Setup which takes you through a subset of the setup I cover below for the Mobile Broadband Dongle and WiFi.
You first get a screen to allow you to enter your location, the other items are preset and fine. You can no plug in the Broadband Dongle if you have not already set it up and click 3G on the next screen. The next screen is where you set up the APN for your provider (pp.internet for Vodafone PAYG) and username and password (web web although I think anything will do) and the dial script (this is almost always *99#). You finally get to the Wifi Setup where you set up the SSID (edimax) channel which should be different to any other Wifi boxes to avoid interference (6).
You now need to setup security. I use WEP 128 bit although there are better systems as everybody can use it and add on Mac address filtering at a latter stage as that restricts access to particular machines only - the Mac address is unique and built into the network hardware.
You access the Security at a later stage via General -> Wireless to Security Settings. You need to select Encryption WEP Key length 128 Key format hex and enter a memorable 26 bit hex number (memorable is a joke) but by repeating a shorter number to make it up to 26 long you have a hope of recalling it. As with everything you need to click apply until you end up having to wait for 30 seconds while it set up the router hardware. If you have Linux machines or the latest Windows drivers you will be able to use WPA which is much more secure and also eaier to set up as it has shorter passcodes and I am changing to it on my machines which will be away from home.
Mac access is setup by General -> Wireless -> Access Control. You need to know the Mac addresses of all your machines and add them. When you add them you do not include the : between each one although they are displayed with it! If you do not know them you can find out by Wireless -> Basic settings -> Show Active clients which conveniently stays open in a separate window so you can copy the - cut and paste does not work as they are displayed with the colons! Add them all especially the machine you are working on and then tick the box and Apply etc until you have a 30 second wait. If you get it wrong and cut yourself off you can always use the cable interface to correct your Mac address.
Not surprisingly the box seems to work fine for networking between machines and the internet connection does not need to be present.
There is a connection for a Broadband Modem which can be automatically switched into use when available. I have checked that this can also be used to link to a normal ADSL, Firewall, Router to add Wifi and/or act as an access point in a different part of a house and/or to add WPA to an older Wifi system.
There is also mention of use of the USB port for a network printer which could be used in that configuration. It is not available in the Firmware supplied and you need to do a simple firmware upgrade. I have done the upgrade twice now without any problems, it involves downloading a single file and running a menu item in the control panel and browsing to the location of your file - it is best to do it with an ethernet cable connection. Overall the menus are slightly easier to follow in the new software. I will report further if and when I try the printer option out.
Cautions: There seems to be a slight leakage of data. There are various timeout functions which require the connection to be checked and also there is a check of the time from a timecode server which can be seen in the log files. The leakage seems to be about 3 Mbytes per hour which means it is advisable to disconnect by unplugging the dongle when the system is not in use. There are various timeouts which can be set to break the connection but the one for a 3G connection seems to be missing in versions 2.08, 2.11 and 2.12 of the software compared to the manual which covers 2.00. That said the first day it was on for 10 hours and the cost was £0.84 with two of us using machines and a total data use of about 50Mbytes according to the monitors on the two machines which accounted for £0.75 on the vodafone tariff we were using. The other feature is that it is set up to automatically disconnect after 8 hours and has to be re-enabled by unplugging the dongle or turning it off and on - in view of the data leak, however small, this is sensible but if you place it in the loft for a good signal it cound be inconvenient. Again I will report further when I upgrade the firmware.
This is largely undocumented and is not available until one has done a Firmware upgrade to 2.12 or higher. This then makes a new menu item available under General settings. I set this up to Enable Print Server, IPR Enable, LPR Enable, Print Server name edimax, and left the Print Name of USB Port as lpt1. That was all the extra activities on the box and in retrospect it would probably have worked without any changes at that end.
I could not find out much even with internet searches so finally I ran Network Tools and did a port scan - that produced a number of pieces of paper out of the printer as well as revealing that there was a LPR printer server was listening on port 515. LPD/LPR is short for line printer daemon/line printer remote, a printer protocol that uses TCP/IP to establish connections between printers and workstations on a network. The LPD software runs as a daemon in the in the print server and the LPR software is already built into most Linux systems. The LPR client sends the print request to the IP address of the LPD printer/server, which in turn queues the file and prints it when the printer becomes available.
I set up the Printer via System -> Administration -> Printers -> Create New Print Queue -> Network -> LPD/LPR Printer and filled in the boxes giving a result as below - note I did not need the Print Server Name at all, just the IP address, port and printer stream.
That got the printer up and running but it could only be accessed by WiFi or the Ethernet connections on the Router as the Router did not pass back to the existing network. I therefore decided to use the Edimax 6200 as the Main Network Router and Firewall and just use my existing Wifi, Firewall, ADSL Router as a fancy modem with a cable connecting it into the WAN connection on the Edimax 6200. An associated advantage is that the Edimax gives a stronger WiFi signal and supports WPA as well as WEP which is all I had on my ancient Router. The only problem is that I need to prioritise which Wifi connection is used on the Computers as both are broadcasting still - or turn off Wifi on the old 3Com Router. At least I now do not need to keep a computer running just as a SAMBA print server.
I used the router as a Network Print Server and Wifi Router under firmware version 2.12 for about 6 weeks with no problems until I took it away and tried to use it with for Mobile Broadband. It then became clear that the connection was only staying up for about 1 to two minutes at a time before it disconnected and reconnected. My checks when I had upgraded had been primarily to do with its use as a print server. I downloaded firmware version 2.08 which was still available on the web site and the Mobile Broadband was then perfect again after I had reconfigured all the settings which are lost every time you do a firmware update as you are supposed to do a full restart and load of default settings after every firmware update. There is a facility to save and reload settings but it is still a very undesirable state of affairs and I have contacted the Edimax support and await a response. This may only a problem with my Vodafone Mobile Broadband dongle which is badged as a K3565 but is normally detected as a Hauwei E160E which it is a version of.
The Toshiba L20 laptop had a soft modem for standard dial-up connections - I initially put off installing it as it seemed that relatively easy driver support was likely in the near future. I also had a Xircom PCMCIA modem and Ethernet card which I plugged in - it was recognised immediately and I had a telephone connect working a few minutes later so their was no urgency.
The easy way to get a driver is through linmodems.org but they either need a licence fee or are limited in speed. I first tied the procedures at Howto drivers Conexant softmodem - Ubuntu Forums to get a free driver loaded and nearly lost all as I ended up with an un-bootable kernel and hung machine. Fortunately I had an older kernel left to boot into and I managed to recover eventually so take great care and back up anything valuable before departing from the approved routes.
I then followed the correct procedures by loading a test program for the modem. A good starting place is DialupModemHowto - Community Ubuntu Documentation which sends one to linmodems.org where one can get a free program to identify and help you install soft modems. This showed mine to be an Conexant modem packaged by ATI as I expected. It directed me to download a package (specific to the kernel) to install the modem and the installation was fairly trivial - three lines in a terminal and a couple of questions to answer.
The installation under Ubuntu 8.04 Hardy Heron was slightly more complex - firstly the site was down for two days and then there was a package prebuilt for Ubuntu specific to the Kernel but it also required a modified sound drive alsa-driver-linuxant to be installed before the modem driver. Finally I had to restart and boot into an older kernel as there was no package for the new kernel which had only become available one day earlier. The sound driver would not install by double clicking the .deb but did when installed in a terminal using by copying it to my home directory and typing:
sudo dpkg -i alsa-driver-linuxant_version.deb
I could then install the modem driver package by typing;
sudo dpkg -i hsfmodem-version_arch.deb
It is prudent to set up the modem for the correct country etc before use by
The final action was to reinstall the volume control in the status area as it had been removed during the installation of the sound driver - right click on the status bar and Add to Panel. It did all work after a reboot and downloaded a test file at 100Kbytes/minute which is about what one would expect for a 14 Kbaud connection.
The drivers are restricted to 14 Kbaud unless you pay a $19.99 licence fee which covers one year of support and upgrades and they say will not be kernel or distribution dependent. At present I do not need a faster modem as I have the Xircom anyway. I really tested it all out for the sake of others and it all went together very easily. I believe the a further download and install will be required if the kernel is ever upgraded. If you have a machine with no connectivity you are often in a catch 22 situation for upgrades to set up connectivity. In this case it seems to be possible to download the two files on another machine and transfer them to get one up and running. With a dual boot machine you can, of course, get them under Windows and reboot. The modem software aliases /dev/modem to /dev/ttySHSF0 and gnome-ppp found the modem and worked immediately.
If you get a kernel update ie from 220.127.116.11 to 18.104.22.168 you will need to download a new .deb package from linmodems and install it in the new kernel.
One still needs to update the sound drivers each time under Ubuntu 8.04 Hardy Heron
Having got everything working I decided it is useful to know how much ones sessions have cost. All the data is available in the system logs if you are prepared to plough through them. The current on is in /var/log/syslog and older versions are /var/log/syslog.0 - even older versions are in compressed format. The first of the following searches for Times and Data flows in the current and previous log which usually cover at least a couple of days. The second does the same for the previous 6 zipped logs. Both must be copied as a single line into the terminal or set up an alias. Between them you should have a good idea of the bills you have run up over a week or more!
cat /var/log/syslog.0 /var/log/syslog | grep -e "Connect:" -e "Sent" -e "Connect time" | more
zcat /var/log/syslog.6.gz /var/log/syslog.5.gz /var/log/syslog.4.gz /var/log/syslog.3.gz /var/log/syslog.2.gz /var/log/syslog.1.gz | grep -e "Connect:" -e "Sent" -e "Connect time" | more
I leave the reader the exercise of creating a script and launcher to join them up and perhaps send it all to a file rather than scan it on the screen! An alternative is to put both commands onto a single line separated by a semicolon - again this must be copied and pasted as a single line into the terminal to work.
zcat /var/log/syslog.6.gz /var/log/syslog.5.gz /var/log/syslog.4.gz /var/log/syslog.3.gz /var/log/syslog.2.gz /var/log/syslog.1.gz | grep -e "Connect:" -e "Sent" -e "Connect time" | more; cat /var/log/syslog.0 /var/log/syslog | grep -e "Connect:" -e "Sent" -e "Connect time" | more
I have also made an alias of this in the the .bashrc file in my home folder so I can use it quickly in a terminal. This is acomplished by opening the file by typing in a terminal.
And appending the following two lines lines to ~/.bashrc
#alias for PPP traffic calculation
alias traffic='zcat /var/log/syslog.6.gz /var/log/syslog.5.gz /var/log/syslog.4.gz /var/log/syslog.3.gz /var/log/syslog.2.gz /var/log/syslog.1.gz | grep -e "Connect:" -e "Sent" -e "Connect time" | more; cat /var/log/syslog.0 /var/log/syslog | grep -e "Connect:" -e "Sent" -e "Connect time" | more'
This has been moved to be part of Ubuntu on the Lookout which covers installing and setting up the main programs which interact with the outside world through the Internet, namely Browsers, Email, Contacts, Calendars and Tasks. There are details of sharing and synchronising Email, Contacts, Calendars and Tasks etc., between between a number of computers and with PDAs running Windows Mobile.
I now have everything I need for connections to the Internet on the move using Ubuntu Linux, in fact I am better off than with Windows as I now have a connection via Bluetooth and the O2 XDA Exec. I can use all my SIM cards in the T610 phone (GPRS not 3G) via Bluetooth, use the Vodafone Connect Card or Broadband USB dongle with the Vodafone SIMS offering GPRS/3G/3.5G and use all the SIMs in my XDA which provides 3G. I can also use my Xircom PCMCIA modem for Land-line connections and off course I have WiFi and Ethernet for Hotspots and Broadband at home. All the connections can be made with minor changes in the gnome-ppp using a GUI interface. I can monitor the data used on every connection over the previous week. There were many dead ends followed but for those following me only need to spend a few minutes in low level terminal activities to obtain some information and then make small changes in two or three files - why did it take me so long?
|Dial-up modem (desktop)||External Serial Modem
Built in Drivers
difficult to find.
|External Serial Modem
|Dial-up modem (laptop)||Internal Conexant HFS 'WinModem'
Uses priopriatory driver from Linuxant which needs rebuilding for every kernel change. Charge for full speed version.
|Dial-up Mobile Telephone via Bluetooth||Yes||8||Accessible via gnome-ppp like any other modem.||8|
|GPRS/3G Mobile Telephone via Bluetooth||Yes. T610 phone keeps a log of data use||7||Accessible via gnome-ppp like any other modem.
T610 phone keeps a log of data use
|XDA to Laptop/Desktop
|Mobile to Laptop/Desktop
|GPS data transfer via a RS232 Serial Link
There was No Serial link on the Laptop so a USB - RS232 interface which was supposedly compatible with Linux was ordered and installed
|Routine but tweaking of the port number was need as it was allocated port 11, far too high for the GPS software.||7||Immediately detected and installed but took time to check using dmesg and find out that it was /dev/ttyUSB0||9|
|Vodafone Connect Card||Special software with connection data logging. TXT support.||9||Accessible via gnome-ppp like any other modem.
No TXT support.
|GPRS/3G XDA via USB or Bluetooth||Special Proprietary drivers needed and WModem program has to be running on XDA.
USB works but not Bluetooth.
|6||Accessible via gnome-ppp and Bluetooth like any other modem for GSM/GPRS/3G connections
|Vodafone USB Broadband Stick||Special software with connection data logging. TXT support, Top up and check on amount of money left.||9.5||
Detection is very variable and the stick may need to be plugged and unplugged several times in Hardy
Detection perfect in Jaunty
Vodafone have writen a simplified version of the VMC software for Linux with TXT support but not topup or credit
Full intergrated into the Network manager applet in Jaunty Jacalope
|Modem Data monitoring for Dialup Time and GPRS Data sent and received.||Windows/XDA do not log data use but connection monitored at time||2||Script written for Ubuntu which displays full data for every connection for last 7 days||8|
Finchsync via Wifi and Network
I would be very pleased if visitors could spare a little time to give me some feedback - it is the only way I know who has visited, if it is useful and how I should develop it's content and the techniques used. I would be delighted if you could send comments or just let me know you have visited by sending a quick Message to me.
Fun with Ubuntu Linux | The Road to Freedom - The Journey Starts |The Road to Freedom - Base Camp | Ubuntu All Together - Sharing, Networking, Backup, Synchronisation and Encryption | Ubuntu on the Lookout - Browsing, Email, Contacts, Calendars and Tasks| Ubuntu on the Move | Ubuntu on the Take | The MSI Wind U100 Netbook for Global Communications and Computing
|Copyright © Peter and Pauline Curtis
Content revised: 9 th April 2010