Page 1 of 2

Connect Mk2 to my Mac

Posted: 12 Jun 2011, 22:18
by Decouverte
Hi All,

I just received my new Mk2 last Friday :) It runs with the FW 1.80.

After a few hours of fights to connect it with my Mac, I don't know what to do to make it recognized :(

I have a MacBook Pro with Snow Leopard with JDiveLog already installed - I was not asked to choose for the RXTX-Driver at this time!
Then I installed the FTDI Chip driver - Installation went right but the following files were not installed in /Library/Receipts:
- ftdiusbserialdriver.pkg
- ftdiusbserialdriverinstallerPostflight.pkg
- ftdiusbserialdriverinstallerPreflight.pk

Then I tried to install the RXTX-Driver (rxtx-2.1-7r2.zip) - this is were problems started. Installation failed each time I tried - in fact I did not know how to install, so I double-click on the INSTALL file in the root directory of the extracted files - not sure if I'm right...
So I tried to move the required files manually:
- RXTXcomm.jar OK
- …? what else to move?

Any advice may be helpful…

Thanks,
Kris

Re: Connect Mk2 to my Mac

Posted: 12 Jun 2011, 23:27
by hexxon
As I have not received my 2n, I cant really help with your installation… Maybe you should repair your drive (Macintosh HD) permissions before trying to reinstall everything… Are you administrator ?

This topic can be helpful too (hope so) :

http://www.tecdivers.co.uk/index.php?sh ... ed&pid=560

Re: Connect Mk2 to my Mac

Posted: 13 Jun 2011, 01:03
by Decouverte
Thanks hexxon :)

With your topic, I remarked that, as I have a Core 2 duo processor - which means a x64 chip, the RXTX driver I tried to use is only working with x32.
I'm struggling to find the right one now :(

Re: Connect Mk2 to my Mac

Posted: 13 Jun 2011, 02:02
by hexxon

Re: Connect Mk2 to my Mac

Posted: 13 Jun 2011, 09:47
by Decouverte
Wow, thanks again.

So now I believe I installed the correct librxtxSerial.jnilib in /Library/Java/Extensions.
I also have the RXTXcomm.jar - the one from rxtx.qbang.org - in the same folder.

Then I plugged the OSTC, switched it on and loaded JDiveLog. Then in JDiveLog, Settings > Divecomputer:
  • Driver: OSTC
    Com Port: /dev/tty.usbserial-A4SHCQSJ (RXTX-2.1)
    Protocol Version: OSTC Mk.2 1.80 - X
Next, I was in the "Dive computer" icon, "OSTC Settings" tab and click "Load". This is the error message I get:

Could not load data - Com port already in use... :(

I remarked that, in the lower left of the JDiveLog window, there is a progress bar which is running continuously!?! As if I have something else trying to use this port, but what?!?

And here are the details of the cause, which were part of the error message:
[hr]

Com port is already in use..
at net.sf.jdivelog.gui.ostc.OSTCSettingsPanel$1.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:6374)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6139)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4736)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Component.dispatchEvent(Component.java:4566)
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:4566)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:680)
at java.awt.EventQueue.access$000(EventQueue.java:86)
at java.awt.EventQueue$1.run(EventQueue.java:639)
at java.awt.EventQueue$1.run(EventQueue.java:637)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:653)
at java.awt.EventQueue$2.run(EventQueue.java:651)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:650)
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)
Caused by: net.sf.jdivelog.ci.TransferException: Com port is already in use..
at net.sf.jdivelog.ci.OSTCInterface.transferSettings(Unknown Source)
at net.sf.jdivelog.gui.ostc.OSTCSettingsPanel.load(Unknown Source)
at net.sf.jdivelog.gui.ostc.OSTCSettingsPanel.access$000(Unknown Source)
... 37 more


[hr]

In JDiveLog, Settings > Diagnostics, I have:

[hr]

Comm-Environment
================

Comm API: false
RXTX-2.1: true

Comm Init Log:
INFO: Initializing JavaCommAPI Comm Ports
WARNING: javax.comm-Classes not found! JavaCommAPI support disabled!
INFO: Initializing RXTX-2.1 Comm Ports
INFO: RXTX Port found: /dev/tty.usbserial-A4SHCQSJ
INFO: RXTX Port found: /dev/cu.usbserial-A4SHCQSJ
INFO: RXTX Port found: /dev/tty.Bluetooth-PDA-Sync
INFO: RXTX Port found: /dev/cu.Bluetooth-PDA-Sync
INFO: RXTX Port found: /dev/tty.Bluetooth-Modem
INFO: RXTX Port found: /dev/cu.Bluetooth-Modem
INFO: CommUtil initialization finished.

