MacOS Sierra port problem

Status
Not open for further replies.

Fyod

Well-known member
This is most likely a problem on my side, just wondering if anyone has any experience with the same quirk.
Whenever I reset or program/reset the Teensy, the USB port gets a different number (/dev/cu.usbmodem<n+1>) so I have to keep changing the port in ArduinoIDE. Windows adds a new port number for every new Teensy, but not for the same one repeatedly.
I have the latest Arduino and Teensyduino downloaded today.

Cheers!
 
Last edited:
This is most likely a problem on my side, just wondering if anyone has any experience with the same quirk.
Whenever I reset or program/reset the Teensy, the USB port gets a different number (/dev/cu.usbmodem<n+1>) so I have to keep changing the port in ArduinoIDE. Windows adds a new port number for every new Teensy, but not for the same one repeatedly.
I have the latest Arduino and Teensyduino downloaded today.

Cheers!
I just had this problem when compiling as Serial device, a computer restart seems to fix it for me.
 
I just had this problem when compiling as Serial device, a computer restart seems to fix it for me.

Fix it so it doesn't recur after the reboot?

Somebody else posted about this last week or so - TyQt gives good SerMon and does it by Teensy Serial# so it wasn't affected ( in a way that mattered ).
 
My Macbook Air with Sierra creates the /dev/cu.usbmodem device with the same number each time I reconnect the same Teensy.
 
I have had this happen a number of times. It is insanely frustrating. Rebooting did not fix it for me, I honestly can't remember how it was resolved.
 
Is there any chance some program on your Mac is holding the port open? Maybe that's forcing Sierra to assign a different name when the device disconnects and reconnects?
 
Is there any chance some program on your Mac is holding the port open? Maybe that's forcing Sierra to assign a different name when the device disconnects and reconnects?

I think that this is what is happening, but its not another program. Its like the handle crashed and is stuck, and wont release, so each time you connect, it keeps them open and has to increment the number.

Here are some folks talking on an arduino forum about a problem that sounds the same on another arduino platform: http://discuss.littlebits.cc/t/arduino-ports-changes-with-each-upload/22801/10

I think its something weird in OS X. Next time it happens I will write down how I get things to work again!
 
Interestingly, it was using one number repeatedly the way it should. Then something happened and it began incrementing.

Now after restart it is working again, but Teensy gets assigned cu.usbmodem2220661 and bluetooth turned off.

Then I deleted all USB Serials in Network settings and after another restart, Teensy still gets that weird number, but it seems to be working fine, both unplugging/replugging and when uploading a program and being reset by Teensyduino. Bluetooth is now ok.

This is on a recently hackintoshed ThinkPad, so I expected the problem would more likely be in my settings.
 
Last edited:
Well, it's happening again, this is two consecutive compiles using Serial USB. I did nothing unusual just uploading code and was using standard USB Serial port names then it just started this.


Screen Shot 2017-06-02 at 4.52.14 PM.png

Screen Shot 2017-06-02 at 4.53.41 PM.png
 
duff,
Sorry, I had to laugh looking at your pictures. Looks like Wack-A-Mole! I know its not funny but sometimes stuff like this can drive you nuts !!
I've never had that exact problem with the incrementing with any Mac serial device including Arduino-Teensy but have had the occasional not letting the port go requiring just closing the terminal window or unplugging the cord. Usually this happens when output is flowing to the terminal and I either let it go to long or hit the autoscroll checkbox and the buffer fills up in the background. Happens with screen in terminal also.

Just noticed that the /dev/cu.usbmodem1073861 on the bottom info bar of both windows doesn't match the port setting.
 
Last edited:
Is there any chance some program on your Mac is holding the port open? Maybe that's forcing Sierra to assign a different name when the device disconnects and reconnects?
Yes, I think this is correct, what I noticed is when the USB Serial Port number increments, in the /dev/ directory usbmodem1073861 will never close. So if I unplug my Teensy that usb port number will still show up in /dev. Also in the System Preferences under Network you will notice that every time the usbmodem number increments it will show here as new Modem Type, I had hundreds of them.

What I did to fix this is to delete all "USB Serial" modem devices in System Preferences -> Network, then restart your computer with Teensy unplugged, once booted back up open Terminal and make sure no cu.usbmodem(x) is not defined then plug in your Teensy. Now the Teensy should be configured with the correct Serial Port name.
 
I was experiencing the problem, and I can demonstrate what it looks like from terminal below:

MacPro:flxs1 tenkai$ ls -l /dev/tty.usbmodem401231
crw-rw-rw- 1 root wheel 31, 34 May 31 18:56 /dev/tty.usbmodem401231
MacPro:flxs1 tenkai$ ls -l /dev/tty.usbmodem*
crw-rw-rw- 1 root wheel 31, 34 May 31 18:56 /dev/tty.usbmodem401231
MacPro:flxs1 tenkai$ minicom -D /dev/tty.usbmodem401231
minicom: cannot open /dev/tty.usbmodem401231: Device not configured

<CONNECTING TEENSY HERE>

MacPro:flxs1 tenkai$ ls -l /dev/tty.usbmodem*
crw-rw-rw- 1 root wheel 31, 208 Jun 8 13:05 /dev/tty.usbmodem104
crw-rw-rw- 1 root wheel 31, 34 May 31 18:56 /dev/tty.usbmodem401231

<DISCONNECT AND RECONNECT TEENSY HERE>

MacPro:flxs1 tenkai$ ls -l /dev/tty.usbmodem*
crw-rw-rw- 1 root wheel 31, 210 Jun 8 13:06 /dev/tty.usbmodem105
crw-rw-rw- 1 root wheel 31, 34 May 31 18:56 /dev/tty.usbmodem401231

I could not find evidence of any application using the usbmodem401231 using sudo lsof | grep usbmodem

I did find a bunch of USB Serial and Teensy MIDI devices in the network control pane, which I deleted as @duff suggested.

Screen Shot 2017-06-08 at 1.15.42 PM.png
I then rebooted and then tty.usbmodem401231 shows up properly and can be monitored and disconnected and reconnected again.

This was all done on Mac OS 10.11.6
 
Status
Not open for further replies.
Back
Top