Archive for the 'wireless' Category

Using Vodafone.de CallYa UMTS with Linux

As part of my brief set of posts on getting Linux systems (and sometimes Macs) connected to wireless networks beyond WiFi, here’s a quick post on what’s different when connecting to Vodafone.de with their prepaid CallYa SIM in a Huawei USB stick (this is actually a stick that I bought in London for the O2 network – just switch out the SIM… one of the nice things about GSM based networks).

The first few problems that I ran into shouldn’t affect most people, but just in case… be warned, if you have setup your system to use Vodafone.uk in the past, you are likely to have incorrect settings laying around in conf files…

Once those are removed, plug in your modem and simply create a new connection under Network Manager / Mobile Broadband. Set the APN to event.vodafone.de (this is important – contract SIMs use web.vodafone.de but that doesn’t work with CallYa SIMs). You can type in your PIN in that dialogue as well, that way the system doesn’t ask you for it after every reboot. All the other information is optional or not needed – except for the phone number; the usual *99# does the trick.

Go to the Network Manager icon and click on the new connection you created (it should show up under Mobile Broadband, assuming your modem got recognized correctly). Once the connection is established (the NM icon changes to a broadcast tower) open a web browser and navigate to any arbitrary web page. Vodafone will redirect you to a page where you can pick whether you want to purchase 30 minutes, an hour or a day’s worth of “unlimited” internet. Once you went through that process, everything should work. If I tried to open an ssh connection (or something else) before doing the magic web page thing the system occasionally got confused…

Using the O2 UK Pay as You Go USB 3G modem (it’s a Huawei E220) under Linux

I’ve posted about getting 3G modems to work under Linux before. But trying to get the UK version of the Huawei E220 to work (actually, O2′s website claims it’s an E160 and Linux can’t decide whether it’s an E220 or E270) I ran into some surprising problems.

First, the dumb one. Contrary to US CDMA 3G modems, the European HSDPA ones need a SIM card. Took me a while to realize that I had to rip open the “software package”, find the SIM card and install it.

Duh.

After that it’s the usual dance – plug it in, wait for the option driver to recognize it (I’m running a 2.6.29 kernel but it should work with the stock kernels as well – this is not a particularly new chip), then wait for Network Manager to realize it’s there (tends to take a while, some times several minutes). I tried this under Fedora 10 but I hear that it works very much the same under Ubuntu.

Oddly enough, Network Manager displays TWO entries for this Mobile Broadband modem. And trying to use the second one causes things to hang for about a minute or so. And even using the first one only works every three or four tries (have not been able to figure out why – it just claims that it can’t connect) – but it does work after a while and creates a connection. Simply keep trying.

Now comes the ugly part. Since there’s no client software, on Linux you need to magically go to the right site to top off your account. So bookmark https://mobilebroadbandaccess.o2.co.uk/index as that’s where you need to go (more or less all other addresses simply give you a Connection Refused – it might have been smarter to implement a redirect here, but who am I to tell O2 how to do their job.,,)

But if you think this was stupid, it gets even more brain dead from here. Depending on your credit card issuer you might get redirected to a different site to do online fraud protection – and in my case, that site was NOT on the white list and gave me once again a Connection Refused error, preventing me from completing the transaction.

O2′s setup is actively (and successfully) thwarting my attempts to give them money. They should get an award for that.

The only workaround I could figure out was to connect through some other means, purchase a “top it up” product and then restart the O2 connection and voilà things work nicely.

But of course you run into that same problem every time either your data limit or time limit for your pay as you go account is reached.

What an exceptional display of shooting your own foot…

Update: turns out that T-Mobile is selling exactly the same modem for their version of pay as you go mobile broadband (which is called “web and walk”). And their flavor creates a different challenge. You appear to have to connect to the USB stick once using their Windows tool before it is willing to work. The error messages vary (I tried a hundred different things), but once you connect to the modem with the Windows tool everything works as expected; you don’t even have to connect to the 3G network from Windows – just starting the “web and walk manager” application appears to do the trick.

If you want to be able to use both of them simply create two different profiles in Network Manager; one with m-bb.o2.co.uk as APN for the O2 stick and the other one with general.t-mobile.uk as APN for the T-Mobile one. The rest of the information can be the same: Number is *99#, username and password are irrelevant (but have to be set to something). If you name these two network connection profiles “O2″ and “T-Mobile” then Network manager uses these names when you plug in the USB stick – it can’t tell the two modems apart, so you need to do that manually when you connect – just click the corresponding entry in the Network Manager drop down.

Using the U727 under Linux

This USB 3G EVDO stick is available as Novatel Wireless Ovation U727. Mine is from Sprint, but there also used to be a version from Verizon (but I can’t find it on their site right now).

