Sonntag, 12. April 2009

Linux: How to copy Files from a Mobile phone over Bluetooth

Hi folks

(No warranty for error free elnglish! :)

I use a SonyEricsson W810i and Linux Fedora10 on a Lenovo 3000 N200 with bluetooth.

So fare so good

What I'd like to to is to copy Files from the phone device to my notebook to backup them.

More concrete, I'd like to copy my almost 600 photos I shot with the on board camera of my device for not loosing them if some when my phone is gone.

Here is the overview of the steps I tried and fixed out:

> A: Mount the mobile phone over bluetooth to my laptop
> B: Copy the files
> C: Compare, if all the files are really transferred


Step A: Mount the device

For this part, there are 2 possibilities:
A1: Using the Bluetooth logo in my gnome system tray
A2: Mounting the device in the bash shell with good old commands

A1: Is almost simple...

By right click on the bluetooth symbol I first have to "setup new device". Following the onscreen instructions adds the device as a new trusted piece.

Next again rightclick on the bluetooth symbol in the system tray and choosing "Browse files on device".

After choosing my device in the list a nautilus browser window opens with my nice device. I can now browse into the folder "Memory Stick/DCIM/100MSDCF" where I find all my photos. The Directory may differ for other manufacturers.

The next step is tricky. I select all the photos on the device and paste them into my destination folder on the hard disk. At the count of almost 600 images, this makes about 215MB. And at the speed of 16KB/s over bluetooth this takes some time as well (more than 1 hour).

Anyway, at the time I did this it was ate in the night already, so I started the transfer and went to sleep.

Unfortunately, I forgot to plug the power adaptor, and it copied only 90% of the images till my laptop went to sleep as well, because the battery was low.

Retrying to copy the remaining files caused some stream errors. I then had to restart the device as well as the computer.
REMARK: If there is a file already in the destination and Nautilus asks me it should replace or skip the file, the stream is lost, which means the device is not yet able to wait for my response and to resume the remaining processes.

So, copy & paste all the files again and selecting skip for the "already exist files" didn't work. But how to compare then the source and destination? I had 2 missing images in the destination. I found out by watching the properties in the folders. But Which ones are missing? I may have forgotten them to mark while I played around at the beginning. stay tuned...

A2: Mounting the device manually

For using more helpful Linux tools like "comm" I need to address the mobile device in the bash shell. Mounting my device works as follows:

***
the following instructions are copied from: http://www.siltala.net/tag/obex/
  • 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 ~/Phone
  • Mount
    obexfs -bXX:XX:XX:XX:XX:XX -BYY ~/Phone
    (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
In my case, the OBEX channel was "7".

***

nice then, I can use bash shell commands now to handle my files. I mounted the device in ~/w810i.

Step B: Copy the files

As described above, I can use nautilus to copy files. Its also possible to use "cp", but I wanted to see a nice process bar to see how long it takes to complete.

REMARK: It was helpful to switch off thumbnails, because if I open the whole photo folder on my mobile device, it starts to transfer ALL THE IMAGES before I can see them as Thumbnails, which is nonsense at this time, I don't want to wait 2 hours before I select my copy candidates...

After coping the remaining files from last night, as I told, there were 2 files missing in the destination.

C: Comapre, if all the files are really transferred

This is easely done by marking all the photos and opening the properties of that selection "righclick properties". This shows me the number of selected files as well as the total size.
I found out that 2 photos are missing in the destination, very nice, but which ones? I dont like to compare 600 photos by hand ;)

I googeled for the solution I used, here it is:
http://linux.byexamples.com/archives/143/compare-two-directory-listings/


The link explanes "comm" in general, for my purpose I used the following command:

comm -23 <(ls ~/w810i/Memory\ Stick/DCIM/100MSDCF/) <(ls /media/MyBackupMedia/pictures/w810_i_pics/)


Explanations:

> comm usually prints 3 columns, 1: files unique in first file, 2: files unique in second file, 3: files appear in both files.

> The output of "ls" is also interpreted as "file" even it's only the name.

> So I don't want to know which files are unique in the destination (column 2), because no file in the destination is unique.

> I don't want to know which files appear in both files (column 3).

> I want to know WHICh FILES ARE UNIQUE IN THE SOURCE.

> So I remove column 2 and 3 form the output of comm with the option "-23".

> This prints me out the 2 missing files :p

> The characters "<(" are needed and part of the command, "<" sybolizes an input for the command "comm" and the brackets "()" are needed to wrap the path.

Very nice, I found out that picture DSC00089.jpg and DSC00090.jpg were missing. Copying them and my backup is complete *yeah*

Sonntag, 17. August 2008

Game developer meeting 1

Hi all

