Next Previous Contents

4. Applications that work

All the applications that I've tried have been over IrDA using the MA620 USB dongle. None of the applications that I've tried over straight USB connectivity have worked so far.

4.1 Dial-up

Dial-up works with the A760 -- well, sort of. I can connect to the phone using cu(1) and send modem commands. Won't be able to actually do a dial-up until my provider (Hutch) tells me how to, which is going to take a long time since I haven't asked them yet :) Note: cu is part of the Taylor UUCP package.

Presumably minicom(1) will also work, but being an old-time UUCP person, I prefer cu. Here's a sample cu session after you've put the phone into modem over IrDA mode:

================================================================
[root@mail ~]# cu -l /dev/ircomm0 -s 115200
Connected.
    [I entered ATE1Q0 here, but you can't see it since echo is off]
OK
AT
OK
ATZ
OK
ATI0
960

OK
ATI1
000

OK
ATI2
OK
ATI3
OK
ATI4
L Series

OK
ATI5
010

OK
ATI6
OK
ATI7
ERROR
cu: Got hangup signal <-- [I pressed Disconnect on the phone here]
================================================================

4.2 The OBject EXchange Protocol (OBEX)

OBEX is a data transfer protocol that runs over various types of transports. Apparently the A760 is also OBEX-compliant, so I could use standard OBEX tools to perform file transfer to and from the phone.

The primary OBEX tools I used are:

The versions of each that I used are given in Host Environment section above.

4.3 Sending files to the phone

Sending files from the computer is fairly simple once you have the connectivity in place. You must install OpenOBEX and the ObexFTP package, RPMs (and presumably DEBs) for which are available.

Once ObexFTP was installed, I ran the command:

================================================================
obexftp -p /path/to/file
================================================================

and the designated file got transferred to the phone. You can send multiple files in one command -- just add all the names to the obexftp command line.

The A760 opens up a file save dialogue for each file that you send it, giving you the option of changing the name and the directory (erm, ``folder'') if you desire. I have transferred images, MP3s and plain text files using this method.

4.4 Sending vCards

It's possible to send vCards to the A760 over the IR link, again using obexftp(1). Just make sure that the line terminators in the vCard file are CR-LF and not plain LF -- the phone won't recognise the file with lines terminated with plain LF. If you have lots of vCards with plain LF line terminators you can use the unix2dos utility to convert them to CR-LF format.

I didn't play around much with this feature, but the one vCard I did send (as a file with extension .vcf) opened up a Address Book dialogue on the phone. Presumably you can fill your address book with vCards this way. If you send the same vCard twice you get 2 entries in the address book.

4.5 Sending files from the A760 to Linux

I used the eSquirt tools for receiving files in Linux from the A760 phone. From the phone, sending a file is easy: keep the stylus pressed on a file (or address book entry) and select ``Share'' from the pop-up menu. Select IrDA as the share transport and, if everything goes OK, the file will be sent to the Linux box.

Things weren't so simple on the Linux end. First I had to find a program that would receive files over OBEX. Obexftp wasn't the solution, since it would initiate a connection and get a file, rather than waiting for a file send from the phone. Finally I discovered the squirt_getfile_big program in the eSquirt test suite (directory esquirt-v3/esquirt-v2/tests. This program waits for file sends from the remote device (the phone in our case) and displays information about the file after it is successfully received.

In order to send file from the A760, run the squirt_getfile_big program on Linux then start the file send from the A760. Sending a simple text file (test.txt) containing the words ``This is a test.'' from the A760 looks like this:

================================================================
[root@mail /tmp/esquirt-v3/esquirt-v2/tests]# ./squirt_getfile_big
Waiting for e-Squirts over Obex...
Skipped header c3
Got a e-Squirt or Beacon !!!
  -> label     = []
  -> url       = []
  -> type      = []
  -> length    = [15:d]
  -> xml       = [This is a test.]
  -> filename  = [test.txt] (Ascii)
  -> seq       = [0x0]
  with options : xml=undefined ; model=undefined
                 protocol=Obex ; transport=IrDA
                 Obex IAS=[OBEX] ; Obex session=Yes
                 Obex Target=undefined
Version : squirt_common v2.6 - 24/5/1
================================================================

Unfortunately, as built, squirt_getfile_big doesn't save the files it receives. So I had to hack file saving into the source. Here's the patch:

================================================================
--- squirt_getfile_big.c-orig   2004-08-01 19:26:11.928557907 +0530
+++ squirt_getfile_big.c        2004-08-01 19:24:49.391744883 +0530
@@ -45,9 +45,20 @@
                gi_flags *      ret_flags)      /* Not used */
 {
   int          ret = 0;        /* Reply Header not set */
+  FILE *f ;

   debug_squirt(fields, options, extra);

+  if ( ( f = fopen ( extra->filename,"w" ) ) == NULL )
+  {
+    fprintf ( stderr , "cannot open %s for writing\n" , extra -> filename ) ;
+  }
+  else
+  {
+    fwrite ( fields -> data , fields -> datalen , 1 , f ) ;
+    fclose ( f ) ;
+  }
+
 #ifdef BROWSER
   {
     unsigned char              buf[512];       /* The command */
================================================================

Minimalistic patch that just saves the file under the name that the A760 sends, in the current directory. It doesn't check for existing files -- if a file with the same name already exists it is overwritten.

Anyhow, with this patch I managed to painfully, contact by contact, transfer my address book (my most precious possession) from the A760 to the Linux box.


Next Previous Contents