Author Topic: DigiCDC, "Port busy" on Mac OS X  (Read 6986 times)

perkinsb1024

  • Newbie
  • *
  • Posts: 2
DigiCDC, "Port busy" on Mac OS X
« on: October 06, 2015, 11:07:00 pm »
I'm having an issue communicating with my Digispark boards using the DigiCDC library.

First, I bought these on eBay before I knew about Digistump and in researching this issue, it appears that they are counterfeit (they have "rev3" printed on them), so I'd understand if you aren't able to provide assistance. However, they do appear to work in every other aspect, so I don't think that's related to the issue I'm having.

I don't have issues programming the boards, but after the micronucleus bootloader launches my code, I start having issues. My code is using the DigiCDC library to control a NeoPixel stick, but I've also tried stripping the code down a bare-bones "echo" program to rule out the code as a source of the problem. Basically, when I try to connect to the serial port via the Arduino Serial Monitor, screen or CoolTerm, I always get an error that the port is busy or in use.

Arduino error:
Code: [Select]
Error opening serial port '/dev/cu.usbmodem1411'. (Port busy)screen error:
Code: [Select]
Cannot open line '/dev/tty.usbmodem1411' for R/W: Resource busyCoolTerm error:
Code: [Select]
An Error Occured while attempting to open the port.
100: Access Denied

I've tried seeing if any other program on my computer is accessing the port, but none are:
Code: [Select]
Bens-MacBook-Pro:2.0a4 benperkins$ lsof | grep usbmodem
Bens-MacBook-Pro:2.0a4 benperkins$
I've tried creating a /var/lock file based on the instructions here: https://www.baldengineer.com/arduino-fixing-serial-port-in-use.html, I've tried removing the Digisparks from my Network Preferences pane, I've tried a new user account on my computer and of course I've tried rebooting. None of that worked.

My computer is a Macbook Pro Retina, late 2013, 13" running OS X 10.11. I also have a work computer (Macbook Pro Retina, late 2013, 15" running OS X 10.10) and I was able to communicate to the Digispark just fine on that computer until I installed the Digistump boards in the Arduino IDE. Once I installed those, I had the exact same issue. Uninstalling that set of boards and rebooting made it work again, so it appears the issue is somewhere related to that. However, uninstalling the Digistump boards from my personal computer did not solve the problem (I have quite a bit more software installed on my personal computer, it's possible something else is also preventing it from working). I see that installing the Digistump boards seems to also install some libusb dylibs, so my best thought is that maybe they are causing the issues, but I'm sort of grasping at straws. Has anyone else run into this issue or have any advice on next steps for troubleshooting?

Thanks

StronglyWordedTOS

  • Newbie
  • *
  • Posts: 7
Re: DigiCDC, "Port busy" on Mac OS X
« Reply #1 on: March 18, 2016, 05:07:55 pm »
I'm having the exact same issue with the same symptoms (and have tried the same steps to "fix" the problem). Did you find any resolution? The DigiCDC CDC_LED program works with the Arduino Serial Monitor with a Mac OS X 10.8 machine I have sitting around, but does not work on my 10.11.3 machine (although I have no issues programming it). I've spent too much time looking for a fix...
« Last Edit: March 18, 2016, 07:07:56 pm by StronglyWordedTOS »

ariel.briner

  • Newbie
  • *
  • Posts: 1
Re: DigiCDC, "Port busy" on Mac OS X
« Reply #2 on: June 07, 2016, 10:59:00 pm »
perkinsb1024 and StronglyWordedTOS, did either of you ever find a solution to this problem?


StronglyWordedTOS

  • Newbie
  • *
  • Posts: 7
Re: DigiCDC, "Port busy" on Mac OS X
« Reply #3 on: June 08, 2016, 10:08:20 am »
ariel.briner, unfortunately, no I was not able to get the DigiCDC examples to work. However, the DigiUSB examples work and I can communicate with the board using the Digispark Python scripts. Not ideal for my application though.

nic.ashby

  • Newbie
  • *
  • Posts: 17
Re: DigiCDC, "Port busy" on Mac OS X
« Reply #4 on: November 05, 2016, 03:49:36 pm »
Any updates? Can not get this to work on this mac. (MBP 5,4 running sierra)

GregA

  • Newbie
  • *
  • Posts: 1
Re: DigiCDC, "Port busy" on Mac OS X
« Reply #5 on: February 16, 2017, 08:49:03 pm »
A few more data points...

I have a 2016 MacBook Pro with 10.12.3.

My spark is a $1.49 eBay special. I have to plug in through an external USB hub for the programmer to recognize the it. Via the hub, it programs fine.

My hub has an activity light. When the CDC echo program is burned, the activity light blinks constantly and opening /dev/tty.usbmodemXXX only gives an error. Running lsof shows nothing.

I installed VirtualBox and live booted Ubuntu 16.04 LTS. When I assigned the USB device to VirtualBox, the activity light stopped blinking. The device file showed up in Ubuntu, but I still get an error opening it.

So next I plugged it into my RPi3 running current Raspbian. The USB hub activity light blinks a little on connection, but then stays on. I can talk to the spark using screen and the device file.

What's interesting (and repeatable) is that after a short time of typing in the terminal, the connection seems to freeze and the activity light blinks continually. The only way to recover seems to be unplugging the spark and starting over. This occurred every time after typing 10-20 characters.

In any case, this seems to point to the problem existing beyond just the Mac.