7

I'm trying to see the output of an accelerometer with Ubuntu (15.04), kernel 3.19. The UART driver is cp210x.ko, and the chip of the accelerometer is MPU6050w. So, when I plug the device, I have this:

$ lsusb
Bus 001 Device 024: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light

$ sudo dmesg -c
[45550.171578] usb 1-14.3: new full-speed USB device number 24 using xhci_hcd
[45550.277334] usb 1-14.3: New USB device found, idVendor=10c4, idProduct=ea60
[45550.277337] usb 1-14.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[45550.277338] usb 1-14.3: Product: CP2102 USB to UART Bridge Controller
[45550.277339] usb 1-14.3: Manufacturer: Silicon Labs
[45550.277340] usb 1-14.3: SerialNumber: 0001
[45550.278356] cp210x 1-14.3:1.0: cp210x converter detected
[45550.279845] usb 1-14.3: cp210x converter now attached to ttyUSB0

$ lsmod | grep cp210
cp210x                 24576  1 
usbserial              49152  3 cp210x

The problem is when I want to read the output of /dev/ttyUSB0, there's nothing. I have tried a lot of tools, cutecom, minicom, screen... And no signs but the LED of the card which flash when I turn the card.

Here are others infos I have:

$ sudo lsusb -D /dev/ttyUSB0
Cannot open /dev/ttyUSB0

$ ls -l /dev/ttyUSB0
crw-rw-rw- 1 root dialout 188, 0 mai    4 10:57 /dev/ttyUSB0

$ stty -a -F /dev/ttyUSB0
speed 115200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^H; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S;
susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 100; time = 2;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke

Could someone help me to solve this? I've seen this question but no solution for me.

Guillaume
  • 144
  • 2
  • 4
  • 17

3 Answers3

2

When working with ttyUSB, it is necessary to adjust the speed of the converter to the one with which the device is working behind the USB <-> UART converter. For example, to view information that comes from the device behind the converter, you can use a command of the form:

screen /dev/ttyUSB0 115200

where 115200 is the baudrate of the device behind the converter.

You can use the utility PuTTY and the like.

roaima
  • 107,089
  • 14
  • 139
  • 261
Alex
  • 21
  • 2
1

This accelerometer is in fact a "specialized" Arduino card, I didn't know !

So I just had to program it (with the Arduino software) and choose the example "DigitalReadSerial".

So now I have

$ tail -f /dev/ttyUSB0
���������������������������������������������������������������������������������������������������������������������������������������������������������������

More info here (if it can help someone)

Guillaume
  • 144
  • 2
  • 4
  • 17
-1

1) The syntax is tail -f < /dev/ttyUSB0

2) What code did you deploy on the arduino board? I have the same board and I used http://playground.arduino.cc/Main/MPU-6050

Federico
  • 109
  • 2