Archive for September, 2008

Tags:
Posted by: peter

Last time I tried to get GPRS working over bluetooth on Linux was a couple of years ago with my old Sony Ericsson and SUSE Linux 10. I remember spending quite some time arguing with BlueZ and my phone and while I could happily copy files to and from the phone with OBEX, I never could get them to do GPRS properly, so in the end I gave up and used a serial cable (Which had the added advantage of being able to charge the phone from my notebook’s USB while using GPRS which was usefull given the speed at which GPRS ran down the battery)

Just over a year ago my SE died a pitiful death, and the warranty had just run out, so I bought a Nokia E61i. The combination of the excitement of owning a shiny new wide screen smart phone and the fact that I changed jobs at around the same time meant that I very rarely had the need for internet access on the road, and when I did the email and web client on the E61i was usually sufficient to get the job done. (Additionally the memory of the last unsuccessfull attempt with the SE meant that I wasn’t in a hurry to try again)

However, as I am about to fly to Australia for a 2 week roadtrip up the east coast (Great Barrier reef here I come!) at a critical time at work just as a new product goes into production I figured I had better have another go at it. As it turns out, this time around, with openSUSE 11.0 and the E61i the proceedure was trivial, however all the results on google are much more complex than need be (faffing around with ppp, wvdial et al), so, without further ado, here is:

Peter’s Trivial guide to configuring 3G/GPRS over Bluetooth on openSUSE 11.0

Step one is to make sure you have a bluetooth adaptor (Pretty easy this bit huh?) and that it is enabled. Most notebooks have one built in, but a USB dongle should work just as well. openSUSE was kind enough to automatically configure mine when I installed it. If yours is configured you should see a “K” icon that resembles the Bluetooth logo in your KDE system tray. As long as you have bluetooth enabled on your phone, when you click on the “K” you should see your phone’s name show up in the list of available bluetooth devices. If you haven’t already done so, click on your phone’s name and pair it with your notebook (This will involve picking a PIN code and entering it on both PC and Phone). If your phone supports it I also recommend setting your notebook to “authorised” so that it doesn’t bother asking you if the bluetooth connection is allowed everytime your notebook tries to connect.. (On E61i “Bluetooth -> Paired Devices -> Options -> Set as authorised”)

Check that your Bluetooth adaptor is functional.

# hciconfig hci0: Type: USB BD Address: 00:1D:D9:F0:30:12 ACL MTU: 1017:8 SCO MTU: 64:1 UP RUNNING PSCAN ISCAN RX bytes:0 acl:106 sco:0 events:152 errors:0 TX bytes:2767 acl:107 sco:0 commands:64 errors:0

Find the Bluetooth MAC address of your phone with ‘hcitool scan’.

# hcitool scan Scanning … 00:17:E3:F2:DE:1A NokiaE61i

Check that the phone responds to pings.

# l2ping -c 2 00:17:E3:F2:DE:1A Ping: 00:17:E3:F2:DE:1A from 00:1D:D9:F0:30:12 (data size 44) … 0 bytes from 00:17:E3:F2:DE:1A id 0 time 69.75ms 0 bytes from 00:17:E3:F2:DE:1A id 1 time 27.88ms 2 sent, 2 received, 0% loss

Use ‘sdptool’ (Service Discovery Protocol tool) to find a GPRS modem offering Bluetooth Dial-Up Networking profile (Hopefully one will be found on your phone.. If not you are in trouble!) . In particular we need to find the Bluetooth channel number so we can connect it to the rfcomm Bluetooth “serial port” device.

# sdptool search DUN Inquiring … Searching for DUN on 00:17:E3:F2:DE:1A … Service Name: Dial-Up Networking Service RecHandle: 0x10009 Service Class ID List: “Dialup Networking” (0x1103) Protocol Descriptor List: “L2CAP” (0x0100) “RFCOMM” (0x0003) Channel: 2 Language Base Attr List: code_ISO639: 0x454e encoding: 0x6a base_offset: 0x100 Profile Descriptor List: “Dialup Networking” (0x1103) Version: 0x0100

Bind /dev/rfcomm0 to channel 2 (found in the previous step) on the phone.

# rfcomm bind 0 00:17:E3:F2:DE:1A 2

Check that the bind was successfull.

# rfcomm show 0 rfcomm0: 00:17:E3:F2:DE:1A channel 2 clean

