This document describes how to connect the A780 Linux smartphone with a Linux desktop computer either via USB with the Belcarra USBLAN driver or with LEOPPP via Bluetooth. It was tested with the German version of the A780 phone and Debian Sarge OS.
A780 Phone, A780 USB cable, Linux computer with USB support
You will find the required software (marked bold in the text) either in the Forum or in the files section of my website http://www.troodon.org/a780/files/
For nearly everything mentioned here you will need the linloader script properly installed on your phone. Linloader makes it possible to execute programs or scripts on the phone. Follow these steps to get it done.
1. Get root
2. Connect the phone using the USB cable
mount /dev/sdb1 /mnt mount the transflash card of the phone using the MassStorage driver.
(sda1 is the phones internal memory, sdb1 is the memory of the transflash card.)
4. Download and unzip loader.zip. it contains 4 files. Connect usb mass storage and make new folder 'loader' in /mnt/.system/QTDownLoad. Make sure you can view hidden files. Send these 3 files to the loader folder. You should now have:
/mnt/.system/QTDownLoad/loader/lin_loader /mnt/.system/QTDownLoad/loader/loader.png /mnt/.system/QTDownLoad/loader/loader-sm.png
5. Send test.lin to phone i.e to MyPrograms.
6. Edit /mnt/.system/java/PlugCardDB using any unix compatible editor. If you have installed some apps into the card, you should have a pretty long file. Insert these lines into the end of the file:
[AppLinkRecord100001001] <- change this number so it doesn't conflict (this number was tested by Thomas to work with more than 100 applications) AllPosition = 200 <- change this number so it doesn't conflict BigIcon = loader.png Directory = loader Exec = lin_loader Group = 3 Icon = loader-sm.png InstalledDate = 2005/2/19 JavaId = -1 Mime = MpkgFile = Name = LinLoader OsVersion = Position = 1 Rotation = Shared = 0 Size = 24K Type = 4 uid = 100001001 <- change this number to the same one above.
7. Restart the phone. You should now see a down arrow icon in tools with the name ``LinLoader''. open file manager and tap and hold test.lin -> open with select 'LinLoader', it should be at the end of the list. Check the 'always use the program to open this filetype'. Close and reopen file manager. If a new file 'test1.txt' has been created, your lin loader is installed successfully.
There are 2 different ways to get USBLAN running on the phone. The way described here is for you if you have successfully installed Linloader like described before. Otherwise you can download the usbmode.mpkg file, copy it to the phone i.e. using Mass Storage mode and invoke the file from file manager to install this native application. A new icon will be created where you can switch between different USB-Modes . Detailed instructions can be found in the motorolafans.com forum, search for ``USBMode application''
To get TCP/IP working over the USB cable you need USBLAN to be enabled inside the phone. You can enable it by following the next steps:
1. Use a unix-compatible editor and edit a script saying this: #!/bin/bash echo MotNet > /proc/usbd-switch
2. Save the script as acmattach.lin and copy it to the phone (i.e. to MyPrograms), using MassStorage like described above.
For Kernel 2.6 just load the ``usbnet.ko'' module into the kernel
modprobe usbnet, it is already included.
(Marcus tested it with Kernel 2.6.12 - prior Kernel versions might fail)
For Kernel 2.4 download, unpack and compile the USB-Lan module source usblan.126.96.36.199-linux-2.4.x.tar. Unpack the sources. Change to the directory of the sourcecode and enter make. Install the module by typing
insmod -f ./usblan.o vendor_id=0x22b8 product_id=0x600c
Check the lofgile
/var/log/syslog, to make sure the driver loaded successfully.
I use insmod and option 'force' here because the driver has some problems loading with modprobe.
1. Disconnect the USB cable
2. Changed the usb-mode to modem on the phone.
3. Execute acmattach.lin script to activate USBLAN (hold it with the pen - select execute with - linloader)
4. Connect the USB cable
Check the logfile
/var/log/syslog, you should see something like this:
Sep 9 17:18:45 alf kernel: probe: BLAN Sep 9 17:18:45 alf kernel: probe: claiming data interface: configuration: 0 interface: 0 Sep 9 17:18:45 alf kernel: probe: tx_size: 64 rx_size: 64 Sep 9 17:18:45 alf kernel: probe: tx_ep : 1 rx_ep : 2 Sep 9 17:18:45 alf kernel: probe: success 1.0.0 Sep 9 17:18:45 alf kernel: probe: return dcffc400
5. Enter the command
ifconfig usb0 192.168.1.5 netmask 255.255.255.0 up
to assign an IP-address to the desktop system.
The phones IP-address is 192.168.1.2.
ping 192.168.1.2 shoud give some response
We're done. From now on we should be able to telnet into the phone.
Download and copy the files for leoppp to the phone.
1. Switch the phone to MassStorage
2. Connect the USB cable
3. Mount the phones internal memory
mount /dev/sda1 /mnt
4. Copy leoppp.tar to the root of the phone
cp ./loeppp.tar /mnt
For unpacking and configuring Leoppp, we need to go into USBLAN mode:
1. Disconnect the phone
2. Switch the phone to Modem mode
3. Execute acmattach.lin with linloader like before to enable USBLAN mode
4. Connect the USB cable.
Set up routing
ifconfig usb0 192.168.1.5 netmask 255.255.255.0 up
>root (no password)
5 Install Leoppp - detailed installation instructions are in the leoppp README file! Short instructions here:
Open a telnet session to the phone
cd /diska tar xvf leoppp.tar -> to create a leoppp folder with all files rm leoppp.tar -> to remove tar archive
On the phone - use the explorer to click LeoPopUp.jar file to install this java application. It is used to show messages to the user on the phone - select clickme.sh file use ``open with'' to permanently associate it with Linloader.
cd leoppp ./install.sh - will install the application
Restart the phone -> you will have 4 new application icons
Bluez and libraries need to be installed.
1. Check the file
/etc/bluetooth/hcid.conf, the local device class should be 120100
2. Check the file
/etc/bluetooth/pin, make sure a 4 digit pin is in there
3. On the phone - enable bluetooth
4. On the phone - enable discoverable
5. On the phone - select scan -> accept to link to the host system, enter the pin from
6. Get root
hcitool scan to recover the BT-Address of the phone (i.e. 00:14:9A:48:92:14)
dund -p5 -P5 -c <bt_address_from_phone noauth local> starts the dial up daemon
9. O the phone - Accept SPP connection fro host
10. On the phone - select BTPPP icon to enable PPP over Bluetooth
ifconfig on the PC should now indicate a ppp0 device with peer IP 192.168.1.4
That's it. From now on we should be able to telnet into the phone.
1. On the phone - switch USB mode to ``Modem''
2. Connect the USB cable to the computer
3. Get root
pppd /dev/ttyACM0 noauth local to start the PPP connection
5. On the phone - select USBPPP icon to enable PPP over USB
ifconfig on the PC should now indicate a ppp0 device with peer IP 192.168.1.2
That's it. From now on we should be able to telnet into the phone.
Accessing the phone's file system from a Linux host.
Establish a PPP connection via bluetooth (or USB). Brows the SMB Filesystem by typing
smb://192.168.1.4/system for /ezxlocal
smb://192.168.1.4/home for /diska in Konqueror.
smbclient //192.168.1.4/home or
smbclient //192.168.1.4/system to enter the interactive shell. For password
just hit enter.
Seems not to work. FTP is enabled in inetd.conf, however there seems to be no ftp daemon on the phone.
We assume NFS is already running on the host and the exported folder is
/home/audio. A link to the phone
has been established with one of the mentioned methods before (USB-cable or Bluetooh).
1. Log into the phone via telnet and create a directory for the nfs share i.e.
mkdir -p /diska/music
2. Mount the remotely exported folder
mount -n -t nfs -ohard,intr,nolock,rsize=4096,wsize=4096
192.168.1.1:/home/audio /diska/music (adjust the IP-address if necessary)
3. Check if it worked
Switch the phone to ``Modem'' mode and connect the USB cable. Watch the log file
A device called
/dev/ttyACM0 should have been attached. This is the modem device which accepts AT commands.
Enter this device into the configuration of the ``gscmxx, gnokii, gammu or wammu'' or the software you want to use to control the phone. Unfortunately none of the mentioned programs fully support the Motorola command set because they are written for Siemens and Nokia phones. Just sending SMS seems to work for the moment.
Enable bluetooth and discoverable mode on the phone. Enter
hcitool inq to recognize the bluetooth address ($btaddr)of the phone.
spdtool search to get the channel for the SP service ($sp_channel).
hcitool cc and
hcitool con connects to the phone.
rfcomm binds the channel to rfcomm0. Now you can send AT commands i.e. with one of the above mentioned programs
hcitool inq sdptool search --bdaddr $btaddr SP hcitool cc $btaddr hcitool con rfcomm bind 0 $btaddr $sp_channel rfcomm show 0
You can also use this steps instead of
dund to establish a PPP connection.
pppd /dev/rfcomm0 noauth local & starts PPP connecion on the host in background and waits for response from the phone.
Then select BTPPP icon on the phone to enable PPP over Bluetooth.
A description to sync with the Java program Sync4j can be found here: http://tud.at/programm/a768i.html Using the Motorola A768i smartphone with GNU/Linux . However I wasn't successful, the sync stops after a certain amount of records.
Multisync is a GTK+ program to sync different devices. It is possible to sync with KDE Adressbook, Evolution, and others. However the syncml plugin of the standard distributions seem to be not compatible to A780 and according to www.multisync.org the used wbxml library (Wap Binary XML) seems to be bugy as well. A pached wbxml can be downloaded from multisync.org, see Documentation - HowTos - SyncML-HowTo. Alexandre d'Alton wrote a patch for the syncml plugin for Multisync Version 0.82. The patch can be found here: http://cache.gmane.org//gmane/comp/gnome/apps/multisync/user/2627-001.bin The mentioned files are also in my files section http://www.troodon.org/a780/files. I tested it and it works great.
Here is my setup to sync over bluetooth (Leoppp and Mack's connectivity pack is required)
Add a new data network selecting Setup -> Data Network -> New
Profile name: BT-PPP GPRS Settings: APN: 192.168.1.3 Timeout: off
Contacts: contacts Calendar: events Tasks: todo Server name: http://192.168.1.3:5079/sync User name: <your_user_name> Password: <your_password> Data connection: BT-PPP
Please note: You'll have to type the words
todo into the line below the respective checkbox if enabled!
Because the phone insists on sending all packets to the GPRS device you need to install Mack's connectivity pack. This makes it possible to divert the GPRS connection to other devices.
1. Install Mack's connectivity pack 2. Execute the leo_start_btppp.lin script from leoppp package to establish PPP connection. 3. Execute MackInetBT.lin script to let the GPRS device route through the bluetooth device.
1. Compile and install the pached version of wbxml 2. Compile and install Multisync 0.82 3. Patch the syncml_plugin, compile and install it
Run Multisync and add a new synchronization pair, select SyncML for the first plugin. Select options of this plugin and
SyncML Server: accept connections http://<this computer>5079/sync SyncML login: <your_user_name> SyncML password: <your_password>
Select also Options -> Disable string tables
The second synchronistation pair is up to your requirements, maybe you want to start testing with the backup plugin. Enable Data types Calendar, Addressbook and tasks. Now save and activate the setup. Multisync status for this synchronistation pair will indicate Waiting for changes. Now start synchronistation on the phone pressing SyncML OTA.
If you have problems, start multisync from a console and enable debug mode
Cross-compiling the Perl interpreter for A780 is still work in progress. You can download microperl http://www.troodon.org/a780/files/microperl from the files section, rename it to perl and copy it to /diska/bin/ on the phone. Microperl is a single executable minimalistic perl interpreter.
If someone has working perl scripts using microperl on the phone, please let me know!.
Any Ideas, comments or improvements are welcome. Please mailto: moto.indi at spamgourmet.com
Thanks to all the guys from MotorolaFans their posts and great appreciation to all the developers there.
This document may be out-of-date, for the latest go to http://www.troodon.org/a780/a780-linux-howto.htm
Last modified: 2006-05-14