Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cm160 kills cp210x module as soon as it's run #22

Open
dfluff opened this issue May 28, 2017 · 3 comments
Open

cm160 kills cp210x module as soon as it's run #22

dfluff opened this issue May 28, 2017 · 3 comments

Comments

@dfluff
Copy link

dfluff commented May 28, 2017

Hi.

I'm having a problem getting cm160 to run on my Raspberry Pi.

When I plug in the Owl I see it appear in /var/log/syslog and a device for it appears at /dev/ttyUSB0.

However, when I run ./cm160, I get this output, with the "No error" message on the first pass and the "could not detach kernel driver..." message from then on.

# ./cm160 
Wait for cm160 device to be connected
Found compatible device #0: 0fde:ca05 (002)
Found 1 compatible device
bulk_read returned -110 (No error)
Wait for cm160 device to be connected
Found compatible device #0: 0fde:ca05 (002)
Found 1 compatible device
bulk_read returned -110 (could not detach kernel driver from interface 0: No data available)
Wait for cm160 device to be connected
Found compatible device #0: 0fde:ca05 (002)
Found 1 compatible device

If I tail /var/log/syslog, I get this the second I run ./cm160

May 28 20:49:31 pi-zero-w kernel: [1043641.132661] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
May 28 20:49:31 pi-zero-w kernel: [1043641.132802] cp210x 1-1:1.0: device disconnected

At this point, /dev/ttyUSB0 no longer exists. If I do the following it reappears until I run ./cm160 again:
rmmod cp210x && modprobe cp210x

So, my uneducated guess is that running cm160 is instantly upsetting the cp210x module.

I've tried building cm160 myself and have tried jesjimher/eagle-owl fork, which explicitly mentions running it on a Raspberry Pi. I've tried two different Owl units, and three different Pi's, all with the same result.

Any help would be appreciated. I bought this Owl specifically to monitor via a Pi and I've hit a bit of a dead-end.

Cheers.

@jesjimher
Copy link

I've found this -110 error too, but it's pretty intermitent and almost always dependent on timing. In my experience, if I start cm160 program first, and then plug OWL into USB port, everything works fine. Starting cm160 with an already attached OWL device leads (often, though not always) to this problem.

Obviously that's not a satisfactory solution when you intend to use OWL 24/7 without continuous plugging and unplugging, but I've found that, when using eagle-owl with a Raspberry Pi, if cm160 is configured as a service started on boot everything works just fine.

@dfluff
Copy link
Author

dfluff commented May 30, 2017

@jesjimher Thanks for the tip, I haven't tried running cm160 before plugging in. I'll give that a go.

@dfluff
Copy link
Author

dfluff commented May 30, 2017

@jesjimher Sadly was only a very slight improvement. At the time the OWL was plugged in I saw this in syslog:

May 30 18:50:43 pi-abingdon-1 kernel: [5981844.483969] cp210x 1-1.3.1:1.0: cp210x converter detected
May 30 18:50:43 pi-abingdon-1 kernel: [5981844.484724] usb 1-1.3.1: cp210x converter now attached to ttyUSB0
May 30 18:50:45 pi-abingdon-1 kernel: [5981846.507460] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
May 30 18:50:45 pi-abingdon-1 kernel: [5981846.507656] cp210x 1-1.3.1:1.0: device disconnected

i.e. cp210x connected and instantly disconnected. Also, I checked at this point and /dev/ttyUSB0 was not present. However, in this state and to my surprise something happened! I got a flood of messages reporting invalid data, followed by it claiming to be getting historical data, then one LIVE reading... and then nothing more. I left it for 15 minutes but nothing else happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants