|<< 
Wojciech Adam Koszek 
> Other





Cell phone backup with FreeBSD


Wojciech A. Koszek
wkoszek@FreeBSD.org
2009.06.01

Introduction

In order to perform phone book and SMS backup under FreeBSD system (and probably any other, decent, POSIX compliant UNIX-alike system) is to make sure your phone is detected correctly.

Examples presented below will touch my Motorola E398 cell phone-- big, heavy, old phone, with excellent battery, TransFlash card, Bluetooth and USB cable acting either as a modem or a USB mass storage device (controllable via internal menu).

Preparation

We're about to talk to the cell phone via AT/DT commands, this is why we must change the phone USB cable setting to "connection oriented", instead of "pendrive-alike".

In order to make E398 recognized by the FreeBSD kernel, I had to load following drivers:

	kldload umodem

USB is of course supported as well.

Making backup

After connecting the phone with USB host, one should see following information in a dmesg output:

	wkoszek@laptop:~$ dmesg | grep ucom0
	ucom0: <Motorola Inc. Motorola Phone (E398), class 2/0, rev 1.10/0.01, addr 3> on uhub0
	ucom0: iclass 2/2
	ucom0: data interface 1, has CM over data, has no break
	ucom0: status change notification available

Even though you could start session with your cell phone with cu(1) command:

	wkoszek@laptop:~# cu -l /dev/cuaU0 -s 9600
	Connected
	AT
	OK

	(you terminate session with 'Enter'+'~'+'.' combination)

I found it more convenient to deploy simple C program to perform all-at-once action.