Comm Libs:
Possible RXTX Lib found: /Applications/JDiveLog.app/Contents/Resources/Java/jni/librxtxSerial.jnilib (234008 bytes, read:true)
Possible RXTX Lib found: /Applications/JDiveLog.app/Contents/Resources/Java/jni/librxtxSerial_OLD.jnilib (326296 bytes, read:true)

Comm Jars in java.ext.dirs:
java.ext.dirs does not exist: /Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext

Path Information
================
working dir: /Applications
home dir: /Users/utilisateur
skinpath: /Applications/JDiveLog.app/Contents/Resources/Java/skins
skindir: /Applications/JDiveLog.app/Contents/Resources/Java/skins
skindir readable: true
skindir is directory: true
[bluebubbles.zip, simple_dark_blue.zip, simple_white_blue.zip]

JVM Information
===============
java.version: 1.6.0_24
java.vendor: Apple Inc.
java.vendor.url: http://www.apple.com/
java.home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
java.vm.specification.version: 1.0
java.vm.specification.vendor: Sun Microsystems Inc.
java.vm.specification.name: Java Virtual Machine Specification
java.vm.version: 19.1-b02-334
java.vm.vendor: Apple Inc.
java.vm.name: Java HotSpot(TM) Client VM
java.specification.version: 1.6
java.specification.vendor: Sun Microsystems Inc.
java.specification.name: Java Platform API Specification
java.class.version: 50.0
java.class.path: /Applications/JDiveLog.app/Contents/Resources/Java/RXTXcomm.jar:/Applications/JDiveLog.app/Contents/Resources/Java/jdivelog.jar:/Applications/JDiveLog.app/Contents/Resources/Java/commons-digester.jar:/Applications/JDiveLog.app/Contents/Resources/Java/commons-collections.jar:/Applications/JDiveLog.app/Contents/Resources/Java/commons-logging-api.jar:/Applications/JDiveLog.app/Contents/Resources/Java/commons-beanutils.jar:/Applications/JDiveLog.app/Contents/Resources/Java/fop.jar:/Applications/JDiveLog.app/Contents/Resources/Java/commons-io.jar:/Applications/JDiveLog.app/Contents/Resources/Java/colorchooser.jar:/Applications/JDiveLog.app/Contents/Resources/Java/jcommon-1.0.16.jar:/Applications/JDiveLog.app/Contents/Resources/Java/jfreechart-1.0.13.jar:/Applications/JDiveLog.app/Contents/Resources/Java/avalon-framework-4.2.0.jar:/Applications/JDiveLog.app/Contents/Resources/Java/batik-all-1.7.jar:/Applications/JDiveLog.app/Contents/Resources/Java/xml-apis-1.3.04.jar:/Applications/JDiveLog.app/Contents/Resources/Java/xml-apis-ext-1.3.04.jar:/Applications/JDiveLog.app/Contents/Resources/Java/xmlgraphics-commons-1.3.1.jar
java.library.path: /Applications/JDiveLog.app/Contents/Resources/Java/jni:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources
java.io.tmpdir: /var/folders/R1/R1naC8ADGGC-HNqBEb6Zwk+++TM/-Tmp-/
java.compiler: null
java.ext.dirs: /Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext

OS Information
==============
os.name: Mac OS X
os.arch: i386
os.version: 10.6.7
file.separator: /
path.separator: :
user.name: utilisateur


[hr]

So looks like I have a Java class issue:
WARNING: javax.comm-Classes not found! JavaCommAPI support disabled!

