Problem connecting with Bluetooth on Mac

mok0's picture

I received my Qstarz q1000xt logger today and have started to play with it on my Powerbook G4. I have succeeded in getting data via the USB cable, but I cannot connect to the device using Bluetooth from within BT747.

I am pretty sure the problem has to do with the device name. I paired the q1000xt using the standard OS X bluetooth setup. I can see the device  /dev/tty.Qstarz1000XT-SPPslave-1 and I can also see ASCII data streaming from the device if I do this on the terminal:

 $ cat /dev/tty.Qstarz1000XT-SPPslave-1

BT747 has a connect option called "BLUETOOTH (for Mac)", but I can not find anywhere in the program where I can set the actual device name associated with that option.

mdeweerd's picture

Hi You can type any port that

Hi

You can type any port that you like where "BLUETOOTH (for Mac)" is written.  When it is marked BLUETOOTH, only 'known' ports are searched and '/dev/tty.Qstarz1000XT-SPPslave-1' was indeed not in that list.

I added it and have just built BT747_2.X.1786 that integrates that change.  It is available in the usual places.

 

Kind regards

 

Mario

Hi, I'm totally new to this

Hi, I'm totally new to this business and got a Holux M-1200e today.  I connected it to my MacBook Pro running Snow Leopard via USB, and I cannot get BT747 to make any connection.  I already tried to enter likely device names, which I found under /dev, like cu.HOLUX_M-1200E-SPPslave and tty.HOLUX_M-1200E-SPPslave, but to no avail.

In the Info window I see lines like Info: trying to open '/dev/cu.HOLUX_M-1200E-SPPslave', but obviously without success since the Download button in the Log operations window remains grayed out.  On the other hand, when I do a cat /dev/tty.HOLUX_M-1200E-SPPslave I see a data stream containing correct coordinates.  What am I doing wrong?

Any help would be very welcome!

mdeweerd's picture

Hi Based on your message,

Hi

Based on your message, I've just added the /dev/tty.HOLUX_M-1200E-SPPslave port to the list of ports but it will expect a suffix (/dev/tty.HOLUX_M-1200E-SPPslave-1 for instance).  Is that right?

