Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 14 of 14

Thread: MacOS Sierra port problem

  1. #1
    Senior Member
    Join Date
    Jun 2014
    Posts
    244

    MacOS Sierra port problem

    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 by Fyod; 05-26-2017 at 02:46 AM.

  2. #2
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    961
    Quote Originally Posted by Fyod View Post
    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.

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,085
    Quote Originally Posted by duff View Post
    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 ).

  4. #4
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    961
    Quote Originally Posted by defragster View Post
    Fix it so it doesn't recur after the reboot?
    It's happened a couple of times.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,337
    My Macbook Air with Sierra creates the /dev/cu.usbmodem device with the same number each time I reconnect the same Teensy.

  6. #6
    Senior Member
    Join Date
    Feb 2015
    Posts
    160
    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.

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,337
    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?

  8. #8
    Senior Member
    Join Date
    Feb 2015
    Posts
    160
    Quote Originally Posted by PaulStoffregen View Post
    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/ardui...pload/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!

  9. #9
    Senior Member
    Join Date
    Jun 2014
    Posts
    244
    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 by Fyod; 05-30-2017 at 03:19 PM.

  10. #10
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    961
    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.


    Click image for larger version. 

Name:	Screen Shot 2017-06-02 at 4.52.14 PM.png 
Views:	766 
Size:	200.7 KB 
ID:	10723
    Click image for larger version. 

Name:	Screen Shot 2017-06-02 at 4.53.41 PM.png 
Views:	871 
Size:	198.2 KB 
ID:	10724

  11. #11
    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 by bicycleguy; 06-06-2017 at 10:12 PM. Reason: something new

  12. #12
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    961
    Quote Originally Posted by PaulStoffregen View Post
    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.

  13. #13
    Senior Member
    Join Date
    Feb 2015
    Posts
    160
    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.

    Click image for larger version. 

Name:	Screen Shot 2017-06-08 at 1.15.42 PM.png 
Views:	123 
Size:	105.6 KB 
ID:	10762
    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

  14. #14
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    961
    Quote Originally Posted by tenkai View Post
    Click image for larger version. 

Name:	Screen Shot 2017-06-08 at 1.15.42 PM.png 
Views:	123 
Size:	105.6 KB 
ID:	10762
    yep, also after deleting them make sure you hit "Apply" button before plugging your teensy back in or all the ones you deleted will show back up. I had hundreds of them, and it sucks because you can only delete them one at time!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •