Connect Mk2 to my Mac

Legacy OSTC's
kobus
Posts: 14
Joined: Tuesday 2. November 2010, 11:57

Re: Connect Mk2 to my Mac

Post by kobus »

Here's what worked for me on an intel based Macbook Pro:

1. Downloaded and installed the latest jDivelog
2. Downloaded and installed the latest stable RXTX
3. Replaced linrxtxSerial.jnilib in /Library/Java/Extensions with 64bit version downloaded from this blogpost
4. added myself to the _uucp group like so --> sudo dscl . append /Groups/_uucp GroupMembership kobus (run this command in terminal)


Note:
I followed the instructions on the jdivelog site for macosx, which is how I installed rxtx. Only think I had to do differently was steps 3 because my mac is intel based 64bit and 4 because the command given on the jdivelog page is outdated.

Let me know if it doesn't make sense and I'll try to re-explain :-)
kobus
Posts: 14
Joined: Tuesday 2. November 2010, 11:57

Re: Connect Mk2 to my Mac

Post by kobus »

If all you're getting is "Port busy" type errors, try tunning jDovelog as root. If it works then you know it is because your user doesn't have the required group membership.

To run as root:
1. Open terminal
2. enter: sudo su - root
3. enter: /Applications/JDiveLog.app/Contents/MacOS/JavaApplicationStub

Now test and see if it works.

If it does work, exit back to your own account and check your group membership:
1. Close JDivelog
2. enter: exit
3. enter: id

Output will be something like:

kobus-mac:~ kobus$ id
uid=501(kobus) gid=20(staff) groups=20(staff),401(com.apple.access_screensharing),204(_developer),100(_lpoperator),98(_lpadmin),81(_appserveradm),80(admin),79(_appserverusr),66(_uucp),61(localaccounts),12(everyone),402(com.apple.sharepoint.group.1)

You're looking for the red part. If it is not there you will not be able to access usb ports as your own user.
Decouverte
Posts: 20
Joined: Sunday 12. June 2011, 16:56

Re: Connect Mk2 to my Mac

Post by Decouverte »

YEEEAAAAAAAAAAAAAAAAAAAAAHHHHHEEEEEEEHHHH :):):)

kobus, you saved my life! I had the correct linrxtxSerial.jnilib but I was not in the _uucp group ;)

So now, I have two more questions:
1) Is there a way to avoid changing the divecomputer setting each time I open JDiveLog?
2) In the JDiveLog OSTC settings, the first line is about the Serial Number. This number is 1858 while my computer is the 1865 (displayed on the main screen). I'm confused, should I change this manually to 1865?

Thanks all for your help on this and a special one to kobus.
I really appreciated all your efforts to solve my issue :)

Kristian
OSTC Mk2 1865 or 1858 ;)
Cheers,

Kris
OSTC MK2 1865
Decouverte
Posts: 20
Joined: Sunday 12. June 2011, 16:56

Re: Connect Mk2 to my Mac

Post by Decouverte »

Hi,

As I changed the HDD from my MBP to a SSD, I re-install everything (to start with a clean configuration).

Hence I needed to setup the OSTC communication again, and went again trough some hassle :(

So I wrote down all steps I did, hoping it will help me in the future. Here are all those steps:

1) Install JDiveLog (http://www.jdivelog.org/download/langswitch_lang/fr/).
2) You should have folder uucp in directory "/var/spool". If you don't have it, create it with the command "sudo mkdir /var/spool/uucp". Then setup permission (should be: drwxrwxr-x): "sudo chmod 775 /var/spool/uucp".
3) You should be a member of the uucp group. To do so, use the following commands
"sudo dscl . append /Groups/_uucp GroupMembership Kristian".
4) Check if ok with command: "id". You should have:
"uid=501(Kristian) gid=20(staff) groups=20(staff),402(com.apple.sharepoint.group.1),204(_developer),100(_lpoperator),98(_lpadmin),81(_appserveradm),80(admin),79(_appserverusr),66(_uucp),61(localaccounts),12(everyone),401(com.apple.access_screensharing)" with "...66(_uucp)..." meaning everything is ok.
5) Install "RXTX_Tiger.pkg" - located in "rxtx-2.1-7r2/MACOSX_IDE/ForPackageMaker".
6) Install "FTDIUSBSerialDriver_v2_2_16.dmg", choose "FTDIUSBSerialDriver_10_4_10_5_10_6".
7) Manually copy "librxtxSerial.jnilib" and "RXTXcomm.jar" into "Bibliothèque/Java/Extensions".
8) Manually copy "FTDIUSBSerialDriver.kext" into "Système/Bibliothèque/Extensions". Authorize with asked pwd.
9) Switch on the OSTC.
10) Directly open JDiveLog and change the dive computer setting to: a) OSTC, b) Port Com: /dev/tty.usbserial-A4SHCQSJ (RXTX-2.1), c) Protocole: OSTC Mk.2 1.90 - X.
11) DONE :)

Where "Kristian" is my account name and the file path are from my french OS (Bibliothèque is Library)...

Hope this may help someone else.
Cheers,

Kris
OSTC MK2 1865
kobus
Posts: 14
Joined: Tuesday 2. November 2010, 11:57

Re: Connect Mk2 to my Mac

Post by kobus »

Nice writeup. Maybe you should give it to the JDiveLog guys to update the install instructions that comes with the Readme file.

[quote=Decouverte]
> So now, I have two more questions:
> 1) Is there a way to avoid changing the
> divecomputer setting each time I open JDiveLog?
[/quote]

Once you have saved your imported logs etc to a "JDiveLog File" you won't have to keep changing the settings each time - JDiveLog should automatically open the file you saved each time you open it.
Post Reply