Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.
Welcome to JeVois Tech Zone, where you can ask questions and receive answers from other members of the community.

Serial over USB not working with raspberry pi zero

0 votes
This is really a Raspberry Pi Zero question more than a Jevois question, but I thought I'd ask it here since someone may have come across it already.

I have a python script that sends serial commands to the Jevois cam and gets video and serial responses via the USB connection. It works fine on windows, Ubuntu and on a Raspberry Pi 3B+.

It doesn't work on a Raspberry Pi Zero. It either hangs or crashes when the script writes to the serial port port depending on which device I use.

Any ideas?

One possible clue is that dmesg seems to show the Jevois being treated as an SD card.
asked Feb 27, 2019 in User questions by PeterQuinn (1,020 points)

1 Answer

0 votes
Maybe you need an OTG cable? By default I guess the Pi Zero is a "device" (i.e., you would connect its microUSB to a regular USB port on a host computer). But you want it to operate as "host" here (and JeVois is your "device"), so the OTG cable might be what you need. See, eg,

https://raspberrypi.stackexchange.com/questions/84577/raspberry-pi-zero-w-connect-micro-usb-to-ftdi-to-arduino-board

just a thought but I don't have that hardware right now to test.

The OTG cable should go from microUSB that you plug into your PI Zero to a regular USB (type A) female. Then you would use a Y cable, connect one of the type A male to a power source, the other to your OTG female, and the mini-USB end to JeVois.

Like this: https://www.showmecables.com/micro-usb-2-b-male-to-a-female-6-in?gclid=CjwKCAiAqt7jBRAcEiwAof2uK-SYAzxasWY5hbg_EiiMZRcIuVxs8qRekFJfuDVqAiKWPb8oK2B4vxoChzMQAvD_BwE
answered Feb 28, 2019 by JeVois (46,580 points)
Yeah, I have one of the OTG cables and was using it connect the Zero to the Jevois using the split USB power/signal cable that you guys supplied.

Your discussion of cables sparked an idea though. I have one of your USB to serial cables. As a first step, I can connect the Zero's USB port to the Jevois' serial port via the OSB and see if I can get them to communicate that way. If that works, I'll get a USB hub or Y so I can get both serial and video.
Thanks.
oh, great, another thing is that maybe the device is not called /dev/ttyACM0

you should have a line about cdc_acm in your dmesg, see the dmesg snippet here: http://jevois.org/doc/USBserialLinux.html
...