Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

goodthymes

macrumors regular
Original poster
Oct 11, 2022
123
288
I have an M1 Mini and it doess not play nice with airplay to Homepods. The Mini is on an ethernet connection and about 50% of the time it is not able to talk to 2 different homepods unless the connection is reset; either by manually removing the cable and plugging back in or using the terminal command "sudo ifconfig". Once reset it's able to connect to the homepods immediately. It's only airplay that's the issue, all other network functions like browsing, printing to wireless printer, connecting to a Timecapsule is 100% uptime. I've done a clean install of Ventura and Sonoma and the problem presist so I'm incline to think it's just an M1 issue.

Is it possible to make a script that sits on the desktop that I can just double click to disable and then enable the ethernet interface? I looked through the new Shortcut app but didn't see suited for the purpose. The script is very simple, something like this:

sudo ifconfig en0 down
(password)
sudo ifconfig en0 up

Thanks in advance for any help!
 

DaveFromCampbelltown

macrumors 68000
Jun 24, 2020
1,785
2,887
Can't you do it via Network and Locations?
I have a "Default" automatic location that connects via DHCP, a "Normal" location that has the IP address and DNS servers defined, and a "None" location that has every thing turned off.
Once you have more than one location defined, you can just select it from the Apple Menu on the top left.
 

bogdanw

macrumors 603
Mar 10, 2009
6,114
3,021
sudo ifconfig en0 down
(password)
sudo ifconfig en0 up
networksetup doesn't require sudo.
AppleScript that can be saved as an app
AppleScript:
do shell script "networksetup -setnetworkserviceenabled Ethernet off"
delay 5
do shell script "networksetup -setnetworkserviceenabled Ethernet on"
 
  • Like
Reactions: fp99

goodthymes

macrumors regular
Original poster
Oct 11, 2022
123
288
networksetup doesn't require sudo.
AppleScript that can be saved as an app
AppleScript:
do shell script "networksetup -setnetworkserviceenabled Ethernet off"
delay 5
do shell script "networksetup -setnetworkserviceenabled Ethernet on"
Thanks so much, I'll give it try.
 

goodthymes

macrumors regular
Original poster
Oct 11, 2022
123
288
Can't you do it via Network and Locations?
I have a "Default" automatic location that connects via DHCP, a "Normal" location that has the IP address and DNS servers defined, and a "None" location that has every thing turned off.
Once you have more than one location defined, you can just select it from the Apple Menu on the top left.
Thank you, I'll give this option a try if the Apple script one doesn't work =)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.