Okay, it was a bear, but here's what I did to get it to work:
First I had to correctly follow the instructions on the placelab-users
stumbling how-to guide about adding myself to the uucp group. This was
a non-trivial task that required commands like:
sudo dscl . merge /groups/uucp users "djp3"
sudo mkdir /var/spool/uucp
sudo chgrp uucp /var/spool/uucp/
sudo chmod -R g+rw /var/spool/uucp/
Then I had to retry the Bluetooth Serial Utility and set up the GPS
Beacon as an "Outgoing" port. That doesn't make any sense to me, but
it worked. (rather than an incoming port)
Then I had to figure out that I needed to use the
/dev/cu.BluetoothGPSBeacon device (4800 baud was fine)
Then I had to open eclipse and get the whole placelab directory
compiled so that I could run GPSEcho and verify that the GPS was okay.
GPS Echo worked fine, once I got it compiled.
Then I had to figure out what was going wrong with PlacelabStumblerGUI
It has something to do with trying to open the serial port connection
to the GPS twice. The second time fails because it looks like it is
already open. I replaced the code for the
org.placelabe.spotter.SerialGPSSpotter.open() with the code below and
then everything worked. It is just the four lines after the first if
statement that are different. It looks like it might be a "bad" thing
to do, but it works now.
public void open() throws SpotterException {
try {
if(serialPort != null) {
return;
//in.close();
//out.close();
//serialPort.close();
}
gpsPort = PlacelabProperties.get("placelab.gps_device");
if(gpsPort == null) {
throw new SpotterException("placelab.gps_device
undefined");
}
int speed = getSerialSpeed();
System.out.println("SerialGPSSpotter: Using serial device: " +
gpsPort +
" @ " + speed + " baud");
serialPort =
(SerialPort)CommPortIdentifier.getPortIdentifier(gpsPort).open("SerialGP
SSpotter", 2000);
in = new InputStreamReader(serialPort.getInputStream());
out = new PrintWriter(serialPort.getOutputStream());
serialPort.setSerialPortParams(speed,
SerialPort.DATABITS_8,
SerialPort.STOPBITS_1,
SerialPort.PARITY_NONE);
serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT &
SerialPort.FLOWCONTROL_RTSCTS_IN);
serialPort.setDTR(true);
serialPort.setDTR(false);
if (in != null && out != null) return;
} catch (IOException ioe) {
throw new SpotterException("Aack, broken pipe");
} catch (NoSuchPortException nspe) {
throw new SpotterException("Aack, no such port (check
placelab.gps_device system property)");
} catch (PortInUseException piue) {
throw new SpotterException("Aack, port in use (check rxtx
install)");
} catch (UnsupportedCommOperationException ucoe) {
throw new SpotterException("Can't set up gps serial
parameters");
}
}
-Don
----
Donald J. Patterson
University of Washington
http://www.cs.washington.edu/homes/djp3/homepage
smime.p7s
Description: S/MIME cryptographic signature
|