So I tried bonding wlan and eth0, and it went relatively effortlessly. I have no idea how to make the configuration persistent, so this is just a "proof of concept".
My test player is a Pi2 with ethernet (inactive and physically disconnected in the beginning) and wifi via USB, running pCP 3.11. In the Squeezelite config options I use "-m" so that my LMS player doesn't vary with the network configuration. I installed iproute2 from "piCorePlayer sourceforge repository" (iproute2 is also listed in the std repo but this one fails to download), then went to the console and "ssh [email protected]" into the player (over wifi.) This is what I did to associate the 2 interfaces in a bond interface: Code: -------------------- tc@berlin-boombox:~$ sudo su root@berlin-boombox:/home/tc# cd root@berlin-boombox:~# modprobe bonding mode=1 primary=eth0 fail_over_mac=1 max_bonds=1 miimon=250 root@berlin-boombox:~# cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: fault-tolerance (active-backup) (fail_over_mac active) Primary Slave: None Currently Active Slave: None MII Status: down MII Polling Interval (ms): 250 Up Delay (ms): 0 Down Delay (ms): 0 root@berlin-boombox:~# ip link set bond0 up root@berlin-boombox:~# ip link set eth0 down root@berlin-boombox:~# echo +eth0 > /sys/class/net/bond0/bonding/slaves root@berlin-boombox:~# udhcpc -b -i bond0 -x hostname:berlin-boombox -p /var/run/udhcpc.bond0.pid udhcpc (v1.24.2) started Sending discover... Sending select for 172.17.255.10... Lease of 172.17.255.10 obtained, lease time 3600 deleting routers route: SIOCDELRT: No such process adding dns 172.17.0.2 root@berlin-boombox:~# ps xawu | grep udhcp 1148 root /sbin/udhcpc -b -i eth0 -x hostname berlin-boombox -p /var/run/udhcpc.eth0.pid 1161 root udhcpc -n -i wlan0 -x hostname berlin-boombox 7811 root udhcpc -b -i bond0 -x hostname berlin-boombox -p /var/run/udhcpc.bond0.pid 7823 root grep udhcp root@berlin-boombox:~# kill -USR2 1148 root@berlin-boombox:~# kill -USR2 1161 root@berlin-boombox:~# packet_write_wait: Connection to 172.17.10.20 port 22: Broken pipe -------------------- Now using the bond IP address: ssh [email protected] Code: -------------------- root@berlin-boombox:~# ip link set wlan0 down root@berlin-boombox:~# echo +wlan0 > /sys/class/net/bond0/bonding/slaves root@berlin-boombox:~# cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: fault-tolerance (active-backup) (fail_over_mac active) Primary Slave: eth0 (primary_reselect always) Currently Active Slave: eth0 MII Status: up MII Polling Interval (ms): 250 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth0 MII Status: up Speed: 100 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: b8:27:eb:xx:xx:xx Slave queue ID: 0 Slave Interface: wlan0 MII Status: up Speed: Unknown Duplex: Unknown Link Failure Count: 0 Permanent HW addr: 74:da:38:yy:yy:yy Slave queue ID: 0 root@berlin-boombox:~# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 172.17.0.1 0.0.0.0 UG 0 0 0 bond0 127.0.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 lo 172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 bond0 root@berlin-boombox:~# ip link show bond0 14: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000 link/ether b8:27:eb:xx:xx:xx brd ff:ff:ff:ff:ff:ff -------------------- >From then on any I tried alternatively pulling one of the interfaces off while the player was streaming in sync. Ethernet was reselected as primary interface as soon as available. Streaming was not interrupted and sync was ok (for this you need squeezelite's -m option, too) HTH 3 SB 3 Libratone Loop, Zipp Mini iPeng (iPhone + iPad) LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa IRBlaster by Gwendesign (Felix) Server Power Control by Gordon Harris Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger PowerSave by Jason Holtzapple Song Info, Song Lyrics by Erland Isaksson AirPlay Bridge by philippe_44 WeatherTime by Martin Rehfeld Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins. ------------------------------------------------------------------------ epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711 View this thread: http://forums.slimdevices.com/showthread.php?t=106755
_______________________________________________ unix mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/unix
