BT747 does not connect to device -- gnu.io.NoSuchPortException

bt747user99's picture

Hi,

I have a QSTARZ BT-Q1000X and openSUSE 11.1 with a patched kernel (2.6.27.29-...) which properly recognizes the GPS logger. Proof: the device /dev/ttyACM0 is not only created when I connect the GPS logger to my computer, the command

>cat /dev/ttyACM0

lists the NMEA sentences which the logger sends.

Unfortunately, the BT747 does not connect to the /dev/ttyACM0. Why? What is wrong here?

Thanks in advance, Karl.

Further information:

I have the BT747 2.X.1486 Build:BT747_mdeweerd.1486.20090713212908187 and the rxtx-java from the repository
http://download.opensuse.org/repositories/Application:/Geo/openSUSE_11.1/.

When I run the BT747 as normal user, I get the error

check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL        

Complete output below.

When I run BT747 as root, I get

444773 - Classgps.connection.GPSRxTxPort
Info: trying to open '/dev/ttyACM0'

gnu.io.NoSuchPortException

[...]

Listing known ports:
444778 - SER  :/dev/ttyS4
444778 - SER  :/dev/ttyS0
444778 - PAR  :/dev/lp0
444778 - Port opened

Now the complete output as normal user:

2107 - BT747 2.X.1486
Build:BT747_mdeweerd.1486.20090713212908187
2107 - Linux                                                    
2107 - amd64                                                    
2107 - 2.6.27.29-0.1-as                                          
2107 - 1.6.0_0                                                  
2107 -
Fehlercom.sun.java.swing.plaf.windows.WindowsLookAndFeel  
Fehlercom.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel  
Erfolgreichcom.sun.java.swing.plaf.gtk.GTKLookAndFeel            
javax.swing.plaf.metal.MetalLookAndFeel                          
com.sun.java.swing.plaf.motif.MotifLookAndFeel                  
com.sun.java.swing.plaf.gtk.GTKLookAndFeel                      

Opened file /home/kw/gpsRawDebug.txt in mode 4 rw
Opened file /home/kw/gpsRawDebug.txt in mode 3 rw
14506 - Classgps.connection.GPSRxTxPort          
Info: trying to open '/dev/ttyACM0'              
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL                                                                                
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL

gnu.io.NoSuchPortException
        at
gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:269)
        at gps.connection.GPSRxTxPort.openPort(Unknown Source)
        at gps.connection.GPSrxtx.myOpenPort(Unknown Source)
        at gps.connection.GPSrxtx.setFreeTextPortAndOpen(Unknown
Source)
        at bt747.model.Controller.openFreeTextPort(Unknown Source)
        at bt747.j2se_view.BT747Main.access$300(Unknown Source)
        at bt747.j2se_view.BT747Main$6.actionPerformed(Unknown
Source)
        at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
        at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
        at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
        at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
        at
java.awt.Component.processMouseEvent(Component.java:6108)
        at
javax.swing.JComponent.processMouseEvent(JComponent.java:3276)
        at java.awt.Component.processEvent(Component.java:5873)
        at java.awt.Container.processEvent(Container.java:2105)
        at
java.awt.Component.dispatchEventImpl(Component.java:4469)
        at java.awt.Container.dispatchEventImpl(Container.java:2163)
        at java.awt.Component.dispatchEvent(Component.java:4295)
        at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
        at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
        at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
        at java.awt.Container.dispatchEventImpl(Container.java:2149)
        at java.awt.Window.dispatchEventImpl(Window.java:2478)
        at java.awt.Component.dispatchEvent(Component.java:4295)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:604)
        at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
        at
java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
14524 -
Listing known ports:
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL
check_group_uucp(): error testing lock file creation Error
details:Keine Berechtigungcheck_lock_status: No permission to
create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL
14529 - Port opened
24054 - Attempting saving settings to
/home/kw/BT747SettingsJ2SE.pdb
24054 - Writing settings success for
/home/kw/BT747SettingsJ2SE.pdb

