1 2 3 4 Here's what I came up with as far as documentation. First, I'm mainly a 5 windows person... ewww.. but, as such.. some things are probably not 6 solved optimally. 7 8 --- 9 Getting the Comm API working on an Ipaq 10 Thomas O'Connell (thomas@cc.gatech.edu) 11 12 For the most part, things go pretty much according to the documents 13 provided by: http://www.interstice.com/~kevinh/linuxcomm.html 14 15 I'll just cover the gotchas: 16 17 1) Getting Java itself to run: This was actually the most complicated 18 part (for me). You can download a JRE 1.3 from Blackdown for the ARM 19 processor, but no JDK. But you can tease a javac, jar, javah, etc.. out 20 of a tools.jar file from some other distro(i went with an i386 linux 21 sdk, same version as the JRE), and writing scripts to emulate the 22 behaviors (and adding tools.jar to your classpath). 23 24 Example: 25 javac is: 26 #! /bin/sh 27 java com.sun.tools.javac.Main $@ 28 29 The rest can be created similarily. I kept pulling as many as those out 30 until the .configure of rxtx stopped complaining. 31 32 - include files: in addition to pulling tools.jar from another linux 33 jdk, I brought over the <jdk>\include files too. Dumped it in the 34 <j2re1.3.1> directory. 35 36 - sim link: in the j2re1.3.1 directory, I created a jre sub directory, 37 and beneath that I sym linked a j2re1.3.1\jre\lib to j2re1.3.1\lib. 38 Also, both my JDK_HOME and JAVA_HOME were set to the j2re1.3.1 location. 39 40 41 After all this, the rxtx package built correctly. I added jcl.jar to my 42 classpath as well. 43 44 Your mileage may vary here, since I'm doing this all from recollection. 45 I imagine I'll have to reformat at some point and pay more attention the 46 next time I have to set it up. Lots of trial and error here, and I'm no 47 script kiddie.. I imagine some of this could be fixed up internally. 48 49 50 2) Killing getty - So there's the console terminal running on the comm 51 port. You need to be able to kill this in order for the comm port to be 52 released. Since you don't want to entirely kill getty (since, 53 networking is often flaky on these things), I just changed the 54 /etc/inittab with regards to getty. 55 56 Changed: T0:2:respawn:/sbin/getty -L tts/0 115200 vt100 57 To: T0:2:boot:/sbin/getty -L ttySA0 115200 vt100 58 59 This keeps the ipaq from respawning getty everytime you kill it, but 60 does activate it upon boot. 61 62 63 3) Fixing RXTXCommDriver.java. Based on OS, the code tried to find the 64 serial ports. This will fail because of a naming convention that 65 Intimate/?Debian? uses for the com ports. Need to add a prefix that 66 includes ttySA. By default the code looks like: 67 68 69 if(osName.equals("Linux")) 70 { 71 String[] Temp = { 72 "ttyS" // linux Serial Ports 73 }; 74 CandidatePortPrefixes=Temp; 75 } 76 77 4) Cable: The hotsync cable that the ipaq comes with is a null modem 78 cable. compaq does sell a RS-232 cable for the hotsync port, if you're 79 trying to control a serial device like me. $26 though.. 80 81 -- 82 Thomas O'Connell Georgia Institute of Technology 83 Aware Home Lab ManagerCollege of Computing 84 www.cc.gatech.edu/fce/ahri www.cc.gatech.edu/~thomas 85 86 87