Home of the Squeezebox™ & Transporter® network music players.
Page 27 of 28 FirstFirst ... 1725262728 LastLast
Results 261 to 270 of 275
  1. #261
    Junior Member
    Join Date
    Dec 2017
    Posts
    12

    PiCorePlayer 5.0 fresh install with sbpd

    Hi,

    after two trials with fresh PiCorePlayer 5.0 setup and sbpd (from piCorePlayer repository) - cannot get it working:

    sudo /usr/local/sbin/sbpd -d -s b,24,POWR,2,0,NEXT,300

    Command returns without error, but button is not working. Same command line with PiCorePlayer 4.1 is working fine.

    Next try: Upgrade Install from 4.1 ... Tried: No good way (squeezlite not starting).

    Any help?

    thanks and regards
    Aki
    Last edited by Aki7; 2019-10-04 at 04:31.

  2. #262
    Quote Originally Posted by Aki7 View Post
    Hi,

    after two trials with fresh PiCorePlayer 5.0 setup and sbpd (from piCorePlayer repository) - cannot get it working:

    sudo /usr/local/sbin/sbpd -d -s b,24,POWR,2,0,NEXT,300

    Command returns without error, but button is not working. Same command line with PiCorePlayer 4.1 is working fine.

    Next try: Upgrade Install from 4.1 ... Tried: No good way (squeezlite not starting).

    Any help?

    thanks and regards
    Aki
    Maybe you could try to run the command with verbose (-v) to see if the button presses are actually registered.

    sudo /usr/local/sbin/sbpd -d -v -s b,24,POWR,2,0,NEXT,300

    Br Jursi

  3. #263
    Junior Member
    Join Date
    Dec 2017
    Posts
    12
    Hi Jursi,

    thanks.

    tc@pcTest5:~$ sudo /usr/local/sbin/sbpd -v b,24,POWR,2,0,NEXT,300
    ...
    1570738211.9278 6 GPIO.c,312: Initializing GPIO
    1570738211.9287 3 sbpd.c,202: Could not connect to pigpiod. Is it running?

    Seems pigpiod is missing. Tried installing pigpio-dev.tcz from the pcp-repository without success (after reboot):

    ..
    1570738751.0564 6 GPIO.c,312: Initializing GPIO
    1570738751.0578 3 sbpd.c,202: Could not connect to pigpiod. Is it running?

    Ok, just found your script in this threat, tested, but seems to accept the POWR button only once - switches off.
    Long keypress is working (NEXT) and short keypress (POWR) is working after it. But after this no more acceptance of any key press.
    Can switch back to "On" via browser interface, but audio is at very slow speed after it (low pitch).
    So something special happens after POWR-button (off) with pcp 5.0

    Regards Aki
    Last edited by Aki7; 2019-10-10 at 13:40.

  4. #264
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,355
    Quote Originally Posted by Aki7 View Post
    1570738211.9287 3 sbpd.c,202: Could not connect to pigpiod. Is it running?

    Seems pigpiod is missing. Tried installing pigpio-dev.tcz from the pcp-repository without success (after reboot):
    It's not missing, but you have to load it before you call sbpd. See this post above.

  5. #265
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,355
    Quote Originally Posted by Aki7 View Post
    Ok, just found your script in this threat, tested, but seems to accept the POWR button only once - switches off.
    Long keypress is working (NEXT) and short keypress (POWR) is working after it. But after this no more acceptance of any key press.
    Can switch back to "On" via browser interface, but audio is at very slow speed after it (low pitch).
    So something special happens after POWR-button (off) with pcp 5.0
    That doesn't seem right. The default sbpd_commands.cfg has an entry for the POWR command that simply toggles the player's 'soft' power. Is it possible that you are instead calling a shutdown script? What does your sbpd_commands.cfg look like?

  6. #266
    Junior Member
    Join Date
    Dec 2017
    Posts
    12
    chill,

    thanks.

    justed started again with fresh pcp 5.0
    installed pcp-sbpd.tcz from pcp-repo, reboot.
    sudo pigpiod - this time player stops playing
    soft power on via browser - playing again, but with low pitch (slow) sound

    sudo vi sbpd_commands.cfg - seems to be empty
    Do i have to copy it from .. ?

    give up for tonight.

    regards Aki

  7. #267
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,351
    Quote Originally Posted by Aki7 View Post
    soft power on via browser - playing again, but with low pitch (slow) sound
    This sounds like you have interfaced a button with a GPIO that is being used by your DAC. What DAC are you running ?
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  8. #268
    Junior Member
    Join Date
    Dec 2017
    Posts
    12
    Paul,

    Thanks, same HW-setup is running fine with pcp 4.1

    Pi 3b+
    Allo boss

    Regards Aki

  9. #269
    Junior Member
    Join Date
    Jan 2019
    Posts
    3
    Quote Originally Posted by Aki7 View Post
    Thanks, same HW-setup is running fine with pcp 4.1
    I am having a similar issue with a RPi zero and HiFiBerry MiniAMP. It works fine with pcp 4.1, but not with 5.0.

    If I start the script mentioned above I get a strange pitch in the output and the buttons / rotary controls do not work.

    Update:
    It seems, that seems to be causing the error: If I start it, the sound gets distorted - as soon as I stop it everything goes back to normal. The sound is slowed down as if the CPU weren't fast enough.
    Last edited by DOliana; 2019-10-19 at 13:17. Reason: Update with additional info

  10. #270
    Junior Member
    Join Date
    Nov 2019
    Posts
    2

    Music Stops?

    I having similar issues to Aki7 and DOliana, though also some successes:

    1. As soon as I run pigpiod on the test player (which requires sudo? Otherwise I get "Sorry, you don't have permission to run this program. Try running as root, e.g. precede the command with sudo") the music cuts out on that player.

    2. In addition to above, as soon as its enabled on the test player the music stream to other players skips rather frequently (like every second). The sound doesn't actually cut out, but it just skips ahead a few milliseconds constantly. As soon as I kill the test player, the music returns to normal. Turning off the other players and using just the test player (and the server pi) doesn't change the behavior.

    3. The buttons and encoder worked right away manually using the commands that Chill suggested (though running it as a script didn't work due to the need of sudo for pigpiod?). Play/pause and next/prev work audibly across the server as desired and even though there is no sound coming out of the unit, I can see the volume setting go up and down by watching the test player's status on the browser.

    I have the server running on a Pi 3B+, the test player is a pi zeroW, and other players are pi zeroWs too (running the older wiringpi version, which works flawlessly). The pi zeroWs (both the test and regular) are connected to i2s style DACs/Amps (Pimoroni pHAT DAC, Adafruit AMP bonnet). I have confirmed via pinout.xyz that there are no shared pins between my button/encoder setup and these HATs.

    FYI in case others want to try I'm using:
    Code:
    sbpd b,25,PLAY,2 b,4,NEXT,2 b,26,PREV,2 e,6,5,VOLU,4
    Any help would be appreciated (or just a way to fall back to the old version, which is no longer available?). I'm happy to run some tests on this hardware if needed. I don't have a pi 4.


    ----- UPDATE: ----
    I found this https://forums.pimoroni.com/t/issue-...oode-6-3/11875

    I did what they sort of recommended, issuing the pigpiod command with -t 0, which turns the clock from PCM to PWM. This solved all of my previous issues and sound now plays normally across all devices, buttons & encoders work, etc. YAY!

    Note that unlike the user in that post, i don't utilize an IR remote, so that issue is of no impact to me.

    However, i'm not sure if this has other repercussions or was the intended behavior? Someone with more knowledge than me may be able to answer. I just got a little worried when i read the final comment: "I’m thinking the use of any DAC for sound is going to have the same problem, they all use i2s, as far as I know anyway." (and i'm pretty sure the vast majority of the DAC options use i2s).

    FYI this is the script i use now (works on boot, based on Chill's script):
    Code:
    #!/bin/sh
    
    # start pigpoid daemon
    pigpiod -t 0
    
    # give the daemon a moment to start up before issuing the sbpd command
    sleep 1
    
    # load uinput module, then set the permission to group writable, so you 
    # don't need to run sbpd with root permissions
    sudo modprobe uinput
    sudo chmod g+w /dev/uinput
    
    # issue the sbpd command
    sbpd b,25,PLAY,2 b,4,NEXT,2 b,26,PREV,2 e,6,5,VOLU,4
    I did chmod +x it, not sure if that is necessary or not.

    Note that there is no conflict between this unit and older units that are running the wiring pi version. Both work simultaneously.

    -- one last edit: --
    i tested the script without sudo on the pigpiod command and it still works fine. I'm not sure why this doesn't work when just manually launching things (rather than script), but my lack of linux knowledge is showing... i've updated my script above accordingly.
    Last edited by Krazystar; 2019-11-04 at 20:59. Reason: New information

Posting Permissions

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