And here the complete output as root:

2045 - BT747 2.X.1486 Build:BT747_mdeweerd.1486.20090713212908187
2046 - Linux
2046 - amd64
2046 - 2.6.27.29-0.1-as
2046 - 1.6.0_0
2046 - Fehlercom.sun.java.swing.plaf.windows.WindowsLookAndFeel
Fehlercom.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel
Erfolgreichcom.sun.java.swing.plaf.gtk.GTKLookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
com.sun.java.swing.plaf.motif.MotifLookAndFeel
com.sun.java.swing.plaf.gtk.GTKLookAndFeel

Opened file /home/kw/gpsRawDebug.txt in mode 4 rw
Opened file /home/kw/gpsRawDebug.txt in mode 3 rw
12977 - Classgps.connection.GPSRxTxPort
Info: trying to open '/dev/ttyACM0'

gnu.io.NoSuchPortException
at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:269)
at gps.connection.GPSRxTxPort.openPort(Unknown Source)
at gps.connection.GPSrxtx.myOpenPort(Unknown Source)
at gps.connection.GPSrxtx.setFreeTextPortAndOpen(Unknown Source)
at bt747.model.Controller.openFreeTextPort(Unknown Source)
at bt747.j2se_view.BT747Main.access$300(Unknown Source)
at bt747.j2se_view.BT747Main$6.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
at java.awt.Component.processMouseEvent(Component.java:6108)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3276)
at java.awt.Component.processEvent(Component.java:5873)
at java.awt.Container.processEvent(Container.java:2105)
at java.awt.Component.dispatchEventImpl(Component.java:4469)
at java.awt.Container.dispatchEventImpl(Container.java:2163)
at java.awt.Component.dispatchEvent(Component.java:4295)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
at java.awt.Container.dispatchEventImpl(Container.java:2149)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4295)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:604)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
12991 -
Listing known ports:
12995 - SER :/dev/ttyS4
12996 - SER :/dev/ttyS0
12996 - PAR :/dev/lp0
12996 - Port opened
16192 - Attempting saving settings to /root/BT747SettingsJ2SE.pdb
16192 - Writing settings success for /root/BT747SettingsJ2SE.pdb

mdeweerd's picture

Hi The official RXTX

Hi

The official RXTX distribution finds ports based on the device name. '/dev/ttyACM'* was not in the list.

I 'hacked' RXTX so that '/dev/ttyACM' is in the list and in principle a more recent BT747 distribution should have that hacked RXTX (I do not remember when I added it, but I am now at 1515) and I believe that the stable version also has it.
I am pretty sure that the webstrat distribution has it.

You can also force any port name on the command line in the script, but it is of course more logical to use the more recent RXTX jar.

If that does not work, I'll look in more detail.

bt747user99's picture

Hi, thanks for your immediate

Hi,

thanks for your immediate response!

So I downloaded the current release 1515 and started it:

(1) As normal user: the error remains the same.

(2) As root: BT747 did connect to the GPS logger and seemed to download data. After some while I tried to switch to the tab "Karte" (Card?) and then BT747 crached with the messages given below. The log file hs_err_pid7073.log is quite large, can I upload it somehow?

The previous version 1486 didn't crash when I changed to the card tab. So I would like to test the 1486, forcing the device on the command line -- but how? I run the 1486 as:

export JP=/usr/share/java; java -Xmx192m -classpath $JP/RXTXcomm.jar:$JP/jopt-simple-2.4.1.jar:$JP/jcalendar-1.3.2.jar:$JP/swing-layout-1.0.3.jar:$JP/swingx.jar:$JP/swingx-ws.jar:$JP/libBT747.jar:$JP/BT747D.jar bt747.j2se_view.BT747Main

Well, another piece of information: when I start the 1515 and do not connect to the device I can change to the card tab. When I connect while being on the card tab, the 1515 craches immediately.