And check that the device we bound to actually exists.

# ls -l /dev/rfcomm0 crw-rw–- 1 root root 216, 0 Sep 19 00:41 /dev/rfcomm0

At this point you now have a “bluetooth serial device” at /dev/rfcomm0 which works with any dial-up program. Personally I use yast to add a new custom provider and then use Kinternet to dial it when I need. The only tricky thing you need to know is to “dial” 99# to use the default GPRS profile saved on your phone (Or use a specific, non-default profile with *99**1# etc where the digit before the # is the profile number).

In order to make this configuration permanant you will need to enter this data into your /etc/bluetooth/rfcomm.conf file so that the “bluetooth serial device” is automatically created at boot. It should look something like:

# # RFCOMM configuration file. # rfcomm0 { # Automatically bind the device at startup bind yes; # Bluetooth address of the device device 00:17:E3:F2:DE:1A; # RFCOMM channel for the connection channel 2; # Description of the connection comment “My Nokia E61i”; }

More info on GPRS modems can be found here..

When configuring your internet connection with yast or wvdial, you will probably want to set Baud = 921600 in order to get access to the higher speeds that modern 3G data connections allow.

Tags:
Posted by: peter
In order to reset a lost zope admin (superuser in zope parlance) password, you need to create an emergency superuser. To do this change to your Zope INSTANCE_HOME which is the directory containing ‘var/Data.fs’ (On my server it is /var/opt/zope/default) and run the following:


$ echo ‘super:janitor’ > access


Then restart Zope, and log in as ‘super’, with password ‘janitor’.

You will now be able to reset the “real” superuser’s password with the following proceedure:

  1. Click on acl_users in the list. This displays the acl_users page.

  2. Click on the manager name whose password needs to be reset. This displays the Change User page.

  3. In the Password field enter a new password and then re-enter it in the Confirm field.

  4. Click the Change button.

  5. Since you are still logged in as the Zope administrator, you must log out and log in again using your manager name and password (as the administrator role only allows you to create and modify manager information).



After you have finished changing the real superuser’s password you should delete the ‘access’ file that you created previously and restart zope once again to get rid of the emergency super user login.
Tags:
Posted by: peter
I just updated my server from Django 0.96 to the brand new Django 1.0 release (Congrats Guys!!)

Anyway, I seem to have forgotten the admin password for one of my sites… Its simple enough to reset though with:


./manage.py shell
from django.contrib.auth.models import User
users = User.objects.all()
users
users[0].set_password(‘newpasshere’);
users[0].save()
Tags:
Posted by: peter

So I was stumbling around the internet this morning looking for something else entirely when I found the article Working with Hawking USB and Parallel Ethernet Print Servers. I was about to close the page when I noticed that it mentioned the windows only PSAdmin tool which co-incidentally is required by my Ladox LD-3101 parallel print server. Now I had previously tried to get support (new firmware etc) for it and it turns out that Ladox is the brand of a fairly small Turkish company who imports and re badges Chinese gear, however a cursory search did not turn up the ODM of the device. I downloaded hpsutil and lo and behold.. it worked with my Ladox. I also tested it against the USB/Parallel Combo Ladox Print Server we have in the office and it worked with it also, which means that I can officially throw out the CD that came with the printserver.

Tags:
Posted by: peter

Last Sunday night I participated in the Nike Human Race 10K in Istanbul together with 1 million+ runners in 25+ locations around the world simultaneously. The race started in Beylerbeyi on the Asian side of Istanbul and concluded on the European side in Kuruçeşme with a Serdar Ortaç concert at the Kuruçeşme Arena. This was an absolutely beautiful course which involved running across the Bosphorus Bridge joining the Asia to Europe. Looking down on the lights of Istanbul lining both sides of the Bosphorus was a truly beautiful sight.. I just wish I had had more time to enjoy it, instead of chasing the guy in front of me!!

This was the first time I have ever run 10km in an actual race, and in-fact I rarely run that far on the treadmill at the gym so I was quite happy with my time of 71 minutes giving me an average speed of almost 8.5km per hour. I have to admit I was quite sore for several days afterwards though… Next time I will train a bit harder before hand, as this time I only trained for a few weeks at the start of the month and then missed almost two weeks of training leading up to the race due to work commitments.

Previous month Next month