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

Thread: Mac OS nightmare ! Bunch of Teensy devices

  1. #1
    Member
    Join Date
    Mar 2019
    Location
    Bordeaux / France
    Posts
    48

    Mac OS nightmare ! Bunch of Teensy devices

    I didn't noticed until today but reading this thread https://forum.pjrc.com/threads/44403...+serial+device I had a look to my network settings...

    I found 300+ devices in the list ! Removing them one by one with the Network Preference Panel will take me hours !

    So I wonder :
    1) the cause ?
    2) how to remove them the command line (I could write a bash script)
    - with networksetup -listallnetworkservices I can get all the declared devices, so I tried
    - networksetup -removenetworkservice "Teensy MIDI/Audio 32" with I get an error "You cannot remove Teensy MIDI/Audio 32 because there aren't any other network services on Teensy MIDI/Audio. ** Error: The parameters were not valid."

    Further notice :
    - on /dev/ I've only one /dev/cu.usbmodem3955991
    - I don't understand how tycmd found a board labeled 3955990
    - these two numbers have not changed since I plugged the Teensy for the first time, one month ago

    Mac OS Sierra 10.12.6
    Teensy 3.6

    I really like Mac OS but sometimes... PFEEW !

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,385
    IIRC, TyCmd ignores the last digit of the board number and sets it to 0. That's for historical reasons and nothing to worry about. Older Teensyduino versions do similar.

    But I'm surprised to see that network device problem. I frequently plug and unplug different Teensys and never had this phenomenon in 10.13 High Sierra and 10.14 Mojave. Is that perhaps a <= 10.12 problem ?

  3. #3
    Member
    Join Date
    Mar 2019
    Location
    Bordeaux / France
    Posts
    48
    Okay, nightmare's end, sun is bright ;-)

    Thanks to these guys : https://apple.stackexchange.com/ques...ations-at-once

    I used this Ruby script that must be sudo executed

    Code:
    devices = `networksetup -listallnetworkservices`
    devices.split("\n").each do |device|
    	next unless device =~ /Teensy/
    	print '*'
    	`networksetup -setnetworkserviceenabled "#{device}" off`
    	`networksetup -deletepppoeservice "#{device}"`
    end
    puts
    puts "Done"
    But what a fright !!!

  4. #4
    Member
    Join Date
    Mar 2019
    Location
    Bordeaux / France
    Posts
    48
    Quote Originally Posted by Theremingenieur View Post
    I frequently plug and unplug different Teensys and never had this phenomenon in 10.13 High Sierra and 10.14 Mojave. Is that perhaps a <= 10.12 problem ?
    Dunno but I'll keep a eye on my network devices now ;-)

  5. #5
    Member
    Join Date
    Mar 2019
    Location
    Bordeaux / France
    Posts
    48
    But I really wonder how PPPOE came into the dance ! How a Teensy can be seen as a PPPOE device ??

  6. #6
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,385
    What about updating your OSX to Mojave ?

    But I really wonder how PPPOE came into the dance ! How a Teensy can be seen as a PPPOE device ??

    Most probably for historical reasons in BSD Unix. Each serial port which was not recognized as an input device or as a line printer was taken over by default for modem purposes.

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,929
    Is this condition harmful in any way? Well, other than the alarming (but cosmetic) appearance when looking at the network prefs control panel?

  8. #8
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,385
    Quote Originally Posted by PaulStoffregen View Post
    Is this condition harmful in any way? Well, other than the alarming (but cosmetic) appearance when looking at the network prefs control panel?
    Not at all. Just frightening for youngsters who never had to deal with terminal servers having 64 RS232 ports...

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,929
    I just looked at my Macbook Air which is running 10.14.4. It has 50 network ports called "USB Serial ##". But I've used that laptop for most Mac testing over the last few years, so there's a pretty good chance 50 different Teensy boards have indeed been plugged into it.

  10. #10
    Member
    Join Date
    Mar 2019
    Location
    Bordeaux / France
    Posts
    48
    Quote Originally Posted by Theremingenieur View Post
    What about updating your OSX to Mojave ?
    'cos I use a big bunch of apps which I don't know how they will behave on Mojave (or even run), have a lot a custom settings and tools, and it'll take me 2 days of works without any warranty that I'll not fall in a trap.
    Given that I never install an OS upgrade over an existing system, but always install clean

    Quote Originally Posted by Theremingenieur View Post
    Not at all. Just frightening for youngsters who never had to deal with terminal servers having 64 RS232 ports...
    I never had to deal with 64 RS232 ports, because my Apple //c only provided 2 of them ;-) (not speaking about my Oric Atmos which did had nothing but a parallel one)
    Thanks "for youngsters", I take it, I take it, if only was true

  11. #11
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    949
    This script should take care of those 'USB Serial# #' devices.
    Code:
    #!/bin/sh
    #https://www.jamf.com/jamf-nation/discussions/24815/deleting-usb-network-interfaces
    
    
    IFS=$'\n'
    networkService=`networksetup -listallnetworkservices | tail -n +2 | sed 's|\*||'`
    
    
    for oneServ in ${networkService[@]}; do
        case $oneServ in
            *USB* )
                echo "found USB in $oneServ.  Deleting"
                sudo networksetup -deletepppoeservice $oneServ
                ;;
    
    
                *)
                echo "Not a USB interface. Ignoring $oneServ"
                ;;
        esac
    done

  12. #12
    Senior Member
    Join Date
    Dec 2016
    Posts
    109
    I have a brand new mac. There's over 50 of the buggers in there. Bunch of Feathers too. Its only seen maybe one teensy and one feather. I blame the Arduino IDE. Not that I have any data about it, I just feel like blaming that.

    -jim lee

  13. #13
    Member
    Join Date
    Mar 2019
    Location
    Bordeaux / France
    Posts
    48
    Quote Originally Posted by jim lee View Post
    I have a brand new mac. There's over 50 of the buggers in there. Bunch of Feathers too. Its only seen maybe one teensy and one feather. I blame the Arduino IDE. Not that I have any data about it, I just feel like blaming that.

    -jim lee
    In my case I used the Arduino IDE, let say 1 week max, before switching to Visual Studio - I had 360 false entries, dunno if Arduino IDE is the only cause, I'll check and see

Posting Permissions

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