This is where I am stucked now :(

Thanks for your help,
Kris

Re: Connect Mk2 to my Mac

Posted: 13 Jun 2011, 12:33
by hexxon
Seems that the problem is relate to Java… You should try 2 things, first, open the java preferences, disable the 64bits support and restart… I ve seen also a post related and asking for a downgrade to java 1.5…

Re: Connect Mk2 to my Mac

Posted: 13 Jun 2011, 21:55
by Decouverte
I tried to disable the 64bits support, but both 64 and 32bits moves to disable, I was not able to uncheck only the 64bits support :(

But honestly, I understand that I have to put my hands into some work, but why is it that hard? I just use a normal MacBook Pro with a normal JDiveLog and a brand new OSTC Mk2. So what happens? I never had any trouble with any other configuration since I switched to Mac, 2 years ago... Pfffffffff :(

Re: Connect Mk2 to my Mac

Posted: 15 Jun 2011, 20:44
by hexxon
;) open source stuff… Thats why i dropped linux things…

The messy part is to get the emulation of the port com to work properly… As i dont have my 2n yet (yarrghh) i cant be able to help much more…

Re: Connect Mk2 to my Mac

Posted: 15 Jun 2011, 22:46
by nakatomi
Hm, according to your diag output, the OSTC is detected by jdivelog:

"INFO: RXTX Port found: /dev/tty.usbserial-A4SHCQSJ"
"INFO: RXTX Port found: /dev/cu.usbserial-A4SHCQSJ"

Did you make sure the OSTC was turned on (on the main screen) before downloading dives? You need to wake it up, otherwise you will get comm errors in jdivelog.

So if there is a problem, I don´t think it´s a Java problem, as I get this Java error as well and Jdivelog is working just fine here.
The RXTX drivers that I´m using are those that are offered for download on the jdivelog.org website.

I also installed the FTDI drivers directly from the manufacturer (http://www.ftdichip.com/Drivers/VCP.htm) since I mainly use MacDive to download the dives, not Jdivelog.


Here´s the diag log on my core2 duo Macbook running Snow Leopard:


Comm-Environment
================

Comm API: false
RXTX-2.1: true

Comm Init Log:
INFO: Initializing JavaCommAPI Comm Ports
WARNING: javax.comm-Classes not found! JavaCommAPI support disabled!
INFO: Initializing RXTX-2.1 Comm Ports
INFO: RXTX Port found: /dev/tty.usbserial-A4SHCQSJ
INFO: RXTX Port found: /dev/cu.usbserial-A4SHCQSJ
INFO: RXTX Port found: /dev/tty.Bluetooth-PDA-Sync
INFO: RXTX Port found: /dev/cu.Bluetooth-PDA-Sync
INFO: RXTX Port found: /dev/tty.Bluetooth-Modem
INFO: RXTX Port found: /dev/cu.Bluetooth-Modem
INFO: CommUtil initialization finished.

Comm Libs:
Possible RXTX Lib found: /Applications/JDiveLog.app/Contents/Resources/Java/jni/librxtxSerial.jnilib (326296 bytes, read:true)

Comm Jars in java.ext.dirs:
java.ext.dirs does not exist: /Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext


Path Information
================
working dir: /Applications
home dir: /Users/nakatomi
skinpath: /Applications/JDiveLog.app/Contents/Resources/Java/skins
skindir: /Applications/JDiveLog.app/Contents/Resources/Java/skins
skindir readable: true
skindir is directory: true
[bluebubbles.zip, simple_dark_blue.zip, simple_white_blue.zip]


JVM Information
===============
java.version: 1.6.0_24
java.vendor: Apple Inc.
java.vendor.url: http://www.apple.com/
java.home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
java.vm.specification.version: 1.0
java.vm.specification.vendor: Sun Microsystems Inc.
java.vm.specification.name: Java Virtual Machine Specification
java.vm.version: 19.1-b02-334
java.vm.vendor: Apple Inc.
java.vm.name: Java HotSpot(TM) Client VM
java.specification.version: 1.6
java.specification.vendor: Sun Microsystems Inc.
java.specification.name: Java Platform API Specification
java.class.version: 50.0
java.class.path: /Applications/JDiveLog.app/Contents/Resources/Java/RXTXcomm.jar:/Applications/JDiveLog.app/Contents/Resources/Java/jdivelog.jar:/Applications/JDiveLog.app/Contents/Resources/Java/commons-digester.jar:/Applications/JDiveLog.app/Contents/Resources/Java/commons-collections.jar:/Applications/JDiveLog.app/Contents/Resources/Java/commons-logging-api.jar:/Applications/JDiveLog.app/Contents/Resources/Java/commons-beanutils.jar:/Applications/JDiveLog.app/Contents/Resources/Java/fop.jar:/Applications/JDiveLog.app/Contents/Resources/Java/commons-io.jar:/Applications/JDiveLog.app/Contents/Resources/Java/colorchooser.jar:/Applications/JDiveLog.app/Contents/Resources/Java/jcommon-1.0.16.jar:/Applications/JDiveLog.app/Contents/Resources/Java/jfreechart-1.0.13.jar:/Applications/JDiveLog.app/Contents/Resources/Java/avalon-framework-4.2.0.jar:/Applications/JDiveLog.app/Contents/Resources/Java/batik-all-1.7.jar:/Applications/JDiveLog.app/Contents/Resources/Java/xml-apis-1.3.04.jar:/Applications/JDiveLog.app/Contents/Resources/Java/xml-apis-ext-1.3.04.jar:/Applications/JDiveLog.app/Contents/Resources/Java/xmlgraphics-commons-1.3.1.jar
java.library.path: /Applications/JDiveLog.app/Contents/Resources/Java/jni:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources
java.io.tmpdir: /var/folders/AG/AG8xHa5NFtqhcaojnfg-bk+++TI/-Tmp-/
java.compiler: null
java.ext.dirs: /Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext


OS Information
==============
os.name: Mac OS X
os.arch: i386
os.version: 10.6.7
file.separator: /
path.separator: :
user.name: nakatomi

Re: Connect Mk2 to my Mac

Posted: 16 Jun 2011, 01:13
by wrobell
hexxon Wrote:
-------------------------------------------------------
> ;) open source stuff… Thats why i dropped linux
> things…

well, actually on linux there is no problem with drivers
for ostc at all as the are built in into the kernel :)

Re: Connect Mk2 to my Mac

Posted: 16 Jun 2011, 09:35
by hexxon
Well I was not meaning that there was problems with the OSTC on linux, i meant that I got bored to open the term on Linux and that why i dropped it for a Mac. *but* the things that comes from the open source world on mac usually asks for a lot of dirty work ;-) But i'm not reluctant to it, if it was true i would not be here :-)

