3
\$\begingroup\$

I've recently begun using the InterSense Navchip for some experiments related to INS(Inertial navigation systems). Would anyone know how to make this work with Linux? They provide a sample tool for linux as part of the SDK available here. However, when I try to use it, it simply fails:

[root@ankur Sample]# ./ismain
InterSense Library ver. 4.237 64-bit
Copyright 1998-2012 InterSense, LLC
http://www.intersense.com
Tel: 781-541-6330

Tue Jul 31 12:40:46 2012
Looking for InterSense tracking device number 1.
Please wait
Looking for UDP Broadcasts
  Checking UDP port 5001... NOT FOUND
  Checking UDP port 5002... NOT FOUND
  Checking UDP port 5003... NOT FOUND
  Checking UDP port 5004... NOT FOUND
  Checking UDP port 5005... NOT FOUND

InterSense tracker not present
Did not detect any InterSense tracking devices -- please verify COM ports have been created and are not in use
[root@ankur Sample]#

My Fedora 17 system detects the HW and assigns it ttyUSB0:

[87011.097726] usb 2-1.5: new full-speed USB device number 5 using ehci_hcd
[87011.184621] usb 2-1.5: New USB device found, idVendor=10c4, idProduct=ea60
[87011.184626] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[87011.184630] usb 2-1.5: Product: CP2102 USB to UART Bridge Controller
[87011.184633] usb 2-1.5: Manufacturer: Silicon Labs
[87011.184635] usb 2-1.5: SerialNumber: 0001
[87011.319174] usbcore: registered new interface driver cp210x
[87011.319193] USB Serial support registered for cp210x
[87011.319228] cp210x 2-1.5:1.0: cp210x converter detected
[87011.391845] usb 2-1.5: reset full-speed USB device number 5 using ehci_hcd
[87011.478744] usb 2-1.5: cp210x converter now attached to ttyUSB0

I've noticed that it looks for ttyS0,1,2,.. instead of ttyUSB0, so I tried symlinking ttyUSB0 to ttyS4. It opened it, and then went on.