Here is the dump of the 1515, which was written to the screen:

[...]
74206 - <PMTK182,3,7,262,
74216 - <PMTK001,182,2,3,
GConf-Fehler: Der Konfigurationsserver konnte nicht kontaktiert werden; mögliche Fehlerquellen sind, dass TCP/IP für ORBit nicht aktiviert ist oder auf Grund eines Systemabsturzes alte NFS-Sperrengesetzt sind. Unter http://www.gnome.org/projects/gconf/ erhalten Sie weitere Informationen (Details - 1: Verbindung zur Sitzung konnte nicht abgerufen werden: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
GConf-Fehler: Der Konfigurationsserver konnte nicht kontaktiert werden; mögliche Fehlerquellen sind, dass TCP/IP für ORBit nicht aktiviert ist oder auf Grund eines Systemabsturzes alte NFS-Sperrengesetzt sind. Unter http://www.gnome.org/projects/gconf/ erhalten Sie weitere Informationen (Details - 1: Verbindung zur Sitzung konnte nicht abgerufen werden: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
GConf-Fehler: Der Konfigurationsserver konnte nicht kontaktiert werden; mögliche Fehlerquellen sind, dass TCP/IP für ORBit nicht aktiviert ist oder auf Grund eines Systemabsturzes alte NFS-Sperrengesetzt sind. Unter http://www.gnome.org/projects/gconf/ erhalten Sie weitere Informationen (Details - 1: Verbindung zur Sitzung konnte nicht abgerufen werden: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
GConf-Fehler: Der Konfigurationsserver konnte nicht kontaktiert werden; mögliche Fehlerquellen sind, dass TCP/IP für ORBit nicht aktiviert ist oder auf Grund eines Systemabsturzes alte NFS-Sperrengesetzt sind. Unter http://www.gnome.org/projects/gconf/ erhalten Sie weitere Informationen (Details - 1: Verbindung zur Sitzung konnte nicht abgerufen werden: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
GConf-Fehler: Der Konfigurationsserver konnte nicht kontaktiert werden; mögliche Fehlerquellen sind, dass TCP/IP für ORBit nicht aktiviert ist oder auf Grund eines Systemabsturzes alte NFS-Sperrengesetzt sind. Unter http://www.gnome.org/projects/gconf/ erhalten Sie weitere Informationen (Details - 1: Verbindung zur Sitzung konnte nicht abgerufen werden: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
GConf-Fehler: Der Konfigurationsserver konnte nicht kontaktiert werden; mögliche Fehlerquellen sind, dass TCP/IP für ORBit nicht aktiviert ist oder auf Grund eines Systemabsturzes alte NFS-Sperrengesetzt sind. Unter http://www.gnome.org/projects/gconf/ erhalten Sie weitere Informationen (Details - 1: Verbindung zur Sitzung konnte nicht abgerufen werden: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
GConf-Fehler: Der Konfigurationsserver konnte nicht kontaktiert werden; mögliche Fehlerquellen sind, dass TCP/IP für ORBit nicht aktiviert ist oder auf Grund eines Systemabsturzes alte NFS-Sperrengesetzt sind. Unter http://www.gnome.org/projects/gconf/ erhalten Sie weitere Informationen (Details - 1: Verbindung zur Sitzung konnte nicht abgerufen werden: Connection was disconnected before a reply was received)
#
GConf-Fehler: Der Konfigurationsserver konnte nicht kontaktiert werden; mögliche Fehlerquellen sind, dass TCP/IP für ORBit nicht aktiviert ist oder auf Grund eines Systemabsturzes alte NFS-Sperrengesetzt sind. Unter http://www.gnome.org/projects/gconf/ erhalten Sie weitere Informationen (Details - 1: Verbindung zur Sitzung konnte nicht abgerufen werden: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fef44ce6840, pid=7073, tid=140665647118672
#
# JRE version: 6.0-b16
# Java VM: OpenJDK 64-Bit Server VM (14.0-b15 mixed mode linux-amd64 )
# Distribution: Custom build (Wed Aug 26 23:18:43 UTC 2009)
# Problematic frame:
# CGConf-Fehler: Der Konfigurationsserver konnte nicht kontaktiert werden; mögliche Fehlerquellen sind, dass TCP/IP für ORBit nicht aktiviert ist oder auf Grund eines Systemabsturzes alte NFS-Sperren gesetzt sind. Unter http://www.gnome.org/projects/gconf/ erhalten Sie weitere Informationen (Details - 1: Verbindung zur Sitzung konnte nicht abgerufen werden: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
[libdbus-1.so.3+0x26840]
#
# An error report file with more information is saved as:
# /home/kw/dev/BT747_2.X.1515_full/hs_err_pid7073.log
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
# http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

