Fail to connect to Holux m-241: Debian Wheezy, OpenJDK 7, Bluetooth

Steve8x8's picture

I've recently upgraded my laptop to Debian Wheezy before I got that Holux logger.
I can pair the Holux, and read its NMEA sentences using "cat" or "minicom", but bt747 fails to connect to it. Here's the relevant log snippet:

31354 - BT747 2.X.1975 Build:BT747_mdeweerd.1975.20130411000332820
31362 - Initial: 1019x575 Screen: 1024x600 Final: 1019x575
31366 - Linux
31370 - i386
31373 - 3.2.0-4-686-pae
31375 - 1.7.0_03
31383 - 32
31384 - Fail com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Fail com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel
Success com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
javax.swing.plaf.nimbus.NimbusLookAndFeel
com.sun.java.swing.plaf.motif.MotifLookAndFeel
com.sun.java.swing.plaf.gtk.GTKLookAndFeel

Opened file /home/s/.bt747/gpsRawDebug.txt in mode 4 rw
Opened file /home/s/.bt747/gpsRawDebug.txt in mode 3 rw
59400 - Classgps.connection.GPSRxTxPort
Info: trying to open '/dev/rfcomm4'
Info: Opened port, setting parameters
Issue when setting parameters:115200 8 1 0
gnu.io.UnsupportedCommOperationException: Invalid Parameter
at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:171)
at gps.connection.GPSRxTxPort.openPort(GPSRxTxPort.java:186)
at gps.connection.GPSrxtx.myOpenPort(GPSrxtx.java:117)
at gps.connection.GPSrxtx.setFreeTextPortAndOpen(GPSrxtx.java:156)
at bt747.model.Controller.openFreeTextPort(Controller.java:1120)
at bt747.j2se_view.BT747Main.openPort(BT747Main.java:1494)

Same happens when trying to set to "115200 8 2 0".
There's another error afterwards:

142942 - Port opened
142949 - >HOLUX241,5 true

java.io.IOException: Input/output error in writeArray
at gnu.io.RXTXPort.writeArray(Native Method)
at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1124)
at gps.connection.GPSRxTxPort.write(GPSRxTxPort.java:456)
at gps.connection.GPSRxTxPort.write(GPSRxTxPort.java:472)
at gps.connection.GPSrxtx.write(GPSrxtx.java:200)
at gps.connection.NMEAWriter.sendPacket(NMEAWriter.java:46)
at gps.mvc.commands.GpsLinkNmeaCommand.execute(GpsLinkNmeaCommand.java:52)
at gps.mvc.GpsLinkHandler.doSendCmdUnprotected(GpsLinkHandler.java:170)
at gps.mvc.GpsLinkHandler.sendCmd(GpsLinkHandler.java:99)
at gps.mvc.MtkController.sendCmd(MtkController.java:85)
at gps.mvc.MtkController.reqData(MtkController.java:427)
at gps.mvc.GpsController.setDataNeeded(GpsController.java:123)
at bt747.model.Controller.setMtkDataNeeded(Controller.java:935)
at bt747.j2se_view.BT747Main.modelEvent(BT747Main.java:567)
at bt747.model.AppSettings.doEvent(AppSettings.java:1524)
at bt747.model.AppSettings.run(AppSettings.java:1554)
at net.sf.bt747.j2se.system.J2SEThread.run(J2SEThread.java:20)
at java.lang.Thread.run(Thread.java:722)
142958 - #PMTK182,2,6

... the button changes to "Disconnect" but all device settings are unchecked.
Is there a way to skip baud rate setting completely?

Appending the full error log...

mdeweerd's picture

Hi The exceptions notified

Hi

The exceptions notified for the port baud rate settings are not blocking - they are ignored and BT747 just continues working.  BT747 just tries two different settings to try configure the baud rate.

The issue seems related to the rxtx library.  You might install the rxtx library from debian and modify the startup script to reference the system library (I think that this might actually already be the case).

You could also try the previous version of java to see if it works with that.

They also provide great

They also provide great customer care for all of these products using a good exchange policy.
She is able to have fun and it is usually up for trying new things.
Personally, I find vid bit easier than measuring, because chains often stretch while they get
older.

I've eaten a few excellent

I've eaten a few excellent BBQ created by cooking a entire hog applying a chicken wire framed up with metal rods and then perched on top of concrete blocks. After about an hour, open the lid and rearrange the chicken so that the pieces that were furthest from the fire are closer, and vice versa. Ever wanted to smoke a brisket or salmon but could not because all you have is the normal round backyard charcoal grill.

I don't usually go into such

I don't usually go into such places as our spa uses bromine, not chlorine. If your main concern is safety, then anti slip type stair treads are the best for your application. You'll also want to be sure that the concrete in your home or on your property is well suited to
be stained.

Steve8x8's picture

Perfect! Installing

Perfect! Installing librxtx-java and patching the start script did the trick indeed.
That proves that OpenJDK 7 (which comes with Wheezy) doesn't get in the way of BT747 - which is very good news.
Here's the diff:
--- run_j2se.sh.ORIG 2013-04-11 00:04:42.000000000 +0200
+++ run_j2se.sh 2013-05-25 22:58:27.000000000 +0200
@@ -35,17 +35,17 @@
RXTXLIBPATH="${RXTXPATH}/Linux/i686-unknown-linux-gnu"
TMPRXTXPATH="${RXTXPATH}/Linux/${ARCH}-unknown-linux-gnu"
RXTXJAR="${RXTXPATH}/RXTXcomm.jar"
- if [ -r "${TMPRXTXPATH}" ] ; then
- RXTXLIBPATH="${TMPRXTXPATH}"
- else
+# if [ -r "${TMPRXTXPATH}" ] ; then
+# RXTXLIBPATH="${TMPRXTXPATH}"
+# else
# Did not find binary - look on system.
if [ -e /usr/share/java/RXTXcomm.jar ] ; then
# if librxtx-java seems to be installed locally (e.g., on Ubuntu)
- RXTXPATH=/usr/lib
- RXTXLIBPATH=/usr/lib
+ RXTXPATH=/usr/lib/jni
+ RXTXLIBPATH=/usr/lib/jni
RXTXJAR=/usr/share/java/RXTXcomm.jar
fi
- fi
+# fi
# Ended determining RXTX library
################################

Stowing away the cable... Thanks a lot! (Now I got to get my mobile talk to the Holux to set the logging params...)

Post new comment

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <br>
  • Lines and paragraphs break automatically.
  • Use the special tag [adsense:format:slot] or [adsense:format:[group]:[channel][:slot]] or [adsense:block:location] to display Google AdSense ads.
  • Images can be added to this post.

More information about formatting options