Testing out the PPD42 Air Quality Sensor, with an MSP430 Launchpad and graphing the data with GNUplot.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
3.2 KiB

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