Mac OSX Cortex USB driver

This driver allows the cortex to be connected to OSX and show up as a serial device in the same way as the programming cable. ConVEX and PROS running on OSX are now able to download code to the cortex directly. I started this thread so that the forum search function would do a better job in allowing users to find this in the future. We previously discussed the driver here.

https://vexforum.com/t/programming-under-osx/24441/1

I’ve updated the USB driver for compatibility with OSX 10.9 (Mavericks). There’s actually no change to the driver code but the kext was recompiled against the 10.8 SDK, is now code signed and placed in the new preferred location. I have tested with a clean install of the GM that was released to developers a few days ago, I have not tested on a system that was updated from a previous OS. The original driver will still work under 10.9 but the OS will complain about security and ask you contact your vendor for an updated version, this is it.

There are still three separate installers, one for 10.5, one for 10.6 through 10.8 and one for 10.9. I could have integrated them all into one but I don’t have time to check that the correct kext gets installed for each OS.

The driver can be downloaded from here.

The driver consists of a single kernel extension that gets placed in
/System/Library/Extensions for OSX 10.5 through 10.8
/Library/Extensions for OSX 10.9

The kernel extension is called VexCortexCDC.kext

To uninstall, remove this bundle with admin privledges.

Please reports any bugs or kernel panics in this thread, however, I’ve been using the driver for a couple of weeks now with no issues.

1 Like

Just wondering when that source code will be made available

From the thread, I understand the support is until version 10.9.
Is this driver supported on MAC 10.10.2?
If not, is there a plan to support this?

Thanks,
Amit

Yes, the driver works with 10.10 (Yosemite). Use the installer for 10.9.

This driver is provided for individual use.
Please do not include this driver with other free or commercial development packages.

1 Like

The driver does not seem to work with the latest Mac OS 10.12 Sierra as I could not find the COM port on Mac for VEX even after installing the driver. Is there a plan to support the latest Mac OS?

What type of Mac did you try on?
The USB connection should show up in system information even if the driver does not load. I don’t have 10.12 installed anywhere and I think most of my personal hardware is now getting too old to use it, I will see if I can setup a VM sometime over the holidays and do some tests.

1 Like

@jpearman I tried on Mac Mini with OS Sierra 10.12. I have attached a snapshot of the System and Hardware Overview.

As you mentioned, the USB connection does show up the VEX board Product ID , Vendor ID and other details. However, executing the command ‘ls /dev/cu.usb*.’ in a terminal does not show the port for the VEX hardware.

Let me know if you need any other info to debug this.
SysOverview.png


@jpearman

I happened to come across the code for STM32 flash loader here:

Just wanted to confirm if the code on this site is the driver code for VEX on Mac

No, that’s something else that’s used to download binary/hex files to the cortex.

TL;DR the driver works with MacOS Sierra.

I tested the driver today under 10.12.2, everything is working for me without issue. I used an older laptop that was updated to 10.12 from 10.9, it was not a clean install and the driver had never been installed on this laptop.

There is a thread on the Apple developer forums discussing USB issues, some people have had some problems after the update to Sierra with simple devices such as USB disk drives. Suggestions to fix this range from reseting the SMC chip to simply reinstalling drivers.

I have had issues with the cortex not working with some Macs and PCs in the past, one solution to this has been using a USB hub between the cortex and computer, you may want to try that and see what happens.

1 Like

Thanks for trying on Mac and your suggestions.

I tried using a USB hub and performing SMC reset but didn’t help. I’ll see if there’s anything else I can try to make it work.

Open up the console (not terminal) and see if it gives the following when you plugin the cortex.

12/29/16 2:01:32.000 PM kernel[0]: VexCortexCDC : We have vendor 1240 and product 11
12/29/16 2:01:32.000 PM kernel[0]: VexCortexCDC :Probe, score is 100000
12/29/16 2:01:32.000 PM kernel[0]: VexCortexCDC : We have vendor 1240 and product 11
12/29/16 2:01:32.000 PM kernel[0]: ----------------------------------------------------
12/29/16 2:01:32.000 PM kernel[0]: VEX Cortex CDC/ACM Driver             
12/29/16 2:01:32.000 PM kernel[0]: Version 1.0.0 - James Pearman 2013          
12/29/16 2:01:32.000 PM kernel[0]: ----------------------------------------------------
12/29/16 2:01:32.000 PM kernel[0]: VexCortexCDC : Device Name   = CDC RC Controller
12/29/16 2:01:32.000 PM kernel[0]: ----------------------------------------------------
12/29/16 2:01:32.000 PM kernel[0]: VexCortexCDC : Version number - 1.0.0, Input buffers 8, Output buffers 16

@jpearman
I have been trying a few debugging steps over the past few days but no luck on Mac Sierra with detecting VEX COM port.

I tested the hardware on Mac 10.12, 10.12.1 and 10.12.2. I tried reinstalling the driver. I used the ioreg command and tried to look at the I/O kit Registry to find something that may be causing the issue but nothing helped. I have attached a screenshot of how the console looks when I plugin the cortex. Not sure what’s going wrong. Can you please suggest what may be missing?



IORegLogs.zip (191 KB)

I did have a look into this, it’s all related to the rewrite of the USB stack that Apple released as part of OSX 10.11. Looking at your ioreg logs, I see that under 10.11 the cortex is seen as a “AppleUSBDevice” where under 10.12 (on your Mac) it’s a “IOUSBHostDevice”. When I look on my old laptop running 10.12 I see it as a “AppleUSBDevice”, why I don’t know, perhaps it’s hardware (USB 3 vs USB 2) related. Apple pretty much changed everything for USB drivers in 10.11 although kept some backwards compatibility support, lots of people have had issues. So at this stage I don’t hold much hope for this driver moving forwards, fundamentally the USB implementation in the cortex was broken and this was a bit of a hack to make it compatible, I don’t have the bandwidth (or suitable hardware that exhibits the issue) to look into this anytime soon. I rarely use the driver myself, 99% of my programming is done using the programming kit via the joystick so I don’t really have much motivation to support it.

1 Like

@jpearman

Thank you for looking into the issue and your inputs. Would it be possible for you to share the driver code?