Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1

    Raspberry Pi3b+ with piCorePlayer 8.1.0 looses ethernet interface

    My setup is as follows:
    I have LMS with my music collection on my home server.
    I have a raspberry pi 3b+ with piCorePlayer connected to my LAN via cabled connection (same subnet as LMS server).
    Audio output is via USB cable to a pair of Airpulse A300PRO speakers.
    This setup works as expected, except for one annoying thing:
    The piCorePlayer which runs on the raspberry pi loses connection after some time.
    I can't trigger this, but the raspberry pi is always on and every morning I try to use it I find it with the connection lost.
    I can't put the blame on the hardware as the pi was used before with volumio which ran well for weeks or months at a time.

    So, if I attach a keyboard and monitor to the pi I can access the console directly.
    If I issue an ifconfig command I get only the loopback interface shown.
    if I issue an ifconfig -a command I get both the eth0 and lo interfaces shown.
    If I try to bring up the eth0 connection with ifconfig eth0 up command, I get an error message saying: "ifconfig: SIOCSIFFLAGS: Operation not permitted"

    So the only solution is to restart the pi either via command line or by interrupting the power.

    Did someone else encounter this behavior? And if yes, did you solve this? And how?

    Thank you for reading my post!

  2. #2
    So, a little thing I missed:
    the eth0 can be brought back up with sudo ifconfig eth0 up
    But this still leaves the actual problem unsolved: why is the connection lost every day?

  3. #3
    Senior Member
    Join Date
    Jan 2011
    Location
    Staffordshire. UK
    Posts
    5,223
    I have no real idea of how to solve this conundrum, but that won't stop me making some suggestions

    In any order:

    Change the Ethernet cable / try using wireless on the pi

    Download a fresh image and burn it again

    Make a cron job to restart the pi (or LMS) periodically

    Connect the headphone socket of the pi to the speakers with a suitable, very cheap headphone to rca phono

    If the disconnect only occurs overnight, do the speakers go into sleep mode and maybe drop the usb connection if no signal is present (test this leaving the pi playing something, or check the router first thing to see if the picoreplayer is still there)

    Install LMS on another computer and see if the problem replicates

    ronnie

    do you power off the speakers and leave just the picoreplayer powered up ?

    Which audio output are you using in the squeezelite settings ?
    Last edited by Man in a van; 2021-12-20 at 05:08.

  4. #4
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,900
    There is nothing within pCP that "Downs" the ethernet interface. Even if the cable comes unplugged.....just plug it back in, and it will be fine.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  5. #5
    Senior Member
    Join Date
    Nov 2012
    Location
    Southern California
    Posts
    375
    It have no idea too, but I will offer a suggestion. Check the logs in your router for something that might help identify the issue. Perhaps it is not renewing the IP address lease?

  6. #6
    Thank you for your suggestions!

    As far as my expertise goes, this seems to be a OS issue, not an application issue. But I'm not a proficient enough linux user to diagnose it.

    So, what I tried was to reimage the piCorePlayer (this time with the x64 version - before I used the 32bit image). The behavior was still the same.
    Next I tried a variation of one of the suggestions: use the cron to restart the pCP if the connection goes down.
    I made a small script that is attached below:
    Code:
    #!/bin/sh
    LINK_STATE=$(cat /sys/class/net/eth0/operstate)
    if [[ "$LINK_STATE" = "down" ]]; then
       sudo reboot
    fi
    script is then run every 5 minutes with the following cron command:
    Code:
    */5 * * * * /home/tc/mon-eth0.sh
    This solves the availability part of the operating system but introduces a new problem, this time an application one:
    Squeezelite fails to start when the speakers are off/connected to another input source.

    So my next problem is: how to make Squeezelite start when the DAC is not connected?

    There may be an answer to this question in the thread below:

    https://forums.slimdevices.com/showt...-is-turned-off

    I will post my progress (when I make any!).

  7. #7
    Senior Member
    Join Date
    Jun 2009
    Posts
    149
    Why don't you use the command "sudo ifconfig eth0 up" in your script instead of "sudo reboot"?

  8. #8
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    2,576
    Quote Originally Posted by popliviustefan View Post
    As far as my expertise goes, this seems to be a OS issue, not an application issue. But I'm not a proficient enough linux user to diagnose it.
    I haven't seen your issue on pCP ever. As there are thousands of pCP's out there if there was a wired Ethernet issue lots of people would have let us know.

    I think its more likely to be a network issue, something unique setting on your router, maybe clashing IP addresses, or as P Nelson suggested something wrong with DHCP?

    regards
    Greg

  9. #9
    Senior Member
    Join Date
    May 2017
    Posts
    840
    Or a malfunction cable/connector/wall socket
    SqueezeBoxes: 1x Transporter (Living room) 1x SB2 (shed), 1x Radio (Kitchen), 1x Boom (Dining room), 1x piCorePlayer (jacuzzi), 1x piCorePlayer (Garden) 1x OSMC + Squeezelite (Movie room), 1x Touch (Study 2), few spare unit's (SB2, SB3, Boom, Touch)
    Server: LMS on Pi3B+ 8.1.2 on PcP 7.0.1
    Network: Draytek, Netgear Smart Switch 24p, Ubiquiti PoE, 3x Ubiquity

  10. #10
    jd68

    Why don't you use the command "sudo ifconfig eth0 up" in your script instead of "sudo reboot"?
    I tried with reboot because I also used triggerhappy plugin to be able to use prev/next/pause buttons from the remote and apparently only bringing up eth0 left triggerhappy not working.


    Greg Erskine

    I think its more likely to be a network issue, something unique setting on your router, maybe clashing IP addresses, or as P Nelson suggested something wrong with DHCP?
    I thought about that also, but I use a static IP outside the range of where DHCP allocates new addresses, so this shouldn't be an issue.

    edwin2006

    Or a malfunction cable/connector/wall socket
    Not 100% sure, but I would presume a connector/power issue would manifest rather differently - more likely to completely block the pi, or restart it...


    So, I didn't make any progress on the pi3. Problem disappeared when I replaced the pi3 with a pi4.
    I would have tried this earlier, but these days getting your hands on a pi board seems to be a non-trivial task.
    I finally got it 3 days ago and it runs fine ever since.

    I also solved the problem of the system not working when speakers are connected/disconnected from the pi by following the advice found here:
    https://forums.slimdevices.com/showt...=1#post1009334

    Thread is quite long, so I posted the link to the post where @chill offered a ready-made solution.

Tags for this Thread

Posting Permissions

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