Hi folks,
It's my first experience with sensors etc.
I'm trying to use the InterSense NavChip[1] IMU (Inertial measurement unit) sensor with Fedora. Would anyone know how to go about this?
The sensor is detected as /dev/ttyUSB0
I've tried both moserial and cutecom. Cutecom doesn't show ttyUSB0 at all. Is there a way of "converting" ttyUSB0 to serial, i.e., ttyS*? (Is this an issue?)
This is what dmesg says on device connection and disconnection:
[100975.794455] usb 2-1.1: new full-speed USB device number 8 using ehci_hcd [100975.881230] usb 2-1.1: New USB device found, idVendor=10c4, idProduct=ea60 [100975.881236] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [100975.881241] usb 2-1.1: Product: CP2102 USB to UART Bridge Controller [100975.881244] usb 2-1.1: Manufacturer: Silicon Labs [100975.881247] usb 2-1.1: SerialNumber: 0001 [100975.882402] cp210x 2-1.1:1.0: cp210x converter detected [100975.945080] usb 2-1.1: reset full-speed USB device number 8 using ehci_hcd [100976.031277] usb 2-1.1: cp210x converter now attached to ttyUSB0 [102143.137564] usb 2-1.1: USB disconnect, device number 8 [102143.138220] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0 [102143.138251] cp210x 2-1.1:1.0: device disconnected
I've uploaded the reference documents to my fedora people space here[2] if any one wants to take a look.
The packet format for the sensor is also given in the docs above.
I've also asked a question on stackexchange which has more info (dmesg + attempts with the sample program that intersense have provided)[3]
(Please feel free to direct me to any documentation for dummies if that would improve my understanding of the subject)
[1]http://www.intersense.com/pages/16/16/
[2]http://ankursinha.fedorapeople.org/navchip/
[3]http://electronics.stackexchange.com/questions/36874/would-anyone-know-how-t...
On Tue, 2012-07-31 at 15:39 +1000, Ankur Sinha wrote:
I've uploaded the reference documents to my fedora people space here[2] if any one wants to take a look.
I've taken these down. The website says "intersense properitory", and the docs aren't downloadable anywhere, so I'm probably not supposed to share them.. :/
Hi Ankur:
--- On Tue, Jul 31, 2012 at 11:09 AM, Ankur Sinha sanjay.ankur@gmail.com wrote: | The sensor is detected as /dev/ttyUSB0 | | I've tried both moserial and cutecom. --
Have you tried minicom?
--- | all. Is there a way of "converting" ttyUSB0 to serial, i.e., ttyS*? (Is | this an issue?) --
It is serial data transfer over USB.
--- | [100976.031277] usb 2-1.1: cp210x converter now attached to ttyUSB0 --
It gets connected as ttyUSB0.
--- | [102143.137564] usb 2-1.1: USB disconnect, device number 8 | [102143.138220] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0 | [102143.138251] cp210x 2-1.1:1.0: device disconnected --
But, gets disconnected here. Do you still see /dev/ttyUSB0 in /dev after this?
Check your hardware manual to make sure you have the right hardware setup to use serial communication.
SK
Hi Shakti,
Thank you for your response.
On Tue, 2012-07-31 at 12:04 +0530, Shakthi Kannan wrote:
Hi Ankur:
--- On Tue, Jul 31, 2012 at 11:09 AM, Ankur Sinha sanjay.ankur@gmail.com wrote: | The sensor is detected as /dev/ttyUSB0 | | I've tried both moserial and cutecom. --
Have you tried minicom?
I just did. I'm still reading up from the web on how to use it properly though. moserial is a little easier for dummies :) (minicom mentions stuff like "modem", and I'm not too sure about the relation between that and the sensor at the moment.)
| all. Is there a way of "converting" ttyUSB0 to serial, i.e., ttyS*? (Is | this an issue?) --
It is serial data transfer over USB.
Okay.
| [100976.031277] usb 2-1.1: cp210x converter now attached to ttyUSB0 --
It gets connected as ttyUSB0.
Aye.
| [102143.137564] usb 2-1.1: USB disconnect, device number 8 | [102143.138220] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0 | [102143.138251] cp210x 2-1.1:1.0: device disconnected --
But, gets disconnected here. Do you still see /dev/ttyUSB0 in /dev after this?
That snippet was when I connected and then I disconnected too. When I connect, it only says (which seems okay):
[108566.390712] usb 2-1.1: new full-speed USB device number 12 using ehci_hcd [108566.477577] usb 2-1.1: New USB device found, idVendor=10c4, idProduct=ea60 [108566.477582] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [108566.477586] usb 2-1.1: Product: CP2102 USB to UART Bridge Controller [108566.477589] usb 2-1.1: Manufacturer: Silicon Labs [108566.477591] usb 2-1.1: SerialNumber: 0001 [108566.479479] cp210x 2-1.1:1.0: cp210x converter detected [108566.553438] usb 2-1.1: reset full-speed USB device number 12 using ehci_hcd [108566.639599] usb 2-1.1: cp210x converter now attached to ttyUSB0 [root@ankur ~]#
Check your hardware manual to make sure you have the right hardware setup to use serial communication.
What should I be looking for please?
They've provided a tool for windows which "works".
Would you have a suggestion on how I could send hex data to the sensor? For instance, "a5005b" is supposed to be the PING command. I've been trying to send this from moserial (selecting hex from the menu), but I don't get a response somehow. The windows tool sends the same and receives a "00" response when I click on "read response" in the UI
Some more info from the windows tool:
baud rate: 921600 comm port: 4 data rate: 100hz
The entire communication appears to be in hex.(Even the responses that the sensor sends are in hex.)
On Tue, 2012-07-31 at 17:32 +1000, Ankur Sinha wrote:
Hi Shakti,
I think I managed to get it to work (completely by random experimentation):
[root@ankur ~]# stty -F /dev/ttyUSB0 921600 clocal [root@ankur ~]# chmod 0777 /dev/ttyUSB0 [ankur@ankur Navchip]$ echo -ne "\xA5\x00\x5b" > /dev/ttyUSB0 #PING
[ankur@ankur Navchip]$ echo -ne "\xA5\x05\x56" > /dev/ttyUSB0 # start streaming
I had cat /dev/ttyUSB0 > log.txt in another terminal, and the file is full of data :D
I still need to understand what I exactly did, and why it worked etc., but I'm sure the web will have this info.
Hi Ankur,
On Tue, Jul 31, 2012 at 1:20 PM, Ankur Sinha sanjay.ankur@gmail.com wrote:
I think I managed to get it to work (completely by random experimentation):
[root@ankur ~]# stty -F /dev/ttyUSB0 921600 clocal [root@ankur ~]# chmod 0777 /dev/ttyUSB0 [ankur@ankur Navchip]$ echo -ne "\xA5\x00\x5b" > /dev/ttyUSB0 #PING
[ankur@ankur Navchip]$ echo -ne "\xA5\x05\x56" > /dev/ttyUSB0 # start
streaming
I had cat /dev/ttyUSB0 > log.txt in another terminal, and the file is full of data :D
I still need to understand what I exactly did, and why it worked etc., but I'm sure the web will have this info.
Every evaluation or development kit should have a Getting Started Guide.
As per my understanding you should do following :
1) Setup minicom with proper setting for BPS and where the USB to Serial converter gets attached on host. 2) After you save the settings and exit minicom should read the data from the sensor kit and display it on the terminal.
Why ? I think the sensor will capture/produce the data and will through it to the serial port. MEMS should act as input device here.
Usually MEMS should be connected to at least 4 LED's to act as 4 direction and when the sensor is moved it should light up the LED in that direction. This might be the best way to test it.
electronic-lab@lists.fedoraproject.org