Hier eine kleine zusammenfassung von unserem heutigen meeting.

Wir wollen ein game entwickeln. Es soll kein sport oder shooter game werden, das gibt es schon in massen. Besser entwickeln wir ein game, bei welchem wir unsere eigenen ideen einbringen können. Diese idee geht in richtung adventures.

Technologien:

Entwickelt wird auf .NET mit dem XNA Framework. Es gibt auf youtube diverse demo videos. Ebenfalls gibt es auf http://creators.xna.com/ viele samples.

Ein praktisches IDE ist Visual Studio express, ebenfalls auf http://creators.xna.com/ downloadbar.

Organisation:

Wir arbeiten im team, das soll uns gegenseitig motivieren. Es gibt jedoch keine fixen termine, da jeder prioritäten hat, die wichtiger sind (prüfungen usw...).

Arbeiten: Wir halten unsere ideen und erkenntnisse auf dem developer blog fest. Den code verwalten wir über ein svn server (eitch). Jeder beschäftigt sich mit einem gebiet, das ihn interessiert.
Von zeit zu zeit machen wir wieder ein meeting, je nach bedarf.
Die folgenden schritte sind klar, jeder arbeitet daran, wenn er zeit / lust / kreativität hat.

Die entwicklungssprache ist gundsätzlich englisch. Texte, welche in deutsch verfasst sind kann eitch bei bedarf übersetzen.

Crew:

Roger: hat das projekt ins leben gerufen und schon einige erfahrungen mit xna gemacht.

Kay: hat schon einiges mit blender und anderen modellier tools gemacht. Ausserdem kreiert er hauptsächlich die story der games.

eitch: ist der coder master und bringt mit dem svn server und der blogeinrichtung alles zusammen

phoenix: unterstützt uns im sound bereich und im art design

shortY: codet fleissig mit und macht nette zusammenfassungen.


Ziele: Trotz der offenen organisation wollen wir auf ein ziel hin arbeiten, das steigert die motivation und wir verzetteln uns nicht in den riesigen möglichkeiten.

Ziel 1: Wir haben das handling mit den entwickler tools gelernt und können damit erste einfache entwicklungen machen (memory, pong, hello graphic).

Ziel 2: Wir ergänzen das demo space game von roger soweit, dass man von einem kleinen, aber abgeschlossenen game mit einem ersten gamesinn / einer gameaufgabe sprechen kann.

Ziel 3: Wir entwickeln unser game.

Die nächsten schritte:

- das raumschiffdesign aufzeichnen, ein einsitzer mit 3 waffensystemen, kleines jagdraumschiff (phoenix)
- blender installieren und ein raumschiffmodell bauen (kay)
- blog und svn server einrichten (eitch)
- visual studio mit xna framework installieren und hello graphic programm bauen (shortY)
- code für das raumschiff demo dokumentieren und eine einführung vorbereiten (roger)
- motivation erhalten und durch die grundlagen arbeiten (alle)


bis zum nächsten mal, have fun
shortY

Dienstag, 17. Juni 2008

Ma good old citron

harrr, this is shortYs mobile

Donnerstag, 13. September 2007

Mein erster Blog

Soso, das ist er jetzt also, mein erster Blog :)

Ich habe vor einiger Zeit davon gelesen, dass es diese Weblogs gibt, doch damals habe ich nicht vertstanden, wozu das gut sein sollte. Warum sollte sich jemand die Zeit nehmen den Kram zu lesen, den ich schreibe? Respektive, wer soll sich die Zeit nehmen den Kram von all den hunderten von Blogern zu lesen? Ich jedenfalls nehme mir sicher nicht die Zeit all den Kram der anderen zu lesen.

Doch inzwischen dürfte ich meine Meinung angepasst haben. Ich brauche das Schreiben. Und wenn ich wahrscheinlich auch den grössten Teil dieses Schreibbedürfnisses auf meiner lokalen Festplatte festhalte starte ich mal mit meinem ersten Blog. Es geht mir mehr darum, dass ich rasch eine Notitz festhalten kann, und das täglich. Ich gehe nicht davon aus, dass irgend jemand Interesse an meinem Kram hat...

Diese Aktion ist daraus entsptanden ein Mittel zur Verfügung zu haben, meine täglichen Gedanken zu technischen Vorhaben und Ideen der Problemlösung fest zu halten. Und bis ich mit h zusammen eine eigene Blog Software realisiert habe starte ich erst einmal hier, denn die Erstellung ist simplel und schnell.

Den Link hier drauf habe ich beim Blog des Authors von "Java ist auch eine Insel" gefunden.


Auf ein frohes Schreiben
shortY =)

PS: Keine Rechtschreibfunktion? Damn :)