Brain dump!

A place for the thoughts and ideas that escape my brain.

Sunday, February 20, 2011

Telstra Sierra Wireless 312U Aircard - more Ubuntu Linux mobile broadband fun

Had to write about this one as I've just spent around 4-5 hours on this device! Maybe it will save other folks from major frustration.

Computerbank has a client who got a Sierra wireless 312U USB mobile broadband modem from Telstra. Can we get it to work?

First of all the registration and activation part had to be done in Windows. We could not work around this. Not with the time frame we had. One of our volunteers has a dual boot laptop - thanks go out to Barry.

Under our custom version of 9.04, we tried to set it up using sakis3g script. Although Sakis would find and initialise the modem it could not make a successful connection. We also tried to connect via network manager (after modem was initialised by sakis3g). We could not get it to work.

Under our custom 10.04 the device was recognised by network manager but again, as with 9.04, we could not get it to connect.

Log messages like these appeared:

sierra ttyUSB2: resubmit read urb failed.(-1)

NetworkManager[836]: disconnect failed: (32) The serial port is not open.

At some point I decided to install the driver from: http://sierrawireless.custhelp.com/app/answers/detail/a_id/641/~/can-i-use-a-sierra-wireless-modem-on-linux-machines-%28direct-ip-modems%29%3F

Doing this has not made a difference to how network manager operates. I will try this on another machine without doing the driver installation. Update to be provided.

Finally got it working with wvdial. I used GnomePPP to detect the port.

Here is the wvdial.conf file:

[Dialer Defaults]
Modem = /dev/ttyUSB2
Init = AT+CGDCONT=1,"IP","telstra.bigpond"
Phone = *99#
Username = enterusername@bigpond.com
Password = enterpassword
New PPPD = yes
Stupid Mode = on

**Init string help from http://forums.whirlpool.net.au/archive/1576784 though for us the APN section was different.

Popped this info into Gnome PPP (including the INIT string) and can also get it to work successfully.

Now I can rest. I would rather have got it working in network manager but Gnome PPP is easy enough for newbie users.

I should mention I tried with network manager 0.8 (lucid repositories) and then I upgraded to cutting edge networking manager from the 'trunk' repositories. The cutting edge network manager detects and shows signal strength for the Telstra UTMS network. In some ways this is handy (checking network availability) but it still doesn't work.

There was not a lot of information around about this device as it is so new. Some Ubuntu 10.10 users reported that they had it working out of the box. I only wish it had of been the case on this setup. We tried to get it working on a 10.10 live CD but could not. Same issue we had on 9.04 and 10.04.

If I had more time on this issue and with the device I might try different kernels. The device has to be handed back on Tues. If anyone comes across this and has a different story to tell or they got it working with network manager please let me know.

We tried to call Telstra to verify what APN the account was using. One help desk staff did not know what this meant! The APN is pretty important.

With an incorrect APN in the init string wvdial and gnome ppp will not work. If you are wondering about the wvdial error message --> Cannot get information for serial port it might be your APN is wrong. This was the case for us.

Frustrating, but relief to finally have it going.

Update: On 9.04 using sakis3g to initialise the modem (it creates the /dev/ttyUSB ports) I could get it working with gnome ppp. No updates to the driver.

I can also get it to connect with Network Manager in 9.04.

Also with cutting edge Network Manager (0.8.1.998) under 10.04!

It is possible that setting APN telstra.bigpond via the init string has helped. This time around under 9.04, sakis3g gave me the choice telstra.bigpond as the APN. With previous attempts it had not done this, it had different choices. Strange.

Wednesday, April 07, 2010

Ubuntu 9.04, Epson TX110 USB Printer Issues

We've had this problem for around three months now - its been a doozy so I thought I'd mention it here. We've also created an issue for it on Computerbank's issue tracker at http://code.google.com/p/computerbank/issues/detail?id=173

An Epson TX110 purchased by one of our clients (on our general advise) wants to automatically set up each and every time it is plugged in. Even with the latest driver from the Avasys website. We are using a custom version of Ubuntu 9.04, mostly up to date.

We searched for a solution. Our searches were around getting the printer working properly and we also repeated software install attempts. Several people were involved in this investigation.

Finally we thought about stopping the automatic printer detection foo from happening. We think we hit the answer, thanks to Marcus and http://centos.org/modules/newbb/viewtopic.php?viewmode=flat&order=DESC&topic_id=16210&forum=37

Basically you need to edit a file - sudo gedit /usr/share/hal/fdi/policy/10osvendor/10-hal_lpadmin.fdi and remove --add from line 7. Don't forget to restart HAL with the command sudo /etc/init.d/hal restart (or just reboot).

