Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24
  1. #11
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,110
    Those issues are really fun to track down. Pretty sure that is a gcc10 compatibility issue with the code. I'll take a look this weekend to see if I can help you out.

    I looked at your python code too. Do you know how consistent those buttons are across devices. I've never had time to research doing that, but of course its been asked many times.


    I already have urllib3 package built, and I think I have requests too.. I'm doing things with these at work. (I use pCP as my base OS for little embedded projects at work)
    Last edited by paul-; 2021-04-23 at 11:59.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  2. #12
    Senior Member
    Join Date
    Mar 2017
    Posts
    2,885
    Quote Originally Posted by paul- View Post
    I looked at your python code too. Do you know how consistent those buttons are across devices.
    To be honest, I have no idea. But, they seem reasonable to me. I stumbled upon them when looking for AVRCP support.

    Quote Originally Posted by paul- View Post
    I already have urllib3 package built, and I think I have requests too.. I'm doing things with these at work. (I use pCP as my base OS for little embedded projects at work)
    The main missing dependency is evdev - as wget could be used for the JSONRPC calls (as the current code does).
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

  3. #13
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,110
    Well it compiles fine in the upcoming pCP 8 That's all I have handy to me here at work. I'll check it out.

    I have a handful of bluetooth devices, I'll do some tests too.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  4. #14
    Senior Member
    Join Date
    Mar 2017
    Posts
    2,885
    Quote Originally Posted by paul- View Post
    Well it compiles fine in the upcoming pCP 8 That's all I have handy to me here at work. I'll check it out.

    I have a handful of bluetooth devices, I'll do some tests too.
    I've only have 2 types of BT speakers; a cheap Chinese waterproof speaker for the shower, and a JBL Go2 - both these work fine with the keycodes. There's also keycodes for volume buttons (evdev.ecodes.KEY_VOLUMEUP, evdev.ecodes.KEY_VOLUMEDOWN) - but as the buttons on my speakers affect the hardware volume I was unsure about passing onto LMS. Guess it'd be good if LMS's volume controls could set the hardware volume, and have these volume button presses feed back to LMS so that it can update the display?
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

  5. #15
    Member
    Join Date
    May 2011
    Location
    Utrecht, The Netherlands
    Posts
    52

    Material app?

    Hi cp73, would it be possible/difficult to have the LMS Material (Android) app also listen to these Bluetooth keycodes?
    I've just discovered SqueezePlayer & in combination with Material it's a great way to listen with my phone through headphones, but it would be even greater if you could skip songs with the headphone button.
    (Sorry if this is perceived as thread hijacking, but I felt it was really connected).

    Cheers, Randy

    Quote Originally Posted by cpd73 View Post
    I've only have 2 types of BT speakers; a cheap Chinese waterproof speaker for the shower, and a JBL Go2 - both these work fine with the keycodes. There's also keycodes for volume buttons (evdev.ecodes.KEY_VOLUMEUP, evdev.ecodes.KEY_VOLUMEDOWN) - but as the buttons on my speakers affect the hardware volume I was unsure about passing onto LMS. Guess it'd be good if LMS's volume controls could set the hardware volume, and have these volume button presses feed back to LMS so that it can update the display?
    1x Classic / 2x Radio / 2x Receiver / LMS 8.0.0 - 1603862260 on HP Proliant N54L with Ubuntu 16.04 LTS
    http://www.last.fm/user/rndr

  6. #16
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,110
    going to need some more research here.

    Need to figure out how to connect the bluetooth controls to the kernel HID(evdev) interface. Most of the tools are for a full desktop environment.

    Any thoughts cpd73?
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  7. #17
    Senior Member
    Join Date
    Mar 2017
    Posts
    2,885
    Quote Originally Posted by paul- View Post
    Need to figure out how to connect the bluetooth controls to the kernel HID(evdev) interface.
    Why do you need to do that? The code I posted was originally taken from https://github.com/liamw9534/mopidy-...vtdev/agent.py and works under Raspian / RaspberryPiOS
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

  8. #18
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,110
    Because evdev requires the device to show under /dev/input/... Which is not done by just making a bluetooth connection alone.

    There is some other software interaction or udev rule that does something.
    Last edited by paul-; 2021-04-24 at 11:41.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  9. #19
    Senior Member
    Join Date
    Mar 2017
    Posts
    2,885
    Quote Originally Posted by paul- View Post
    Because evdev requires the device to show under /dev/input/... Which is not done by just making a bluetooth connection alone.

    There is some other software interaction or udev rule that does something.
    Ah, fair enough. Must admit I have only tested this on raspbian. I tried, and failed, to install evdev on pCP, so never got round to testing there. Can't see anything BT specific in /etc/udev under raspbian.
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

  10. #20
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,110
    I'll have to install raspbian at some point.

    I'll pushed up python3.8-evdev.tcz to the repo (at least for 32bit). It compiled clean for me, not sure what was causing your error.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

Posting Permissions

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