Monday, February 2, 2009

[>30] Mounting my N80 mobile on Ubuntu Machine

This shall be the first episode in my long series called ">30" which simply means that it took more than 30 minutes. I am collecting here some of the problems that i fought with for more than 30 minutes in order not even solve it but finding a resource on the internet that can relief me from such a pain.

The first episode of this series is talking about how to mount your Bluetooth device on your Ubuntu machine. I will explain such a thing on my N80 mobile and Ubuntu machine but i think anyone can use such points on any other devices and Linux machines.

Before getting into the main point, i would like to state that this post might get you the solution or not. I am writing it while doing such a task and while i am writing such introduction, i actually reach to the steps needed to get out of such misery journey. But, anyone whether we reach a solution together or not, i think this post will put you on a track to continue from so you won't lose your time reading it.

Note: points highlighted in bold style are points related to my case so it should change from one case to another.

The journey starts in this post Mounting a Nokia Phone a Little Bit Easier which is really a nice point to start with. It states these points
  • Find out your phone’s Bluetooth MAC address if you don’t know it already:
    hcitool scan
  • Find out the OBEX FTP channel it uses
    sdptool search FTP
  • Load the fuse kernel module:
    sudo modprobe fuse
  • Make a suitable mount point for your phone:
    mkdir /media/n80
  • Mount
    obexfs -bXX:XX:XX:XX:XX:XX -BYY /media/n80
    (where XX:XX:XX:XX:XX:XX is your phone’s MAC and YY is the OBEX channel)
  • Unmount when you’re done with your file transfers:
    fusermount -u ~/Phone
the above steps depends on having some libraries installed on your pc which are obexfs and obexfs. i got them easily using apt-get. If after doing the above steps everything went well then you are done. Yes that easy but if not then continue with me to know what i did after this step.

For me, i was capable of entering the mounted folder and even list files and not only this i removed a file. i thought it is time now to copy some files from my pc to the device. after using the cp command, i took no time at all and then it finished. I was sure something went wrong because i am connecting using bluetooth and things shouldn't end that fast. I used ls command to check that it was added but then it hanged for some time and stated that the folder i am inside isn't a valid one. Simple, mounting failed. I went out and entered again and ran ls command but nothing was listed. I unmounted and remounted but it sometimes shows everything or simply nothing

In some cases, i run "hcitool scan" again and can't find my device even. I disable my bluetooth on the device and enable it to start working again.

Anyway, it was time to search for a solution for such a problem. I found this can't add files to mounted volume, no free space sony Z610i ticket. I digged inside it and read for a while and knew that they have the problem of copying files since the mounted point is stating no free space on the mounted device. They stated this is a bug and pointed to its ticket here. It stated that current version of obexfs don't manage S60 3rd edition mobiles probably and found the ticked closed invalid. Looking at comments i found someone stating that this should be fixed if i used  "ObexFTP 0.22 / ObexFS 0.11" instead of the installed ones. These should be compiled as those got by apt-get are one step behind. Ok, no problem let's compile.

prepare an empty folder then wget these files one by one
tar these files using tar -xzf for .gz files and -xjf for .bz2 files. Now lets install them in this order openobex then obexftp and obexfs. This order is important because each one depends on the previous one. But, before doing so, these are some libraries i needed while compiling so make sure you have them installed
  • python-dev
  • libfuse-dev
  • libusb-dev
  • tcl8.4-dev
  • tcl-dev
now in each folder. run "./configure" then "make" then make "install" and you should be ready to redo the steps stated above which i wrote them at the beginning of my journey.

I did so but i am sorry to say that all this was useless for me. If everything went ok with you at this step then you are ready to have fun. If not then continue with me, i still have some points to state.

I reached this link now, i noticed that there is a section for symbian mobiles that is different from other mobiles. seems that i have to continue searching but i think enough for me this night. maybe tomorrow. If you still have problems till tomorrow then wait for my next post that i wish will settle things and put an end to this misery
Blogged with the Flock Browser

No comments: