Unable to connect to RCP in OS X

Discussion on the RaceCapture App - Windows, Android, OSX and Linux.

Moderators: JeffC, stieg

paulbutcher
Posts: 42
Joined: Sat Dec 20, 2014 1:48 pm
Location: UK
Contact:

Unable to connect to RCP in OS X

Post by paulbutcher »

I've finally received my RCP (after having to hand over my pound of flesh to UK customs :x). I've verified that I can connect to it from the Windows version of the app, and seen that the numbers change if I wave the box around, so everything's basically working (yay!)

I've built the OS X app according to the instructions here here and the app starts up, and looks very similar to the Windows version (so far, so good).

When I try to persuade it to connect over the USB, however, it fails. I've attached the console log in case there are any clues in there.

Suggestions as to what's up gratefully received.
Attachments
log.txt
(13.84 KiB) Downloaded 154 times
paul.butcher->msgCount++

Silverstone, Brands Hatch, Donington Park...
Who says I have a one track mind?

http://www.paulbutcher.com/

Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
http://pragprog.com/book/pb7con

rdoherty
Posts: 215
Joined: Fri Mar 08, 2013 3:32 am

Post by rdoherty »

Hi Paul, I use the new RC app on OSX. When you plug in RaceCapture/Pro does anything new show up under /dev/? For me RCP shows up as something like 'usbmodem'.

From the log it looks like the RC app doesn't see RaceCapture/Pro under /dev, which is odd. What version of firmware is your RCP running?
Ryan Doherty
Autosports Labs

paulbutcher
Posts: 42
Joined: Sat Dec 20, 2014 1:48 pm
Location: UK
Contact:

Post by paulbutcher »

OK. So I've made it work, but I'm definitely in the twilight zone.

I've confirmed that when I plug the RCP in, I get an entry in /dev called tty.usbmodem1411.

The first few times I tried, I got the same behaviour as I described in my original mail. I then shut down VMWare Fusion, which was running at the time (so I was getting the "do you want to connect this device to your Mac or your Windows VM message each time I plugged in).

The first time I tried after shutting down VMWare, as soon as I started up RaceCapture_App, the act of it scanning /dev caused my iPhone to try to initiate Bluetooth pairing :shock: (yes, really). But it then went on to find the RCP and *claimed* to have successfully connected to it. But when I went to the dashboard, I couldn't see any data coming from the RCP.

I unplugged the RCP and shut down the app, plugged the RCP back in and started the app. This time, everything worked fine (no spurious bluetooth pairing, and I could see data from the RCP - yay!).

I then shut down the app and unplugged/reconnected the RCP. *This* time, starting the app caused my machine to lockup solid (mouse cursor not moving, keyboard unresponsive, hard reboot required).

Since the reboot, I've connected a couple of times, each time successfully.

So, it's working, but not exactly perfectly...

If there's anything I can dig out of logs that would help work out what's going on, let me know.
paul.butcher->msgCount++

Silverstone, Brands Hatch, Donington Park...
Who says I have a one track mind?

http://www.paulbutcher.com/

Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
http://pragprog.com/book/pb7con

paulbutcher
Posts: 42
Joined: Sat Dec 20, 2014 1:48 pm
Location: UK
Contact:

Post by paulbutcher »

Oh - you asked about which firmware version I'm running. I'm running whatever it shipped with (I only took delivery today :-)

How do I find out what version it's running? I can see that there's an "Update firmware" option in the app. But I can't see anywhere that tells me which version is already running?
paul.butcher->msgCount++

Silverstone, Brands Hatch, Donington Park...
Who says I have a one track mind?

http://www.paulbutcher.com/

Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
http://pragprog.com/book/pb7con

paulbutcher
Posts: 42
Joined: Sat Dec 20, 2014 1:48 pm
Location: UK
Contact:

Post by paulbutcher »

OK, I've been poking around in the logs to work out what was going on with the crash and it seems to be a GPU crash. So I suspect it has nothing to do with the USB, and is far more likely to be a bug in pygame (or how the app uses pygame?).

I've attached a log from the system console from when the app starts to the crash.
Attachments
log.txt
(8.88 KiB) Downloaded 213 times
paul.butcher->msgCount++

Silverstone, Brands Hatch, Donington Park...
Who says I have a one track mind?

http://www.paulbutcher.com/

Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
http://pragprog.com/book/pb7con

rdoherty
Posts: 215
Joined: Fri Mar 08, 2013 3:32 am

Post by rdoherty »

Wow, that is a crazy crash. Can you attach the output of 'pip freeze' so we can see the pip versions of all the python modules?

The firmware version is in the top right part of the window next to 'RaceCapture/Pro...'

What version of OSX and laptop/desktop are you using?
Ryan Doherty
Autosports Labs

paulbutcher
Posts: 42
Joined: Sat Dec 20, 2014 1:48 pm
Location: UK
Contact:

Post by paulbutcher »

rdoherty wrote:Wow, that is a crazy crash. Can you attach the output of 'pip freeze' so we can see the pip versions of all the python modules?
asl-f4-loader==0.0.6
ihextools==1.0.0
Kivy-Garden==0.1.1
pyserial==2.7
requests==2.2.1
The firmware version is in the top right part of the window next to 'RaceCapture/Pro...'
Ah! I thought that that was the version of the app, not the firmware :oops:

I'm running v2.7.6.
What version of OSX and laptop/desktop are you using?
Yosemite 10.10.2 on a Macbook Pro Retina (Mid 2012).
paul.butcher->msgCount++

Silverstone, Brands Hatch, Donington Park...
Who says I have a one track mind?

http://www.paulbutcher.com/

Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
http://pragprog.com/book/pb7con

rdoherty
Posts: 215
Joined: Fri Mar 08, 2013 3:32 am

Post by rdoherty »

Interesting, I don't see pygame listed, my system has version 1.9.2pre. Are you using a virtualenv?

My guess right now is a problem with pygame and your video card drivers (maybe).
Ryan Doherty
Autosports Labs

paulbutcher
Posts: 42
Joined: Sat Dec 20, 2014 1:48 pm
Location: UK
Contact:

Post by paulbutcher »

rdoherty wrote:Interesting, I don't see pygame listed, my system has version 1.9.2pre. Are you using a virtualenv?

My guess right now is a problem with pygame and your video card drivers (maybe).
Ah. I sent you what I get when I do pip freeze within the virtualenv that the compile instructions in README.md told me to setup.

If I do pip freeze outside the virtualenv, I get:

You are using pip version 6.0.7, however version 6.0.8 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
awscli==1.3.18
bcdoc==0.12.2
botocore==0.52.0
colorama==0.2.5
docutils==0.11
jmespath==0.4.1
mercurial==3.2.4
pyasn1==0.1.7
pygame==1.9.2a0
python-dateutil==2.2
rsa==3.1.2
six==1.7.2
vboxapi==1.0
virtualenv==12.0.7

Forgive me—I'm not a regular Python hacker, so I'm not particularly familiar with either pip or virtualenv—I was just mindlessly following the instructions in README.md :-) Have I screwed something up?
paul.butcher->msgCount++