When you enter an non-existing port, I suppose that you do get an error message?  If not, there is a driver problem.  A solution may be to switch to 32 bit java (http://eclipse.dzone.com/articles/eclipse-java-and-snow-leopard ).

Dear mdeweerd, Thanks for

Dear mdeweerd,

Thanks for your response, and, yes, there is a suffix "-1" now, but I think it wasn't there the first time I tried...  Anyway, if I use a non-existing device (I tried /dev/fake) the response is the same - no error message, but no successful connection, either - which is what I still get with the device name including the correct suffix (see below).

I tried cat /dev/tty.HOLUX_M-1200E-SPPslave-1, again, and when the Bluetooth connection is off I get a "device busy" message; when Bluetooth is on it keeps printing real-time data.  So, /dev/tty.HOLUX_M-1200E-SPPslave-1 must be Bluetooth, not USB.  Also, /dev/cu.HOLUX_M-1200E-SPPslave-1 must be Bluetooth, too, because when I do a 'cat' on that it affects the blue LED on the GPS unit as well as the GPS indicator on my computer.  So, then where is the corresponding USB device?  Any clue?  (I don't really need Bluetooth - USB would be just fine.)

I haven't tried a different Java - maybe, before I try that, you could tell from the messages on the BT747 Info Page whether this looks "normal" or not.

Thank you in advance for any additional input!

 

Below are informational messages that can help during debug.

------------------------------------------------

Mac OS X

x86_64

10.6.4

1.6.0_20

Fail javax.swing.plaf.mac.MacLookAndFeel

Fail com.apple.mrj.swing.MacLookAndFeel

Success apple.laf.AquaLookAndFeel

javax.swing.plaf.metal.MetalLookAndFeel

com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel

com.sun.java.swing.plaf.motif.MotifLookAndFeel

com.apple.laf.AquaLookAndFeel

Opened file /Users/xxxx/gpsRawDebug.txt in mode 4 rw

Opened file /Users/xxxx/gpsRawDebug.txt in mode 3 rw

Info: trying to open '/dev/tty.HOLUX_M-1200E-SPPslave-1'

Info: trying to open '/dev/fake'

Info: trying to open '/dev/cu.HOLUX_M-1200E-SPPslave-1'

mdeweerd's picture

Hi Something is clearly wrong

Hi

Something is clearly wrong wit hthe error detection in this case.  I do not own a Mac machine so I need to organise some access to it to solve this issue efficiently.

It is likely that thte 64 bit driver is not correctly loaded and running in 32 bit should be a workaround.

If the device is using a PL-2303 for the serial to USB bridge, you can can a driver from Profilic:

http://www.prolific.com.tw/eng/downloads.asp?id=31

 

If it is using a CP210X, you can find a driver here (not sure that it runs on mac 64b):

http://www.silabs.com/products/mcu/pages/usbtouartbridgevcpdrivers.aspx

 

If it is using the MTK II Chipset USB itself, I can not give you clear instructions.

Ok - installed the S/W and

Ok - installed the S/W and driver that came with the unit on a Windows PC; concluded that USB was (at least close to) CP210X.  So, I installed the Silabs driver on my Mac - no difference.  Then I tried HoudahGPS with various settings until it worked at all, and then until I got the fastest download.  I downloaded tracks and WPs, also as KLM, which made it easy to check with Google Earth that things were alright.

The "Name" in HoudahGPS that works for the USB port is 'usbmodem410'.  The complete device path, which also works, is '/dev/tty.usbmodem410'.  When I check the "Erase" option that also does its job.  Interestingly, the device type, which leads to correct data and the shortest download time, is Holux GR-245!  I tried the same combination in BT747 - still no connection.

Now, HoudahGPS is fine for downloading tracks and waypoints, but it doesn't allow one to access the settings of the unit.  So, it would still be very desirable to get the combination of Holux M-1200e and BT747 on a Mac to work together!

mdeweerd's picture

Please try switching to 32

Please try switching to 32 bit mode for java.

I have to find some time (and preferably a 64b mac) to work on the issue.

After swapping the priority

After swapping the priority 64bit vs. 32bit with the latest Java (6) with no success, I found this link: http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard , which looked promising, but it didn't help, either.  So, I guess - as you said - I'll have to wait until you find an opportunity to try it on a "modern" Mac yourself.  But thanks for all your input, so far!

mok0's picture

I solved my problem... sorta.

I solved my problem... sorta. There are two way I can get it to work. Either, I can simply type the name of the device into the "Connect" field. Or, I can choose the "Populate Serial Port Menu" from the File menu, and the device should appear in the dropdown list (this item used to be called "Find serial ports" in an older version of the program).

I thought I was able to connect via the USB cable at one point, but I can not reproduce that any more.

So, I can now get data from the Qstarz onto my Mac. However, the system is not very robust. I have had to play around quite a lot, and I've had the program hang on numerous occasions. It seems you need to adopt a quite well-defined workflow. If you depart from that workflow, things are likely to go wrong, you don't get any data or BT747 hangs and you need to Force Quit it.

It seems to be important to Connect/Disconnect the device before doing anything lse. The Qstarz needs to be in the "Log" mode, otherwise the download is very, very slow, it can take minutes. When you connect the device, it seems to be important to wait until the "GPS device data" fields have been filled. And when the download is done, you should Disconnect before quitting BT747. It also seems that you need to exit the program using the Java "File" menu, and not the normal "Quit" from the Apple menu.

Also, you must not switch off the device before exiting the program, otherwise it might hang.

Changing the settings of the Qstarz device (e.g. changing the log frequency from 0.2Hz to 1Hz) seems to work fine.

I should say that I have also had success using the freeware program HoudaGPS, but it only allows you to download data, not change the settings of the device.

Anyway, I've gotten data off the Qstarz q1000xt, and it is quite good. The Logger seems more sensitive than my Garmin eTrex Legend Cx when conditions are difficult (e.g. under tree cover). However, the Garmins algorithm for calculating the position is probably better, or more robust. On one trip, the Qstarz keept beeping, even when I was in open terrain, and the sky was clear. When I came home and checked, the entire track was shifted 50-100m in one direction. The relative movements were correct, but the absolute position of the entire track was wrong. I assume the Qstarz's initial lock on the position was wrong, and thus it had problems tracking the satellites, but it never gave up and tried to get a new fix. I have never experienced that type of problem with my Garmin device. 

mdeweerd's picture

Thank you for the

Thank you for the feedback.

If the connection works when selecting the port from the generated drop-down list, there should be some typo in the original entry that you put because if the text would be the same, then the connection should work in a similar way.  Can you cut/paste exactly what you got after selecting the port from the drop-down list?

At one time I got the RXTX driver from: http://blog.iharder.net/2009/08/18/rxtx-java-6-and-librxtxserial-jnilib-on-intel-mac-os-x/  but as you can see, things are not that easy to fix for all cases (somebody talks about CP210X kernel panics).

Regarding the position offset: does DGPS happens to be actif at that time?
According to some DGPS is supposed to improve the accuracy, but in my experience in very often degrades accuracy.

 

mok0's picture

mdeweerd, thanks for your

mdeweerd, thanks for your swift replies. I realize now you answered a bunch of my questions very quickly, it could have saved me a lot of time if I had checked the forum while fooling around with the q1000xt.

Anyways, tonight leaves me quite mystified. I tried many times to download today's track but failed again and again. The download seemed to start, but then froze completely and after 20 minutes I lost patience and killed bt747. Very frustrating, until I realized that all previous times I succeeded in downloading data I also had the device connected via the USB cable. So I tried that, and immediately the data transferred in less than 10 seconds. It seems that you can only download data when the USB cable is connected?!? I don't understand that at all. I hesitate to believe that bt747 reads from two different devices, BT for receiving and USB for data download? Perhaps the bluetooth connection does not have sufficient capacity for data download when only running on the battery? 

In the meantime, I've also tried getting the Qstarz to work on my Dell mini 10 running Ubuntu 9.04, but I haven't gotten anywhere. I can't figure out what device to read from. I am pretty sure the necessary drivers are in the stock Ubuntu kernel, but then again, perhaps not.

You ask whether DGPS is active in my device, I have to say: I don't know. It is at the factory settings except the logging frequency, which I changed to 1Hz. I do not have access to a Windows machine (I don't want one) so I can't run the Qstarz software and check the settings.

Wrt. to the device list problem it is likely that I was hit by the USB-cable issue, I must admit I can't remember if I initially had the device attached via the USB cable or not.

So, I found the solution -

So, I found the solution - it's all described here:

http://trick77.com/2010/09/05/how-to-connect-holux-m-241-64-bit-snow-leo...

What I was simply missing was this, as described in the link:

 

" The solution is to create the semaphore directory for the RxTx Java library which BT747 relies upon:

sudo mkdir /var/lock && sudo chmod 777 "

After I had done that - and clicked on the "Populate Serial Port Menu" in the File menu to make sure the device was present in the connection list - BT747 made the connection, and everything worked just fine (with the slower speed option). I am using V.2.X.1788 (05.10.2010), to avoid further confusion.

mdeweerd's picture

Thanks for the update. I

Thanks for the update.

I forgot about that 'tweak' - I actually thought that it was a thing of the past because the newer RXTX implementations did not require that anymore according to some reports.

Kind regards

 

Mario

joost's picture

After a few months of

After a few months of inactivity, I re-visited BT747 as I had stuff on my Qstartz that I wanted to download.

Unfortunately, I have trouble getting BT747 to contact the device, even though it had worked without problems a few months ago.

While it is obviously connected through the standard Mac Bluetooth Setup

( cat /dev/tty.iBT-GPS-SPPSlave spits out long stings like

>>> $GPGGA,120101.638,5056.2435,N,00657.7152,E,0,0,,102.4,M,47.6,M,,*4C

>>> $GPGSA,A,1,,,,,,,,,,,,,,,*1E

>>> $GPGSV,1,1,00*79

>>> $GPRMC,120101.638,V,5056.2435,N,00657.7152,E,0.00,0.00,101010,,,N*7A

)

 

the program refuses to connect. To be more precisely, I cannot download any traces. What confuses me is that the log first reports that the port is already open, and later announces that a port is opened.

To ensure no other program is using the port, I did this after a clean boot, but to no avail. 

Full log (from info pane) is attached in bt747-101010-Qstarz.txt. Any suggestions are appreciated.

 

Joost

10.6.4

 

output "java -version "

>> java version "1.6.0_20"

>> Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)

>> Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)

Short error log:

>>38306 - Classgps.connection.GPSRxTxPort

>>Error: Port /dev/tty.iBT-GPS-SPPSlaveis currently in use

>>gnu.io.PortInUseException: Unknown Application

>> (...)

>> at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

>> 38743 - Port opened

AttachmentSize
File bt747-101010-Qstarz.txt2.87 KB
mdeweerd's picture

Hi Joost - In principle you

Hi Joost

- In principle you do have another application using the port - sure that you are not running anything else like 'gpsd', ... .  I agree that it is strange that you can cat the port but not open it;

- Supposing that the port is not open, is this an issue with the lock file?

- Error handling is not perfect and the message 'Port is opened' indicates that we are at the end of the port opening procedure and that the error has been ignored (because in some cases, an error does not mean that the port is not open), but this error message does mean that the port is somehow in use.

joost's picture

Hi Mario, it is quite

Hi Mario,

it is quite strange.

1) port in use: I do not know how to find out whether the port is opened by another process other than

"lsof | grep tty", which does not show tty.iBT-GPS-SPPSlave.

2) lock file: here I am not sure what you mean

3) error msgs: ok, i'll disregard them for a while :-)

What is very strange is that I could without too much trouble just pull off the traces with HoudahGPS (mind you: only AFTER BT747 had already failed, I had not downloaded this program before my previous post). Still, I cannot control any settings, so having bt747 up and running again is greatly preferable to me.

 