[00000.922] InterSense Library ver. 4.237 64-bit
[00000.922] Copyright 1998-2012 InterSense, LLC
[00000.922] http://www.intersense.com
[00000.922] Tel: 781-541-6330
[00000.923]
[00000.923] Tue Jul 31 12:07:33 2012
[00000.923]
[00000.923] Looking for InterSense tracking device number 1. Please wait 
[00000.923] Looking for IS-X00 device on port 1 (0.92)
[00000.923] Opened /dev/ttyS0
[00000.923] Error Configuring Port 1
[00000.923] Failed to set speed for port /dev/ttyS0
[00000.923] Error writing to port 1: Input/output error
[00000.923] Error writing to port 1: Input/output error
[00000.923] Error writing to port 1: Input/output error
[00000.963] Error writing to port 1: Input/output error
[00001.003] Error writing to port 1: Input/output error
[00001.043] Looking for IS-X00 device on port 2 (1.04)
[00001.043] Opened /dev/ttyS1
[00001.043] Error Configuring Port 2
[00001.043] Failed to set speed for port /dev/ttyS1
[00001.043] Error writing to port 2: Input/output error
[00001.043] Error writing to port 2: Input/output error
[00001.043] Error writing to port 2: Input/output error
[00001.083] Error writing to port 2: Input/output error
[00001.123] Error writing to port 2: Input/output error
[00001.164] Looking for IS-X00 device on port 3 (1.16)
[00001.164] Opened /dev/ttyS2
[00001.164] Error Configuring Port 3
[00001.164] Failed to set speed for port /dev/ttyS2
[00001.164] Error writing to port 3: Input/output error
[00001.164] Error writing to port 3: Input/output error
[00001.164] Error writing to port 3: Input/output error
[00001.204] Error writing to port 3: Input/output error
[00001.244] Error writing to port 3: Input/output error
[00001.284] Looking for IS-X00 device on port 4 (1.28)
[00001.284] Opened /dev/ttyS3
[00001.284] Error Configuring Port 4
[00001.284] Failed to set speed for port /dev/ttyS3
[00001.284] Error writing to port 4: Input/output error
[00001.284] Error writing to port 4: Input/output error
[00001.284] Error writing to port 4: Input/output error
[00001.324] Error writing to port 4: Input/output error
[00001.364] Error writing to port 4: Input/output error
[00001.404] Looking for IS-X00 device on port 5 (1.40)
[00001.404] Failed to open /dev/ttyS4
[00001.404] Looking for IS-X00 device on port 6 (1.40)
[00001.406] Opened /dev/ttyS5
[00001.528] Looking for IS-X00 device on port 7 (1.53)
[00001.528] Failed to open /dev/ttyS6
[00001.528] Looking for IS-X00 device on port 8 (1.53)
[00001.528] Failed to open /dev/ttyS7
[00001.528] Looking for IS-X00 device on port 9 (1.53)
[00001.528] Failed to open /dev/ttyS8
[00001.528] Looking for IS-X00 device on port 10 (1.53)
[00001.528] Failed to open /dev/ttyS9
[00001.528] Looking for IS-X00 device on port 11 (1.53)
[00001.528] Failed to open /dev/ttyS10
[00001.528] Looking for IS-X00 device on port 12 (1.53)
[00001.528] Failed to open /dev/ttyS11
[00001.528] Looking for IS-X00 device on port 13 (1.53)
[00001.528] Failed to open /dev/ttyS12
[00001.528] Looking for IS-X00 device on port 14 (1.53)
[00001.528] Failed to open /dev/ttyS13
[00001.528] Looking for IS-X00 device on port 15 (1.53)
[00001.528] Failed to open /dev/ttyS14
[00001.529] Looking for IS-X00 device on port 16 (1.53)
[00001.529] Failed to open /dev/ttyS15
[00001.529] Looking for IS-X00 device on port 17 (1.53)
[00001.529] Failed to open /dev/ttyS16
[00001.529] Looking for IS-X00 device on port 18 (1.53)
[00001.529] Failed to open /dev/ttyS17
[00001.529] Looking for IS-X00 device on port 19 (1.53)
[00001.529] Failed to open /dev/ttyS18
[00001.529] Looking for IS-X00 device on port 20 (1.53)
[00001.529] Failed to open /dev/ttyS19
[00001.529] Looking for IS-X00 device on port 21 (1.53)
[00001.529] Failed to open /dev/ttyS20
[00001.529] Looking for IS-X00 device on port 22 (1.53)
[00001.529] Failed to open /dev/ttyS21
[00001.529] Looking for IS-X00 device on port 23 (1.53)
[00001.529] Failed to open /dev/ttyS22
[00001.529] Looking for IS-X00 device on port 24 (1.53)
[00001.529] Failed to open /dev/ttyS23
[00001.529] Looking for IS-X00 device on port 25 (1.53)
[00001.529] Failed to open /dev/ttyS24
[00001.529] Looking for IS-X00 device on port 26 (1.53)
[00001.530] Failed to open /dev/ttyS25
[00001.530] Looking for IS-X00 device on port 27 (1.53)
[00001.530] Failed to open /dev/ttyS26
[00001.530] Looking for IS-X00 device on port 28 (1.53)
[00001.530] Failed to open /dev/ttyS27
[00001.530] Looking for IS-X00 device on port 29 (1.53)
[00001.530] Failed to open /dev/ttyS28
[00001.530] Looking for IS-X00 device on port 30 (1.53)
[00001.530] Failed to open /dev/ttyS29
[00001.530] Looking for IS-X00 device on port 31 (1.53)
[00001.530] Failed to open /dev/ttyS30
[00001.530] Looking for IS-X00 device on port 32 (1.53)
[00001.530] Failed to open /dev/ttyS31
[00001.530]
[00001.530] Looking for SDP devices (1.53)
[00001.611] DEVWRN: Device config file not found: isradio.ini
[00001.612] Opened /dev/ttyS0
[00001.612] Error Configuring Port 1
[00001.612] Failed to set speed for port /dev/ttyS0
[00001.612] Error Getting RTS State on Port 1
[00001.612]
[00001.612] Error asserting trigger for COM1 (Error Getting RTS State on Port 1)
[00001.612] Error Getting DTR State on Port 1
[00001.612]
[00001.612] Error setting DTR for COM1 (Error Getting DTR State on Port 1)
[00001.612] Opened /dev/ttyS1
[00001.612] Error Configuring Port 2
[00001.612] Failed to set speed for port /dev/ttyS1
[00001.612] Error Getting RTS State on Port 2
[00001.612]
[00001.612] Error asserting trigger for COM2 (Error Getting RTS State on Port 2)
[00001.612] Error Getting DTR State on Port 2
[00001.612]
[00001.612] Error setting DTR for COM2 (Error Getting DTR State on Port 2)
[00001.612] Opened /dev/ttyS2
[00001.612] Error Configuring Port 3
[00001.612] Failed to set speed for port /dev/ttyS2
[00001.612] Error Getting RTS State on Port 3
[00001.612]
[00001.612] Error asserting trigger for COM3 (Error Getting RTS State on Port 3)
[00001.612] Error Getting DTR State on Port 3
[00001.612]
[00001.612] Error setting DTR for COM3 (Error Getting DTR State on Port 3)
[00001.612] Opened /dev/ttyS3
[00001.612] Error Configuring Port 4
[00001.613] Failed to set speed for port /dev/ttyS3
[00001.613] Error Getting RTS State on Port 4
[00001.613]
[00001.613] Error asserting trigger for COM4 (Error Getting RTS State on Port 4)
[00001.613] Error Getting DTR State on Port 4
[00001.613]
[00001.613] Error setting DTR for COM4 (Error Getting DTR State on Port 4)
[00001.613] Failed to open /dev/ttyS4
[00001.614] Opened /dev/ttyS5
[00002.038] Failed to open /dev/ttyS6
[00002.038] Failed to open /dev/ttyS7
[00002.038] Failed to open /dev/ttyS8
[00002.038] Failed to open /dev/ttyS9
[00002.038] Failed to open /dev/ttyS10
[00002.038] Failed to open /dev/ttyS11
[00002.038] Failed to open /dev/ttyS12
[00002.038] Failed to open /dev/ttyS13
[00002.039] Failed to open /dev/ttyS14
[00002.039] Failed to open /dev/ttyS15
[00002.039] Failed to open /dev/ttyS16
[00002.039] Failed to open /dev/ttyS17
[00002.039] Failed to open /dev/ttyS18
[00002.039] Failed to open /dev/ttyS19
[00002.039] Failed to open /dev/ttyS20
[00002.039] Failed to open /dev/ttyS21
[00002.039] Failed to open /dev/ttyS22
[00002.039] Failed to open /dev/ttyS23
[00002.039] Failed to open /dev/ttyS24
[00002.039] Failed to open /dev/ttyS25
[00002.039] Failed to open /dev/ttyS26
[00002.039] Failed to open /dev/ttyS27
[00002.039] Failed to open /dev/ttyS28
[00002.039] Failed to open /dev/ttyS29
[00002.039] Failed to open /dev/ttyS30
[00002.039] Failed to open /dev/ttyS31
[00002.039] DEVWRN: SDP initialization failed
[00002.040] DEVMSG: Failed to set device configuration
[00002.040] ERROR: Interface initialization failed
[00002.040]
[00002.040] No SDP Deviced found (2.04)
[00002.040]
[00002.040] Looking for UDP Broadcasts
[00002.240]   Checking UDP port 5001... NOT FOUND
[00002.440]   Checking UDP port 5002... NOT FOUND
[00002.641]   Checking UDP port 5003... NOT FOUND
[00002.841]   Checking UDP port 5004... NOT FOUND
[00003.041]   Checking UDP port 5005... NOT FOUND
[00003.041]
[00003.041] InterSense tracker not present
[00003.041] Finished (3.04)