Silverstone, Brands Hatch, Donington Park...
Who says I have a one track mind?

http://www.paulbutcher.com/

Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
http://pragprog.com/book/pb7con

rdoherty
Posts: 215
Joined: Fri Mar 08, 2013 3:32 am

Post by rdoherty »

No, you haven't screwed anything up :)

If the RC app is loading then I believe you are using your system installed pip packages based on the output of pip freeze. The crash may be due to a bug in pygame or Kivy or some weird interaction with your video card drivers. I am running a different release of pygame. I'll try updating today to your version and see if I can reproduce.
Ryan Doherty
Autosports Labs

paulbutcher
Posts: 42
Joined: Sat Dec 20, 2014 1:48 pm
Location: UK
Contact:

Post by paulbutcher »

Cool. It's worth mentioning that I've only seen the crash once. I'll certainly let you know if I see it, or any other weird behaviour, again.

Regarding the other issues I had, I'm guessing that weird interactions with VMWare aren't something you're going to worry about too much? The "causing my phone to initiate Bluetooth pairing" one is, umm, odd though? I have a theory about it (for what it's worth):

My phone *used* to be paired with my laptop, but I had to do a factory reset on it a week or so ago to solve another problem. I hadn't got around to repairing it. But the serial port was (is) still lying around (i.e. my Mac thought that it was paired with the 'phone, but the 'phone didn't know anything about my Mac).

My guess is that when the app was scanning serial ports, the act of it probing the iPhone serial port caused the OS to say "Ooh! Someone wants to use the port, I'd better reestablish pairing".

Sound faintly plausible?
paul.butcher->msgCount++

Silverstone, Brands Hatch, Donington Park...
Who says I have a one track mind?

http://www.paulbutcher.com/

Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
http://pragprog.com/book/pb7con

rdoherty
Posts: 215
Joined: Fri Mar 08, 2013 3:32 am

Post by rdoherty »

Yeah, if you have VMware running at the same time it can take over USB devices and cause OSX to not detect them. I use VMware too and have seen that problem. I wouldn't worry about it.

Your idea about your phone sounds right to me.
Ryan Doherty
Autosports Labs

Magikben
Posts: 8
Joined: Tue Aug 20, 2013 8:34 pm

Post by Magikben »

I'm not getting crashes but I am not able to connect either. It is searching /dev/cu.usbmodem1421 which is in place, but it still says Could not detect RaceCapture/Pro. Still experimenting.

brentp
Site Admin
Posts: 6282
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Magikben
Posts: 8
Joined: Tue Aug 20, 2013 8:34 pm

Post by Magikben »

My issue was with the OS X version. I can connect ok with the Windows version running in VMWare.

Post Reply