Mac OS nightmare ! Bunch of Teensy devices

Status
Not open for further replies.

Tactif CIE

Well-known member
I didn't noticed until today but reading this thread https://forum.pjrc.com/threads/44403-MacOS-Sierra-port-problem?highlight=usb+modem+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 !
 
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 ?
 
Okay, nightmare's end, sun is bright ;-)

Thanks to these guys : https://apple.stackexchange.com/questions/349424/delete-many-network-configurations-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 !!!
 
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.
 
Is this condition harmful in any way? Well, other than the alarming (but cosmetic) appearance when looking at the network prefs control panel?
 
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.
 
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

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 :)
 
This script should take care of those 'USB Serial# #' devices.
Code:
[FONT=Menlo]#!/bin/sh[/FONT]
[FONT=Menlo]#https://www.jamf.com/jamf-nation/discussions/24815/deleting-usb-network-interfaces[/FONT]
[FONT=Helvetica]
[/FONT]
[FONT=Menlo]IFS=$'\n'[/FONT]
[FONT=Menlo]networkService=`networksetup -listallnetworkservices | tail -n +2 | sed 's|\*||'`[/FONT]
[FONT=Helvetica]
[/FONT]
[FONT=Menlo]for oneServ in ${networkService[@]}; do[/FONT]
[FONT=Menlo]    case $oneServ in[/FONT]
[FONT=Menlo]        *USB* )[/FONT]
[FONT=Menlo]            echo "found USB in $oneServ.  Deleting"[/FONT]
[FONT=Menlo]            sudo networksetup -deletepppoeservice $oneServ[/FONT]
[FONT=Menlo]            ;;[/FONT]
[FONT=Helvetica]
[/FONT]
[FONT=Menlo]            *)[/FONT]
[FONT=Menlo]            echo "Not a USB interface. Ignoring $oneServ"[/FONT]
[FONT=Menlo]            ;;[/FONT]
[FONT=Menlo]    esac[/FONT]
[FONT=Menlo]done[/FONT]
 
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
 
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
 
Status
Not open for further replies.
Back
Top