Joost

Any solution on this? I have

Any solution on this? I have the same problems Joost has.

Ton

Ton's picture

Any solution on this? I have

Any solution on this? I have the same problems Joost has.

Ton

It have always been a kind of

It have always been a kind of pain to make this great software to work. I insist on great because the potential is amazing and promising. Anyway, since I know it (1,5 year), this reminds me anti-windows old sentences like "Plug and Pray" 

In the past, I was (with time) able to make it work, download and convert my datas.

But right now, it's just impossible.

I'm on it since two days, trying to connect and download…

Same problem as others people here:

 

=========================================

24370 - Classgps.connection.GPSRxTxPort

Error: Port /dev/tty.QstarzGPS-SPPslaveis currently in use

gnu.io.PortInUseException: Unknown Application

at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467)

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$7.actionPerformed(Unknown Source)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)

at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

at java.awt.Component.processMouseEvent(Component.java:6352)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

at java.awt.Component.processEvent(Component.java:6117)

at java.awt.Container.processEvent(Container.java:2085)

at java.awt.Component.dispatchEventImpl(Component.java:4714)

at java.awt.Container.dispatchEventImpl(Container.java:2143)

at java.awt.Component.dispatchEvent(Component.java:4544)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)

at java.awt.Container.dispatchEventImpl(Container.java:2129)

at java.awt.Window.dispatchEventImpl(Window.java:2478)

at java.awt.Component.dispatchEvent(Component.java:4544)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

24371 - Port openedBump…

=========================================


Note that the shell command cat /dev/tty.QstarzGPS-SPPslave works too!

P.-S.: not even a chance to make it work too by using usb connection…

P.-S. 2: MacOS X 10.6.5 (64bit kernel) — QStarz 1000

 

mok0's picture

In my experience, the only

In my experience, the only way to solve that problem is by rebooting your Mac, and restarting the GPS logger as well.  

Hi ! I'm desperately trying

Hi !

I'm desperately trying to connect my iMac to my HOLUX M241 via bluetooth.

I've created the /var/lock directory and set the needed permissions, I can read teh livetracking via cat /dev/tty.HOLUX_M-241-SPPSlave (or any other extension like ...Slave-1 as long as I've configured it in buetooth settings).

But BT747 won't connect. No matter if I'm logged in as Admin or normal user.

This drives me crazy, because I've already downloaded the log, when my iMac was new.

Any help would be appreciated

 

      Markus

Sorry... I've forgot to put

Sorry...

I've forgot to put in the debug-output.

Die Desktop-Version von BT747 läuft nun recht stabil. Sie ist noch nicht offiziell freigegeben, da noch einige Funktionen benutzerfreundlicher gestaltet werden ------------------------------------------------ 2066 - BT747 2.1.4 Build:BT747_mdeweerd.4.20120512145721073 2066 - Initial: 1177x598 Screen: 1920x1080 Final: 1177x598 2066 - Mac OS X 2067 - x86_64 2067 - 10.7.4 2067 - 1.6.0_33 2067 - 64 2067 - Fehlercom.apple.mrj.swing.MacLookAndFeel Erfolgreichapple.laf.AquaLookAndFeel javax.swing.plaf.metal.MetalLookAndFeel com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel com.sun.java.swing.plaf.motif.MotifLookAndFeel com.apple.laf.AquaLookAndFeel Opened file /Users/markus/GPS/gpsRawDebug.txt in mode 4 rw Opened file /Users/markus/GPS/gpsRawDebug.txt in mode 3 rw 99971 - Classgps.connection.GPSRxTxPort Info: trying to open '/dev/tty.HOLUX_M-241-SPPSlave'

thanks you ! IT WORKS! OS X

thanks you !

IT WORKS!

OS X 10.11.5

sudo mkdir /var/lock && sudo chmod 777 /var/lock

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

By submitting this form, you accept the Mollom privacy policy.