Sprint states that it supports Linux (which is part of why I got it). Sprint even provides instructions how to install it under Linux. That’s great, except that these instructions are wrong, as are most of the hints you can find online when googling for U727 and Linux.

Sprint tells you to use the usbserial module and give it the specific vendor and product codes for the devices as options in order to tie it to usbserial; something like modprobe usbserial vendor=0x1410 product=0x4010. This is bogus in the first place as the product code for the newer versions of the U727 has changed to 0x5100. But even then, while it might work (depending on how your Linux distribution is set up) it limits your data rate to about 500kbit/s – Sprint even documents that limitation!

If you keep looking, you’ll find several posts online that instead suggest to patch the AirPrime driver in the Linux kernel – only that one was removed in 2.6.26. So with a current Linux distribution (and soon most people will have upgraded to something with a newer kernel) neither of these solutions really works.

Instead, the USB Serial Option driver is now the correct driver to use. But even though this is supposed to work “out of the box” on a recent Ubuntu or Fedora system, I did find myself having to manually load the module before plugging in the stick. Simply run sudo modprobe option from a terminal window before connecting the U727 and things will work smoothly; after a moment NetworkManager realizes that there now is a Mobile Broadband connection available. It tends to populate things correctly (all default settings plus #777 as the number to call), but it’s always worth to double check.

I’ve been very happy with the U727 so far. Very decent data rates (often more than 1Mbit/s) and acceptable latency, given that this is a wireless WAN connection. The one major downside is that there is no signal strength indication under Linux – that would certainly be useful when trying to figure out the best position for the little antenna. Oh and don’t forget to connect the stick at least once on a Windows or Mac OS system before using it under Linux so that those drivers can correctly program your account information into the flash on board.

Tethering the Motorola RAZR V3xx with a Mac

This is written for people running Mac OS X 10.5 (Leopard). Also, I am using AT&T wireless with the MediaNet Unlimited plan. And yes, you are not really supposed to use that plan when tethering your phone. But it seems that unless you overdo it, they don’t really care. There are several reports from people who downloaded gigabytes of data and then got massive bills from AT&T – but for the occasional quick check of email or a few minutes of browsing if there’s no WiFi available, this seems to work just fine. Needless to say, your mileage may vary, so this is at your own risk…

First, on your V3xx, go to Options (that’s the left soft key on the home screen) and select Use Bluetooth and then [Find Me]. That will make your phone discoverable. If you have another Bluetooth device setup (like a headset) you need to first drop that – the V3xx Bluetooth stack can only deal with one connection at a time.

Next, on your Mac, go to the Bluetooth menu in your menu-bar and click on Setup Bluetooth Devices…. This will open the Bluetooth Setup Assistant. You can also get there from System Preferences -> Bluetooth and then clicking the + symbol in the lower left corner.

Hit Continue and then choose Mobile Phone and once again hit Continue. The Mac is now searching for discoverable Bluetooth devices that it can find and should list your phone. BTW, the name which is displayed for your phone can be setup with the Setup item in the Use Bluetooth menu – I’d recommend something like your initials and something that identifies your device – I use D2 V3xx. Select your phone in the list of discovered devices and again click Continue. The Mac will gather some more information on the device, once it shows that it’s done, click Continue again.

Next the Mac needs to pair with your phone – it will show you a pin number that you need to enter into the phone – normally it’s 8 digits. The V3xx will show a dialogue that asks you whether you want to bond with the computer (it will use the Bluetooth name of your Mac). Click Yes and then enter the pin and click Ok. Now the phone should tell you that it bonded successfully with the computer.

Now the Mac will request a gateway connection on your phone. Click Grant on the phone and Continue on your Mac. Make sure that Access the Internet with your phone’s data connection is selected.

Next you’ll get to the Mobile Phone Set Up screen. The default settings for Phone Vendor and Phone Model should be correct (Motorola and GPRS (GSM/G3). Use WAP.CINGULARGPRS.COM as Username and CINGULAR1 as Password. The APN is WAP.CINGULAR, CID is 1. Make sure that both Show Bluetooth status in the menu bar and Show Modem status in the menu bar are selected. It should look something like this:

Bluetooth Mobile Phone Set Up

Click Continue and then Quit

You now should have a little phone connection icon in your Menubar. Select Connect Bluetooth in that menu. You should first see Connecting... and then Authenticating... which is finally replaced by a timer that counts your connection time.

That’s it, your done – enjoy browsing the net – and make sure that you really have an unlimited data plan or this could get really expensive. Once you are done, click on the connection time and select Disconnect Bluetooth.

On the AT&T 3G network I am getting very respectable data rates – often 50-80 kBytes per second. Edge connections seem to top out around 15-20 kBytes per second. Certainly enough to check email or a web page or two.

Motorola Ming as GPRS Modem for the EeePC

This is something that I wanted to work on for a while but I always got distrated. It’s still not perfect, but it works well enough that I want to share it here.

From what I understand this should work with all of the Linux based Motorola smartphones and actually might work with many other smartphones that can be programmed to work as USB modems. As written here it has been tested on a Motorola A1200 / Ming using the T-Mobile US EDGE network; pointers on how to use this on other carriers are at the end of this post.

Let’s start. You need an EeePC and a Motorola phone like the Ming and a USB cable. Make sure that the USB mode of the phone is set to USB Modem.

You also need to have wvdial and pppd installed on your EeePC. I might add a section on how to do this under the default Xandros version of Linux if people are interested; on EeeDora it’s just a yum install wvdial away.

On the EeePC you need to edit two files (I’ll simply assume that you know how to do this – there are many ways, for example sudo vi FILENAME)

/etc/ppp/options has only one line:
:192.168.0.254
which defines the default address to be used for the peer that the pppd will connect to.

/etv/wvdial/wvdial.conf takes a little more work:
[Dialer Defaults]
Baud = 460800
Modem Type = USB Modem
[Dialer MingUSB]
Modem = /dev/ttyACM0
Init1 = ATZ
Init2 = AT&FE0V1&C1S0=0
Init3 = AT+CGDCONT=1,\34IP\34,\34wap.voicestream.com\34,,0,0
Carrier Check = no
Stupid Mode = no
Phone = *99***1#
Username = tmobile
Password = tmobile

The Init3 string is one thing you need to change for different network providers (see below), the phone number seems to work for almost all carriers and and username and password appear to be arbitrary – Google is your friend if you run into a provider that actually checks them.

Now call wvdial USBMing (depending on the permissions in the distribution that you use, you may have to do this as root) and you should see something like this:
[hohndel@Eee linux-2.6]$ sudo wvdial MingUSB
--> WvDial: Internet dialer version 1.60
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: AT&FE0V1&C1S0=0
AT&FE0V1&C1S0=0
OK
--> Sending: AT+CGDCONT=1,"IP","wap.voicestream.com",,0,0
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
CONNECT
--> Carrier detected. Waiting for prompt.
~[7f]}#@!}!}!} }< }!}$}%\}"}&} } } } }#}$@#}%}&h}#} } }'}"}(}"}#}<~
--> PPP negotiation detected.
--> Starting pppd at Sat Feb 16 21:20:06 2008
--> Pid of pppd: 2825
--> Using interface ppp0
--> pppd: �-8[08]h-8[08]
--> pppd: �-8[08]h-8[08]
--> pppd: �-8[08]h-8[08]
--> pppd: �-8[08]h-8[08]
--> local IP address 10.173.197.5
--> pppd: �-8[08]h-8[08]
--> remote IP address 192.168.0.254
--> pppd: �-8[08]h-8[08]
--> primary DNS address 66.94.9.120
--> pppd: �-8[08]h-8[08]
--> secondary DNS address 66.94.25.120
--> pppd: �-8[08]h-8[08]

The responses from the phone that look like garbage will likely differ when you try it; I included them here so you aren’t surprised when you see them.

There’s one problem remaining that I haven’t figured out, yet. After I kill wvdial in oder to interrupt the connection the phone doesn’t appear to interrupt the GPRS or EDGE connection to the network. A new attempt to connect will fail with a BUSY error. Unplugging and re-plugging the USB cable gets everything back to normal, but there has to be a better way to do this… please comment below if you have solution!

Finally, in order to use this with a different network provider, you need to change the the Init3 string. The format is AT+CGDCONT=1,\34IP\34,\34APN\34,,0,0; your provider will give you the Access Point Name (APN) to use and in most cases all you need to do is to insert that in the second set of double quotes (which are encoded as \34 to avoid cut and paste problems). Much more on this topic can be found in this article on GPRS, you may also want to look at a detailed explanation of the GPRS specific AT commands and finally at this PDF that has a lengthy list of possible settings (but interestingly enough doesn’t include T-Mobile US).

Using the Motorola Ming (A1200) as GPRS / EDGE modem on a Mac running Leopard

This is an update to an older post of mine that dealt with this same issue under Tiger. Since I wrote that post I have upgraded to Leopard and found out that things are once again different. So her are the instructions for Leopard.

Let’s start with something that has nothing to do with the OS your are running on your Mac. The Motorola Ming (or A1200) supports EDGE! It seems all phones shipped so far have this feature disabled, but there’s a detailed post that explains how to enable EDGE on Motorolahelper. Using EDGE appears to drain the battery even faster than using GPRS, but it does give you a nice speed boost (still nowhere near 3G speed, but at least now you are on par with an iPhone…).

But let’s get to the real story – making this work with Leopard!

Leopard changed the format of the Modem Scripts and brings many new configuration options. That’s all nice and well, except that the initialization sequence it uses for Motorola GPRS phones is simply wrong! So the first thing you need to do is to update the modem properties in
/Library/Modem Scripts/Generic GPRS.ccl/Contents/Info.plist. Double click it in Finder and the Property List Editor will open. Click on the little triangle in front of Root, then on the little triangle in front of CCL Personalities and then on the one in front of Motorola GPRS and finally CCL Parameters.

Now double click on the value that is there and replace it with &FE0V1&C1S0=0 and hit return. Click Save in the File menu and close the application.

Next you go through the steps to pair with the phone and setup the connection details.

  1. Enable Bluetooth on your Ming (you can do this with the Bluetooth application that you can find in the Home folder or via the the status screen that you get when clicking on the status bar that includes the battery indicator and time). Make sure you set it to be discoverable.
  2. On the Mac, open System Preferences -> Bluetooth.
  3. Click on the ‘+’ sign in the lower left corner which opens the Bluetooth Setup Assistant. Click Continue, select Mobile Phone and again click Continue
  4. You should now see your phone listed – if not, make sure it is still discoverable (that lasts only for 3 minutes) and make sure Bluetooth is turned on on your Mac.

  5. With your Ming highlighted click on Continue again. The Mac is “gathering information on your device”. If this is the first time you pair the computer with the phone via Bluetooth you’ll be asked to enter a numeric passphrase on the phone. Once that is done once again click Continue.
  6. On the next screen make sure that “Access the Internet with your phone’s data connection” is enabled and click Continue again.
  7. Now you are at the “Bluetooth Mobile Phone Set Up” screen. Select Phone Vendor Motorola, Phone Model GPRS (GSM/3G) (that’s the one we just fixed). Username tmobile, Password tmobile, APN internet2.voicestream.com and CID 2. Make sure that “Show Modem status in the menu bar” is selected.

The screen should look like this:

Bluetooth Mobile Phone Set Up

Clicking Continue again gets you to the final screen that sums up your settings.

Now you can click on the little phone symbol in your menu bar, select Bluetooth and connect to the internet!

Getting the Motorola Ming (A1200) to work as GPRS modem for a Mac

These instructions worked for me, using a MacBook Pro running Mac OS 10.4 (Tiger) and a Motorola Ming (A1200) running the generic 46p firmware and connecting to T-Mobile in the US via GPRS. Please let me know if they work or don’t work for you – and remember to check the A1200 forum at MotorolaFans.com

Step 1: preparing your Mac to use the phone

Add this Motorola Ming script to /Library/Modem Scripts on your Mac.

Next open a terminal window (Terminal can be found under Applications/Utilities) and execute the following:
echo ":192.168.0.254" > /tmp/options; sudo mv /tmp/options /etc/ppp/options
(you’ll have to type in your password here to authenticate as administrator in order to be allowed to write in /etc/ppp).

Step 2: getting your phone ready to connect

In the main menu click on Bluetooth. Click on the menu button (lower left corner) and switch the phone to be “Discoverable”.

Step 3: starting the communication on your Mac

Turn Bluetooth on on the Mac as well and start the Bluetooth Setup Assistant (you can get to that from System Preferences -> Bluetooth -> Devices -> Set Up New Device…). Search for “Mobile Phone” and it should list all the Bluetooth phones in the vicinity that are discoverable. Click on “Motorola A1200″ (or, if you have a China Mobile flash image, click on Motorola 明) and continue.

Next you need to exchange the secret key for pairing the Bluetooth devices (just follow the requests on both the computer and the phone) and then grant the computer access. After a moment the Mac will suggest that it can use the Address Book and offer Internet through the phone. Since we want to set up GPRS you need to select the “Use a direct, higher speed connection…” option (even though “higher speed” is rather subjective, here).

Next comes the “Bluetooth Mobile Phone Set Up” dialog. As username and password you can pick anything, tmobile / tmobile works. The GPRS CID String is *99***2#. As Modem Script pick the “Motorola Ming” script that we installed earlier. Hit Continue and you should be done here.

Step 4: dialing out

Start “Internet Connect” (under Applications). Click on Bluetooth. The Configuration should all be set up correctly, all you need to do hit Connect (for some reason I occasionally am asked to type in the password again – no idea when and why then – just type “tmobile”).

You should be connected!

Update: these instructions won’t work if you are using Mac OS 10.5 Leopard – they were written for 10.4 Tiger. I wrote another post on how to use the Ming as GPRS (and EDGE!) modem under Leopard.