Any hints?

\$\endgroup\$
4
\$\begingroup\$

Check the permissions on the /dev/tty* devices. Linux distributions often require you to be a member of the "dialout" or "plugdev" groups to access serial devices:

[cshucks@desktop ~]$ ls -la /dev/tty[SU]*
crw-rw---- 1 root dialout   4, 64 Jul 19 12:25 /dev/ttyS0
crw-rw---- 1 root dialout   4, 65 Jul 19 12:25 /dev/ttyS1
crw-rw---- 1 root dialout   4, 66 Jul 19 12:25 /dev/ttyS2
crw-rw---- 1 root dialout   4, 67 Jul 19 12:25 /dev/ttyS3
crw-rw---- 1 root dialout 188,  1 Jul 31 14:58 /dev/ttyUSB1
[cshucks@desktop ~]$ groups
cshucks wheel wireshark plugdev vboxusers dialout
[cshucks@desktop ~]$

Otherwise try running strace ismain to see the actual operating system error code returned from the relevant open() or stat() call, this can be illuminating.

\$\endgroup\$
2
\$\begingroup\$

I ran around + experimented a little and managed to solve it. Here's what I did:

Connect the NavChip. It shows up as /dev/ttyUSB0 as I've written in my question. Then, as root, set the baud rate for the tty:

# stty -F /dev/ttyUSB0 921600 clocal

To access it as a non root user, change the permissions as @shuckc suggested:

# chmod 0777 /dev/ttyUSB0

After that, you can just directly communicate with it using it's designated package format. The navchip for instance has all it's data transmitted and received in hex, so something like would work:

$ cat /dev/ttyUSB0 > loggerfile.txt

$ echo -ne "\xAA\xAA\xAA" > /dev/ttyUSB0 #Whatever package you want to send to it

It has different packet formats in it's command set. (I can't share the info on the commands because it's all proprietary :/ )

I had originally tried both moserial and cutecom, but they didn't work somehow. The sensor didn't respond with moserial, and cutecom doesn't list ttyUSB0 at all.

I emailed Intersense tech support and luckily they sent me a sample C program specifically for the NavChip that one can use to interact with the sensor. (They also said that the generic tool kit doesn't function at all with the NavChip) On the whole, it's just a C program that sends and reads the commands in hex based on their command formats.

\$\endgroup\$
  • 1
    \$\begingroup\$ If you want the permission changes to survive reboot, create a udev rule to do so. \$\endgroup\$ – shuckc Aug 2 '12 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.