Archive for the 'mobile' Category

Mounting the Nokia 9300 file system on Linux with p3nfs

June 7, 2006

This is how I made my Nokia 9300’s file system available to my Ubuntu Dapper box. I can now copy/move files around, as well as edit files on the phone just like I could earlier with the 9210.


Browsing the phone’s filesystem in Nautilus

You need a working Bluetooth setup. See my earlier Bluetooth related HOWTO on how to find out your phone’s Bluetooth address with the hcitool and how to setup a PIN so you can pair the devices in a friendly fashion. You need to have portmap installed (in order to use any kind of NFS shares). Then you need the key ingredient, p3nfs. Download the ARCH Linux binary package and the corresponding nfsapp SIS installer for the 9300/9500.

1. Install nfsapp on the phone (send the file over via Bluetooth, or browse to the p3nfs homepage with the phone’s browser and download it)
2. Convert the ARCH linux binary package of p3nfs into a debian package and install it: sudo alien -i p3nfs-x.xx.pkg.tar.gz
3. Set the suid bit on /usr/bin/p3nfsd so that you don’t have to be root to access the phone’s filesystem: sudo chmod+s /usr/bin/p3nfsd
4. Bind an rfcomm device to your phone. The nfsapp uses the Bluetooth channel 13: sudo rfcomm bind /dev/rfcomm0 XX:XX:XX:XX:XX:XX 13 (XX:XX:XX:XX:XX:XX being your phone’s address)
5. Start nfsapp on the phone. Check that it’s using Bluetooth/13 to communicate. If not, press ‘p’ to change it
6. Make a convenient mount point in your home directory, such as ‘Phone’
7. Start p3nfsd: p3nfsd -series80 -tty /dev/rfcomm0 -dir /home/<username>/Phone
8. Browse to the Phone directory with a file manager or in the terminal
9. when you’re done, exit any application, file browser or terminal accessing the ‘Phone’ directory and unmount the phone: ls /home/<username>/Phone/exit — wait for output confirming that p3nfsd has exited cleanly

You would probably prefer not to type all those commands by hand every day, so make a few nice aliases in your ~/.bashrc:
alias bindcomm='sudo rfcomm bind /dev/rfcomm0 XX:XX:XX:XX:XX:XX 13'
alias mountphone='p3nfsd -series80 -tty /dev/rfcomm0 -dir /home/username/Phone'
alias umountphone='ls /home/username/Phone/exit'

NOTE: Do not mess with files on the E: and Z: “drives” on the phone. They belong the running system’s internal memory and touching that stuff may crash the phone and perhaps make it unbootable.

NOTE: This HOWTO is just a quick list of steps to get this working. It is not a substitute for actually reading the p3nfs README file. The p3nfs documentation also deals with situations when things are not working. I won’t, so don’t call me for support :)

Technorati Tags: , , ,

GPRS via Bluetooth and Nokia 9300

May 28, 2006

(Update: Instructions for connecting via the DKU2 cable now at the end of the post.)
This is how I made the GPRS Internet connection working from my Ubuntu Dapper laptop via a Nokia 9300 and Bluetooth. I found this info on an Ubuntu forums thread, kudos go to emperon:

  1. Have a working bluetooth setup.
  2. hcitool scan gives you your phone’s BD address. Make a note of this.
  3. sdptool search DUN will show you the appropriate channel to use. Make a note of this.
  4. Check that you have a 4-number code in /etc/bluetooth/pin unless your phone and the machine are very friendly already. Your phone may ask for this number later.
  5. Type rfcomm bind /dev/rfcomm0 X:X:X:X:X:X YY (where X:X:X:X:X:X is the BD address and YY is the channel number).
  6. Type rfcomm and check that the channel is either “clear” or “closed”.
  7. Create /etc/ppp/peers/gprs with the following contents:
    /dev/rfcomm0
    connect '/usr/sbin/chat -v -f /etc/ppp/peers/gprs.chat'
            noauth
            defaultroute
            usepeerdns
            lcp-echo-interval 65535
            debug
  8. Create /etc/ppp/peers/gprs.chat with the following contents:
    TIMEOUT                 15        
    ECHO                    ON
    HANGUP                  ON      
    ''                      AT
    OK                      ATZ     
    OK                      ATD*99*#
    (NOTE: *99*# above is the number to call. This one works for Sonera in Finland and many other providers, but call your friendly provider helpdesk and make sure you have the correct one.)
  9. Initiate bluetooth pairing between your phone and the computer.
  10. Make the call: sudo pppd call gprs
  11. Surf away!

Here’s instructions for connecting via the DKU2 cable supplied with the 9300. Cables are uncool and sometimes get in the way, but the procedure is simpler. This info comes mostly from gr0kzer0 in another forum thread:

  1. Install wvdial.
  2. Connect the cable.
  3. Run wvdialconf /etc/wvdial.conf
  4. Edit the /etc/wvdial.conf just created. Look at the last four lines, we edit the Phone, Password and Username lines (the username and password are bogus ones. wvdial wants non-empty ones but you can enter Batman’s credentials there if you like), and additionally force the modem into Stupid Mode.
    [Dialer Defaults]
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Modem Type = USB Modem
    Baud = 460800
    New PPPD = yes
    Modem = /dev/ttyACM0
    ISDN = 0
    Phone = *99#
    Password = foo
    Username = bar
    Stupid Mode = 1

    (NOTE: Again try to find a suitable phone number)
  5. Now you should be able to dial out with wvdial or GNOME PPP.

Technorati Tags: , , , ,

GNOME Phone Manager for Dapper

May 19, 2006

Since the gnome-phone-manager-0.6 on dapper is broken, I built a package from the latest 0.7 sources. Since I know someone might be insterested in a working phone manager, I've uploaded the package on Box.net. My package works, but not perfectly of course: you'll have to make a link in /usr/share/gnome-phone-manager to the phone icon or the phone manager will crash upon startup. So after you install the package do "sudo ln -s /usr/share/pixmaps/cellphone.png /usr/share/gnome-phone-manager" and enjoy. As always, there's no guarantee and if my packages break your system or are found eating children on the midnight streets, don't bother me.

Integrating your personal information space with “The Searchable GNOME”

May 14, 2006

GNOME 2.14 has been unofficially dubbed “The Searchable GNOME” for a reason. The latest iteration of GNOME takes desktop integration to a level where you can stop caring about the whereabouts of files on your file system, or indeed about the location of a specific piece of information in your personal information space or on the Internet. You probably already have forgotten where you files are, so the key to achieving the best possible comfort is

  • Accept the fact that you have no idea where your stuff is;
  • Realize that most of your data is in digital form, or can be digitized;
  • Make sure that all of your personal information space is searchable, both online and locally
  • Use the right applications! Always be prepared to sacrifice your favorite application in favor of one that integrates to your working environment most seamlessly

Your information space consists of all the stuff you have on your computer’s home directory (mail, documents, calendar entries, chat logs…) and, optimally, everything you have read and seen on the Web. All this information should be at your fingertips at all times.

GNOME hacker extraordinaire Jeff Waugh put it best in a recent interview: we need to get rid of the WIMP (Windows, Icons, Menus, Pointer) paradigm which has dominated on the desktop for so long because

“when I wake up in the morning, I don’t think that I have to rearrange my windows and sort my icons — they’re not the things that I find important. The things that I actually care about are people, events, documents and getting laid.”

So we need a user interface that doesn’t get between us and those things that really matter.

So this is how close to Luis I can get though a single text entry widget on my desktop, the Deskbar applet: from this single interface, I can mail him, go to his home page as well as other relevant pages via a Google search, open past e-mail and chat conversations with him, and peruse any document on my hard disk mentioning him.

Searching for Luis
Fig. 1: Searching for Luis


Note that there is no indication in the above screenshot to the applications that will be used to handle this data. I don’t care, and I shouldn’t be bothered with such details. If I want to contact Luis, I want to click his name and write him a message. I certainly don’t want to peruse my application menus to find an e-mail application, open a contacts database to find his address and then try to remember what I wanted to say to him. Also, I don’t want to open a presentation program, find a file (hoping I have given the file a descriptive name and archived it into a reasonably discoverable directory structure) and open it. All I want is Luis-information!

The first commandment in making your stuff searchable: build your desktop around Beagle, and only use applications that Beagle is aware of. Do not give in to the lure of a non-beaglified application, be it as awesome as it may, if there is a beagle-aware application available. In short, choose freely from the list of supported applications on the Beagle home page, but do not look elsewhere. I’m sure Opera is a cool browser, but if you want your browsing history indexed by Beagle, don’t use it. If you use Thunderbird, switch to Evolution. Read news feeds with Liferea or Blam. Keep your notes in a Tomboy sticky wiki. Index your photos with F-Spot. Learn to love these programs, you have no choice. Your life will be easier. Really.

Believe the Web2.0 hype. Well, some of it. Much of your data should live online. Switch to Gmail instead of keeping huge local mail archives, simply because Gmail is more searchable. With Gmail you can keep all your mail, and you don’t have to organize it because their search is faster than your ability to figure out the organization plan you had in mind a year ago. I’m sure other mail services are just as nice, but a plugin happens to be available which integrates Gmail into the deskbar and thus into your desktop. Use del.icio.us and tag all interesting pages so they are also searchable from the deskbar. Another upside with keeping your data on other people’s servers is that (let’s face it) Google’s servers are more likely to stay up 24/7 than yours so you can get to your data from any machine, anytime. Similarly, use F-Spot to tag your photos and upload them to Flickr (why Flickr of all the photo upload services on the Web? Because that’s what F-Spot supports, and F-Spot is what Beagle supports!) Use Gmailfs or Box.net to store data you might want to keep accessible at all times.

Keep your address book and calendar online, especially if you need to access it from different locations and devices. I keep my info on the ScheduleWorld.com servers because they’ve built their service on open standards. The SyncML, iCal, and LDAP protocols they use enable me to handle and access my data from my desktop, laptop, and mobile phone, and keep them all in sync at all times. This is doubly valuable for someone who use the forbidden combination of a Nokia smartphone and Linux systems. Since I use Evolution on the desktop, my address book and calendar are integrated in all my GNOME applications where it makes sense.

The days of totally transparent interfaces has not yet come, and we cannot get to people, events, documents, or laid with the power of thought alone quite yet, but there’s no reason not to make handing our information as easy as possible.

Disclaimer: the above concerns the data in my personal information space. I have made accessing my information as easy as possible, not as secure as possible. Some of the methods, such as accessing Gmail via the deskbar, are inherently insecure. I don’t recommend using similar methods for your million dollar company’s customer database and information like that.

Technorati Tags: , , ,

SyncML doesn’t entirely suck

February 18, 2006

I can now sync (sort of) my Nokia 9300‘s calendar and the Mozilla calendar and the Thunderbird address book. As Nokia doesn’t think LInux is worthy of support, I’ve taken another route. The 9300 and the Communicators do support one open standard, namely SyncML. So, I’ve created an account on ScheduleWorld, which uses SyncML. Syncing works between the phone and ScheduleWorld. Then, you can access the address book via LDAP, and the Ical calendar. These are both read-only of course, the only way to edit the information from Linux is to use ScheduleWorld’s own Java-based application. Anyway, this doesn’t suck as much as total inaccessibility.

rw!

June 19, 2005

With the latest p3nfs (5.18), i finally have read/write access to my damn phone. Yay, I have defeated Nokia! After another six months, I might be able to sync my Evolution calendar and address book with it… Anyway, file transfer is quite enough for now!

The Saga of the Commie, again

February 14, 2005

The Communicator saga continues: after much fussin' and fightin', I have decided to make peace with the darn thing, at least for the time being. Sigh. Here are the terms of our pact:

1. The device shall at all times yield the data I have created to me, via my personal preferred method, namely p3nfs on Linux.

2. In return, I shall respect Nokia's right to be a clueless corporation, and never attempt to write to the device via p3nfs, but shall for this purpose use a "Compatible computer" as defined by Nokia (ie. Nokia PC suite on somebody else's Windows box).