Re: Connect Mk2 to my Mac

Posted: 16 Jun 2011, 09:49
by Jean-François
nakatomi Wrote:

> Did you make sure the OSTC was turned on (on the
> main screen) before downloading dives? You need to
> wake it up, otherwise you will get comm errors in
> jdivelog.

This made my day.

I just received my OSTC 2N and spent the whole morning yesterday to try to make it work with my MAC. I had the same problem as Decouverte had and I gave up pretty angry. I tried to do what you said above and it worked.... it was so simple I didn't even think of it :)

Re: Connect Mk2 to my Mac

Posted: 16 Jun 2011, 09:54
by Jean-François
By the way, this makes me think that in the topic about how to update/connect your OSTC to your MAC, you should add a line that says that the OSTC has to be turned on before trying to update, download.

This may seems obvious for some but maybe not for others (me in particular :) )

Re: Connect Mk2 to my Mac

Posted: 16 Jun 2011, 15:43
by wrobell
hexxon Wrote:
-------------------------------------------------------
> Well I was not meaning that there was problems
> with the OSTC on linux, i meant that I got bored
> to open the term on Linux and that why i dropped
> it for a Mac. *but* the things that comes from the
> open source world on mac usually asks for a lot of
> dirty work ;-) But i'm not reluctant to it, if it
> was true i would not be here :-)

fair enough. but, please correct me if i am wrong,
in case of jdivelog experience the problem is the
proprietary license of javacomm, which prohibits
its distribution by 3rd party, so you should
complain to Sun/Oracle about the "dirty work"
part. ;)

Re: Connect Mk2 to my Mac

Posted: 17 Jun 2011, 20:51
by Decouverte
Back from Ireland :)

[quote=nakatomi]
Did you make sure the OSTC was turned on (on the main screen) before downloading dives? You need to wake it up, otherwise you will get comm errors in jdivelog.
[/quote]

Nakatomi, Jean-François,
What do you mean by turned it on, on the main screen? Is it the screen with the serial n° and the FW revision? If yes, I already tried this a few times and it didn't work :(

I still have the error message: Could not load data - Com port already in use... and still have the progress bar which is running continuously.

Any idea how I can ensure nothing - or what - is using the com ports?

Thanks,
Kris

Re: Connect Mk2 to my Mac

Posted: 17 Jun 2011, 23:45
by hexxon
I'm not complaining here, just trying to help and I will not correct you because you're right ;-)