Finding this info was not easy. Now the only problem is that the epson printer is out of ink and has gone into error mode. It won't print! It is happy to scan though so I guess that is a good sign. I'll know for sure tomorrow when I take it back to the owner and they can top up the ink supplies.

Phew. I'll add an update tomorrow. Fingers crossed.

PS: To save lots of headaches, another tip for Linux printing, ensure your BIOS is set to ECP+EPP printing mode (or just ECP).

Tuesday, April 06, 2010

Brain Party 0.5 - very addictive

Brain Party - apparently an iphone app - has a version that will run on Linux. It is licensed under the GPLv3. Very addictive puzzle game, nicely done too. As you get better, more games are unlocked.

Download here http://www.tuxradar.com/files/brainparty/brainparty0.5.tar.gz
Website at http://www.tuxradar.com/brainparty

If you are running a debian/ubuntu system you'll also need to get the following packages: libsdl1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl-image1.2-dev libsdl-gfx1.2-dev mesa-common-dev libglu1-mesa-dev.

Happy puzzling!

Monday, April 05, 2010

Peritoneal Dialysis and Shoulder Tip Pain - Ouch!

I've been laid up this Easter. Not really a bad thing because I need the rest, but I've been in major pain. There was a whole bunch of things I wanted to do; screencasting, documentation and distro work.

This time it is my own fault because I thought I had primed my dialysis machine - but hadn't. Air got into my peritoneum and caused the worst bout of shoulder tip pain ever. 48 hours of it - I still have slight pain now. Must have been a lot of air. I won't be doing that again!

For those looking for a way to alleviate this kind of pain - lay on your back so your shoulders are lower than your abdomen - use a pillow. Mostly you just have to wait for the air to dissolve out.

Sunday, February 28, 2010

Little India - West Footscray - New Restaurant - Eatery - Maharaja's Haveli

West Footscray - Little India - Bollywood dress shops, Indian groceries and eateries. The latest new comer - Maharaja's Haveli Indian Restaurant (and Indian sweet house*) - is worth a try. My partner, Greg, and I went along to try their thali.

As the owners came from the region, we tried the Punjabi style thali. Impressive presentation, very tasty, good spiciness to it - Greg the well versed Indian traveller 'approved'.

Punjabi Thali Pics
4 veg curries, raita, salad, rice desert, bread, pappadum and pickles

We also had a serve of pakoras - they were absolutely wonderful with a very tasty spicy mint sauce. The mango lassi was nice enough, just like any other I've tried.

The owners (also the waiting staff) were really friendly and attentive. Cold water was served without the need to ask. Nice and clean. Highly recommended. Great value. Looking forward to trying the Indian sweets as soon as they arrive.

*Indian Sweets coming in about 2 weeks time. Yum!

Maharaja's Haveli on Urbanspoon

Labels: , , ,

Monday, January 11, 2010

Raincat - new cute kids game for Linux

I've been playing with Raincat - a new *really cute* Linux (and Windows) game for young kids.

Check out http://bysusanlin.com/raincat/for more info. It is so cool, I'm going to include it in the Computerbank distro this week.

Very impressed. Nice work from the Raincat team. :)

Monday, November 09, 2009

Computerworld Article about Computerbank and our use of Ubuntu

Nice little write up about Computerbank and our use of Ubuntu in Computerworld - 'the voice of IT management' - online news. The interview that was conducted last Friday.

For details see http://www.computerworld.com.au/article/325438/computerbank_installs_ubuntu_recycled_pcs

Enjoy!

Saturday, November 07, 2009

More 3G USB Modem Fun!