mdeweerd's picture

You can attach files - when

You can attach files - when adding a comment, you have WebFM attachments which should allow you to upload files - please compress big files though. Possibly, as normal user, you still reference the old installation or an installed RXTX somewhere on your machine. On linux, the lock file should not be a problem (like it was on Mac installations), but could be in your case. Can you try BT747 through webstart (launch it from http://www.bt747.org/webinstall)? The way this presents itself, it will be difficult to find the reason for the problem. Could you try another Java VM (the one from sun directly, rather than openJDK). I do not have much time to enter in the details now.

bt747user99's picture

Hi, unfortunately WebFM does

Hi,

unfortunately WebFM does not tell me anything...... :-(

I tried the links "Try the desktop version of BT747" and "Install the desktop version of BT747" with no effect. The link
"BT747 Latest using RxTx 2.2pre2 (RxTx dev version) for Windows 32 & 64 bit, MacOSX, Linux." finally worked, the application was downloaded and started. Unfortunately, the same error occured, as copied from the info tab:

Die Desktop-Version von BT747 läuft nun recht stabil.
Sie ist noch nicht offiziell freigegeben, da noch einige Funktionen benutzerfreundlicher gestaltet werden
------------------------------------------------
1777 - BT747 2.X.1515 Build:BT747_mdeweerd.1515.20090906011932788
1777 - Linux
1777 - amd64
1778 - 2.6.27.29-0.1-as
1778 - 1.6.0_0
1778 - Fehlercom.sun.java.swing.plaf.windows.WindowsLookAndFeel
Fehlercom.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel
Erfolgreichcom.sun.java.swing.plaf.gtk.GTKLookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
com.sun.java.swing.plaf.motif.MotifLookAndFeel
com.sun.java.swing.plaf.gtk.GTKLookAndFeel

27509 - Classgps.connection.GPSRxTxPort
Info: trying to open '/dev/ttyACM0'

gnu.io.NoSuchPortException
at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:269)

bt747user99's picture

Hi, I guess, as far as BT747

Hi,

I guess, as far as BT747 is concerned, my problems are solved:

(1) The locking error as normal user can be solved by adding that user to group uucp.

(2) The dump seems to be a problem of rxtx and the JRE/JDK. The rxtx-2.2pre2 runs with the 1.5.0-sun JRE, but dumps with the openJDK-1.6.0. I verified this with my own test program. It can be reproduced.

The rxtx-2.1.7 dumps even with the 1.5.0-sun JRE. There is a general problem of the rxtx-2.1.7 on multicore systems, see e.g. http://mailman.qbang.org/pipermail/rxtx/2009-September/4811063.html

(3) I am using the BT747 1515 release for now. In view of the problems described above I will not try to get the 1486 that ships with openSUSE working, in particular since the rxtx of the openSUSE repository is version 2.2-pre1, not -pre2.

mdeweerd's picture

Thanks for the precise

Thanks for the precise feedback.

I guess I should revisit this entire RXTX stuff to make it simpler for the end user.

You really need to look at

You really need to look at the rxtx stuff.

I had it working for ages, but recently i installed rxtx in the jre lib dirs for another project and of course it broke bt747, and now no matter what i do (even after removing it etc) bt747 refuses to talk to /dev/ttyACM0 (and the gps is there fine i can see it with cu etc).

rxtx's hardcoded list of serial ports is one of the most user hostile things i've come accross in ages :(

There a mention of a work around here in the first reply (that dosn't involve changing the library):

http://www.technogumbo.com/2009/10/RXTX-Ubuntu-ttyACM-Devices-Not-Working/

This issue has caused me (and no doubt many others) endless hassle

mdeweerd's picture

Hi I confirm this issue with

Hi

I confirm this issue with the standard RXTX library.  To speed up port detection, it limits the type of ports it examines.  '/dev/ttyACM' is actually even in the code, but it is commented out for the list along with other ports commented out like that.

BT747 has a modified RXTX library and should be looking at the included RXTX libraries first before looking at the system library.  That might of course be failing because systems evolve and the algorithm needs to adapt a bit.

I assume that you are starting BT747 using 'run_j2se.sh' given you description (and that you are not launching it using the webstart links).

So one thing to do is to check out what happens there.  Change the first line of 'run_j2se.sh' from '#/bin/sh' to '#/bin/sh -xv'.  Then launching it in a terminal will reveal its operations.  Likely it ends up doing '   RXTXPATH=/usr/lib' in you case, but then I would like to know the value of 'ARCH'.

Alternatively you can replace the file '/usr/share/java/RXTXcomm.jar' with one of those coming with BT747.  That should do the trick but does not allow me to solve the issue for everybody.

The last workaround is to instruct RXTX to use a very specific port directly through some parameter that is used directly in its internals.  That means that the GUI settings do not matter anymore.
Maybe you can first try one of the above.

 

 

Hi, I'm running it by

Hi,

I'm running it by downloading the .jnlp file and running it from the command line using javaws, i didn't know of any other way other than clicking on the webpage every time!

I've found another workaround tho, i found this in the rxtx source:

* Register ports specified in the file "javax.comm.rxtx.properties"
* Key system properties:
* javax.comm.rxtx.SerialPorts
* javax.comm.rxtx.ParallelPorts
*
* Tested only with sun jdk1.3
* The file javax.comm.rxtx.properties must reside in the java extension dir
*
* Example: /usr/local/java/jre/lib/ext/javax.comm.rxtx.properties
*
* The file contains the following key properties:
*
* javax.comm.rxtx.SerialPorts=/dev/ttyS0:/dev/ttyS1:
* javax.comm.rxtx.ParallelPorts=/dev/lp0:

So on my ubuntu system i created /usr/lib/jvm/java-6-sun/jre/lib/ext/javax.comm.rxtx.properties containing:

 

javax.comm.rxtx.SerialPorts=/dev/ttyS0:/dev/ttyS1:/dev/ttyACM0:/dev/rfcomm0:
javax.comm.rxtx.ParallelPorts=/dev/lp0:

And also have:

-J-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0:/dev/ttyUSB0:/dev/rfcomm0:

on the commandline to javaws then i can use both /dev/rfcomm0 and /dev/ttyACM0.

I have to have the device connected before starting bt747 tho, which isn't helpful either.

Ideally whatever serial port the user specifys in the gui should be whatever serial port gets opened trying to do anything else is just stupid.

mdeweerd's picture

Hi Jasper Thanks for

Hi Jasper

Thanks for sharing.

I agree that whatever port is entered in the GUI should be the opened port, unfortunately, RXTX does not follow that rule very well and there is no way to bypass it other than hacking RXTX (which is what I partially did).

To bypass going on the web, you can:

  1. Keep a copy of the JNLP locally and launch that (extension based);
  2. Use the zip distribution (and 'run_j2se.sh').

Some people made packages for certain linux variants.  If you are lucky, you can use that too (but the packages are not 'up-to-date'.