Re: Connect Mk2 to my Mac

Posted: 18 Jun 2011, 19:39
by Jean-François
Decouverte Wrote:
-------------------------------------------------------
> Nakatomi, Jean-François,
> What do you mean by turned it on, on the main
> screen? Is it the screen with the serial n° and
> the FW revision?
Yes and it worked for me.

I'm no computer aficionados so I'm afraid I cannot help you any further then. Sorry :(

Re: Connect Mk2 to my Mac

Posted: 19 Jun 2011, 19:50
by Decouverte
OMG! Honestly I don't know what to do to make it work :(:(:(

Is there any Mac "guru" around, it would be helpful...

Matthias, maybe someone from your team, or yourself?

I still have:

[quote=Decouverte]
I still have the error message: Could not load data - Com port already in use... and still have the progress bar which is running continuously.

Any idea how I can ensure nothing - or what - is using the com ports?
[/quote]

I'm kind of desperate :(

Many thanks!!!

Re: Connect Mk2 to my Mac

Posted: 19 Jun 2011, 20:13
by heinrichsweikamp
Decouverte Wrote:
> Matthias, maybe someone from your team, or
> yourself?

We don't use/have MACs here but when I went for one to test it by myself (After a few threads describing issues with the OSTC driver) it worked right away. As with Windows, MAC OS is a complex machine and the solution to troubles isn't always straight forward ("Click here, type in this and it's done").

Your log indicates issues with RXTX library which may be related to missing rights. When java wants to communicate out of it's sandbox it needs some rights to do so.

It's a 2 1/2 years old tutorial, but it should work with your 10.6.7 similar:
http://www.tecdivers.co.uk/index.php?sh ... e=threaded

> I'm kind of desperate :(

Try Mac-dive http://mac-dive.com/ to check if the hardware is working as it should be.

regards,
Matthias

Re: Connect Mk2 to my Mac

Posted: 19 Jun 2011, 21:07
by Decouverte
I have 2 files in my /Library/Java/Extensions folder:

1) librxtxSerial.jnilib - 237.5kb
2) RXTXcomm.jar - 114.6kb

Anyone would be able to provide me both files they use in a working configuration under 10.6.7 (my email is "decouverte(at)yahoo(dot)com")?
Is there any other files I need for the RXTX?

Thanks Matthias for the link, but I already knew it and followed their advice - without success :(

I tried Mac-Dive but I have still an issue with my com ports - see attached picture Capture Mac-Dive Settings

Thanks,
Kristian

Re: Connect Mk2 to my Mac

Posted: 20 Jun 2011, 00:10
by edhowarth
Can I suggest you join Yorkshire Divers Forum www.yorkshire-divers.com/forums/forum.php where there is a wealth of knowledge. Chances are that someone has come across this problem before, either with the OSTC or another peripheral.

Re: Connect Mk2 to my Mac

Posted: 20 Jun 2011, 21:08
by Decouverte
I installed and tried Mac Dive and it worked directly. I was able to download the dives :)
Unfortunately, it is not possible to update the OSTC FW with this SW :(

So, this means that the com port is working, so why JDiveLog always send an error message Could not load data - Com port already in use... ???

So frustrating....

Re: Connect Mk2 to my Mac

Posted: 21 Jun 2011, 21:20
by Decouverte
Sorry to bother again with the same topic, but I'm still not able to make it working :(:(:(

No one had the same JDiveLog error message once?

Could not load data - Com port already in use

Thanks for helping,
Kristian

Re: Connect Mk2 to my Mac

Posted: 21 Jun 2011, 22:17
by Anonymous User
Hi,

I'm no MAC guru, as well. But don't blame it on jdivelog - I'm sure the problem is either deeper in the system or sits in front of it ;) I use different versions of jdivelog for many years now on my Macbook4 with OS 10.5.
Installation went smoothly, can't remember issues until today. The "Protocol" settings for the OSTC must not be in "Auto" - that doesn't work. I choose "1.80-x".

jostein

Re: Connect Mk2 to my Mac

Posted: 21 Jun 2011, 22:47
by Decouverte
[quote=jostein]
The "Protocol" settings for the OSTC must not be in "Auto" - that doesn't work. I choose "1.80-x"
[/quote]

Thanks jostein,
That's the setting I tried - along the others...

I think you are right, the solution should sit in front of me but can't see it :(