This time another vodafone modem - K3520 - white. Worked with network manager (ppa 0.7.1) but on disconnect freezes the computer. Reliably. One of our clients had to come back to have this issue resolved. Twice. :(

Works best in Vodafone Mobile Connect Utility. APN vfprepaymbb, we had username web and password web. Also had to put in DNS: 192.189.54.33, 210.80.58.3.

The Vodafone utility has usage meters, but as Barry advised, it counts everything, including the free areas. Probably a good thing really as it will give an over estimate of data used.

Sunday, October 11, 2009

New updated Ubuntu Jaunty user guide for Computerbank computers

Computerbank has just updated our custom Ubuntu Linux distro to Jaunty. We've also changed from using KDE on the desktop to Gnome. Busy, Busy, Busy.

Our user guide has been changed to reflect this and now might have more relevance to other newbie Linux users. The guide is plain english and simple to understand. It is for people who are new to computers and new to Linux.

A copy is available from: http://www.computerbank.org.au/shop/computerbank_ubuntu_userguide.pdf/view

We'll be adding more to it as we go along. Send us your feedback and suggestions so we can improve it even more.

Enjoy!

My second *useful* script for starting newer USB mobile broadband modems on Linux Ubuntu Jaunty

My first and only script was for clearing printer queues at Computerbank network sites with every reboot. I've seen other scripts and can figure out what they do.

I attempted a script for initialising different modems - K3565-Z, MF627, U6T. It works! I am polishing it up as well. For eg, it would be good for the thing to have an error message if the user chooses the wrong modem.

For now it does the job, initialises the right modem (based on user choice). It is also user friendly, with nice dialog boxes. I'm trying to figure out how to put an icon in for disconnected network manager in one of the info boxes. Icing on the cake. I found zenity very easy to use and thank the internets for all the good info and examples that got me started.

Anyway here it is (complete with debugging help by Patrick, David and Barry). Watch out for stray spaces!

#!/bin/sh
# AU 3G Modem Chooser and Initialisation Script
# Needs to be run with gksu (friendly user prompt for password) or sudo when calling
# from the command line.
# Author: Kylie Davies
# Date: 10/10/09
{
# Start with a message, in case user starts accidentally.

if $(zenity --question --text="Use this utility to select and activate USB Mobile Broadband modems." --title="USB Modem Helper")
then

ans=$(zenity --list --text "Choose your USB mobile broadband modem from the list." \
--radiolist --height=220 --column "Pick" --column "USB Modem Type or Model" TRUE Pink\ GRL\ modem\ -\ U6T FALSE White\ Vodafone\ modem\ -\ K3565-Z \
FALSE Black\ and\ green\ Three\ modem\ -\ MF627 FALSE Not\ Listed.);

echo "||$ans||"
if [ "$ans" = "Pink GRL modem - U6T" ]
then
echo "1111"
sudo modprobe option && echo "0x05c6 0x9000" > /sys/bus/usb-serial/drivers/option1/new_id && sleep 1 |zenity --progress --text "Starting Modem" --title "Starting Modem"
zenity --info --title "Modem Ready" --text "Your modem is ready. Left click the icon at the top right of your screen to create or use a mobile broadband connection."

elif [ "$ans" = "White Vodafone modem - K3565-Z" ]
then
echo "2222"
sudo modprobe option && echo "0x19d2 0x0052" > /sys/bus/usb-serial/drivers/option1/new_id && sleep 1 |zenity --progress --text "Starting Modem" --title "Starting Modem"
zenity --info --title "Modem Ready" --text "Your modem is ready. Left click the icon at the top right of your screen to create or use a mobile broadband connection."

elif [ "$ans" = "Black and green Three modem - MF627" ]
then
echo "333"
sudo modprobe option && echo "0x19d2 0x0064" >> /sys/bus/usb-serial/drivers/option1/new_id && sleep 1 |zenity --progress --text "Starting Modem" --title "Starting Modem"
zenity --info --title "Modem Ready" --text "Your modem is ready. Left click the icon at the top right of your screen to create or use a mobile broadband connection."

elif [ "$ans" = "Not Listed." ]
then
echo "555"
zenity --info --title "More Info Needed" --text "Call Computerbank for advice."

else
echo "444"
fi
fi
}

Wednesday, October 07, 2009

Mobile Broadband USB Modem Fun - Ubuntu Linux - GRL Mobile, Three and Crazy John!

I have spent a lot of time working this out and patching us I go. I am pleased to say I can get three different modems (K3565-z, ZTE MF627, and the U6T) working one after the other without a reboot. I can repeat with success. Happy Happy Joy Joy!

For the benefit of others I thought I'd write about it and include my notes at the end (normally these are inside the computerbank intranet and sometimes make it on to google code issue tracker for our computerbank project).

It all started out with our upgraded Jaunty Jackalope Computerbank distro. The bugs i encountered exist in a straight JJ install too. It is not just us.

A few things that had to be resolved first; Nautilus crashes whenever you try and eject the USB modem media (GRL) from the desktop. You need to do this to switch the modem.

I also found that Network Manager in Jaunty is slightly broken (a config file needs some editing for it to use CHAP authentication). Also network manager wizard fires up when it sees the USB nodes created, so sometimes I would get two wizards. Only one connection could be correct. Eventually I ended up using jaunty ppa for network manager as the issues above had been resolved.

I'm not sure about the option module, I guess I need to compile it into the kernel. It must have been used last time because we had one of these modems working (K3565-z) in Hardy with gnome-ppp. Now it needs to be modprobed.

After that happens you can flip the modem by changing its ID. This is done by working out (getting the IDs) what USB ID the device ends up (USB or CDROM) after settling, and what ID it is when it is a modem. Some devices need ejecting to change ID again (GRL). Timing is everything. So wait!

For one of the devices, the MF627 - the UK version is different to the AU version and so are the hex codes! Mad.

For the record:
MF627 0x19d2 0x0064
U6T 0x05c6 0x9000 (needs an eject to get the initial code)
K3565-z 0x19d2 0x0052

The first value is what the device ends up as, and the second is what you want it to be, a modem.

When you get the device recognised as a modem, the /dev/ttyUSBx will be created. One of the modems I tested had five. One had two. It varies.

As soon as this happens network manager sees the USB modem and Creates a "Configure Mobile Broadband Connection" option from the applet. The wizard does not appear as this ended up causing other issues.

I also edited the serviceprovider.xml (warning it is different layout to previous version) so it was correct and had extra info for GRL, Crazy John, Dodo and other plans. Tested and works. I should see about contributing that back. I need more time to look into it.

I'll stick my notes up here soon. I need to tidy them up so they make sense. I'm still not there yet, I need to create a script or a button that runs the modprobe option command and then echos the id to a file. Or I need option already in the kernel. To be discussed...

Phew!

Notes:

Grl Hot Pink Modem: U6T model

GRL Mobile - U6T modem. Hot pink. LEDs are hard to see. The red one is bright.

NB: If the device stays red for a long time and its activated, the SIM is not in
correctly. Even though these are coded it is easy enough to do. wvdial error: Invalid
dial command. NetworkManager error: Can't get broadband capabilities of device.

When ever this device was plugged in it would cause nautilus to segfault. Ditto other
devices.

nautilus[3603]: segfault at 8bf5010 ip b4da4dc6 sp b6df4fb0 error 4 in
libbrasero-media.so.0.1.1[b4d93000+1f000]

Fixed via https://bugs.launchpad.net/ubuntu/+source/brasero/+bug/363435

To fix: sudo chmod a-r /usr/lib/nautilus/extensions-2.0/libnautilus-brasero-extension.so

There was also a network manager bug in the jaunty package.

https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/391608

Something to do with UTMS and authentication.

Error message: No CHAP secret found for authenticating us to UMTS_CHAP_SRVR

http://ubuntuforums.org/showthread.php?p=7563412

Wisdom here http://www.linuxhorizon.ro/nm_root_bug.html

Fix. (only apply to jaunty version)

1. Locate and remove the following section in /etc/dbus-1/system.d/NetworkManager.conf:

send_interface="org.freedesktop.NetworkManager.PPP"/>


2. Restart the NetworkManager

/etc/init.d/NetworkManager restart

Network manager would get confused and throw up a couple of wizards at a time. One
would be wrong. The device would get confused if the wrong wizard was chosen.

I found that the ppa version had tried to solve this. So added the ppa jaunty sources
for network manager.

Sources:

deb http://ppa.launchpad.net/network-manager/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/network-manager/ppa/ubuntu jaunty main

Getting the modem working.

* Eject the device from the desktop or using nautilus.

* sudo modprobe option

* sudo echo "0x05c6 0x9000" > /sys/bus/usb-serial/drivers/option1/new_id

This creates the devices for USBx and network manager will detect them shortly after.
Wait a bit.

The wizard no longer works - so when the connection appears (click network computer
icon) - it will say Configure Mobile Broadband Connection. Click and the (corrected)
wizard appears.

Crazy John Vodafone Modem - K3565-z model

I can't remember if this made nautilus crash. In any case there is no need to eject the VMC Lite icon that appears. It works ok without doing that. I've done so much testing I can not remember if it works when ejected?

Computerbank systems need to support multiple models of USB modem.

Fix bugs as reported for GRL U6T modem. Get up to date ppa sources for jaunty (see above).

Then when you want to use the modem:

* sudo modprobe option
* sudo echo "0x19d2 0x0052" > /sys/bus/usb-serial/drivers/option1/new_id

In a few moments, network manager and Vodafone Mobile Connect will see the modem.

Black and Green Three Modem - MF627 model

I can't remember if this made nautilus crash. I don't think I had to eject anything? It works ok without doing that. I've done so much testing with these things I could be confused.

Fix bugs as reported for GRL U6T modem. Get up to date ppa sources for jaunty network manager.

Then when you want to use the modem:

* sudo modprobe option
* sudo echo "0x19d2 0x0064" >> /sys/bus/usb-serial/drivers/option1/new_id

In a few moments, network manager will see the modem.

A script has been made for user friendly way to make this happen. Being zenity-fied.

I could not get this working with any version of vodafone mobile connect.