Fortunately, use case 1 is far more common than use case 2: usually you just need to transfer things jotted down on the Communicator to your computer. For stuff you already have on computers, you hopefully have smarter transportation means.

Another fortunate thing is I actually do have a Windows box, but it still isn't exactly my preferred environment, which is why I'd really like Nokia to wake up an do more for interoperability issues and offer standards-based interoperability with "your favorite system" and substitute that for that lame "compatible computer".

Oh, and there's another undestanding: I'll use Nokia's cruft for backups, which is not very good for one's peace of mind, but it might still be less worse than relying on the mysterious workings of p3nfs…

I wrote email to Nokia Support, asking simply what is the preferred method for a 9210 to communicate with Linux boxen. The reply was, "Unfortunately we do not support Linux software". Well d'oh! I sort of knew that already. but they might as well read the question beyond the word "Linux", and answer it since they're supposed to be one of the greatest FOSS/Linux companies in Finland (if you've ever seen a Nokia representative speaking at Open Source or Linux happenings, you will easily be tricked to believe so).

The bottom line: I can read and write to the Communicator, albeit not with the comfort I'd like to. And it's a very cool device in itself. I probably wouldn't have written such a long note on many other phones. All the cool functionality the Commie has, actually woks quite well. It does leave me hungry for the new model with wireless LAN though, it would solve these data transport problems at once. Perhaps Nokia is learning? Maybe the biggies can learn too.

More phone suckage; newbie-love

February 10, 2005

I can use p3nfs for reading my phone now. Writing is still impossible. Nobody seems to use p3nfs anymore, and those who do, are getting perfect results. Not very encouraging, as no-one seems to have had any reason to fix the problem I'm having. Also, I can't get irda working on Linux (this one is certainly my own fault). So I'm still reduced to a Windows user when I need write support.

Helped newbies on #ubuntu, which is a nice hobby.

Using Windows again!

January 10, 2005

So Santa brought me a used (!) Nokia 9210 Communicator. I'm having trouble with p3nfs on Linux, so I'm frequently reduced to using the Nokia PC Suite on Terhi's Windows box. Santa has the weirdest sense of humor.