Posts by mtrcycllvr

    WOW - okay - this is SOLVED, (Happy dance! :thumbup: ) but only by VARIATIONS on all the help quoted above and so many repetitions my head is spinning. Let me, for the record, detail EXACTLY what worked here and how to repeat this with ANY blutooth remote.. Of course this is all based on my current revision of LE (12.0.0) and HW (RPi5). Your version/HW difference may be, well, different..

    Step One: REBOOT TO CLEAN SYSTEM STATE

    Code
    Livingroom:~ # reboot
    Livingroom:~ # Connection to livingroom closed by remote host.
    Connection to livingroom closed.
    $USERNAME@MacBook-Pro ~ %

    Step Two: LOGIN AS ROOT, STOP KODI (required to run evtest below!!)

    Code
    $USERNAME@MacBook-Pro ~ % ssh root@livingroom
    ##############################################
    #                 LibreELEC                  #
    #            https://libreelec.tv            #
    ##############################################
    LibreELEC (official): 12.0.0 (RPi5.aarch64)
    Livingroom:~ # systemctl stop kodi
    Livingroom:~ #

    Step Three: RUN journalctf -f (control -c when output stops!)

    Step Four: USE THE REMOTE - Just poke it a few times to make sure it's sending and LE is listening!

    Step Five: RUN /storage/.kodi/addons/virtual.system-tools/bin/evtest

    (example WITHOUT having used remote first!)

    Code
    Livingroom:~ # /storage/.kodi/addons/virtual.system-tools/bin/evtest
    No device specified, trying to scan all of /dev/input/event*
    Available devices:
    /dev/input/event0:    vc4-hdmi-0 HDMI Jack
    /dev/input/event1:    vc4-hdmi-1 HDMI Jack
    /dev/input/event2:    pwr_button
    Select the device event number [0-2]: ^C
    Livingroom:~ #

    (Example WITH "priming" the remote as you need to do to get this to work!!)

    Code
    Livingroom:~ # /storage/.kodi/addons/virtual.system-tools/bin/evtest
    No device specified, trying to scan all of /dev/input/event*
    Available devices:
    /dev/input/event0:    vc4-hdmi-0 HDMI Jack
    /dev/input/event1:    vc4-hdmi-1 HDMI Jack
    /dev/input/event2:    pwr_button
    /dev/input/event3:    UR02 Keyboard
    /dev/input/event4:    UR02 Mouse
    Select the device event number [0-4]:

    Choose the "Keyboard" device!!

    Code
    Select the device event number [0-4]: 3
    Input driver version is 1.0.1
    Input device ID: bus 0x5 vendor 0x508 product 0x1980 version 0x0
    Input device name: "UR02 Keyboard"
    --omitted output here (lots!)--
    Testing ... (interrupt to exit)

    Step Six: PRESS THE GOSH DARNED "OK" KEY on your remote that giving us all such a headache!! (just once, then ctl-c out)

    Code
    Testing ... (interrupt to exit)
    Event: time 1721363468.555115, type 20 (EV_REP), code 0 (REP_DELAY), value 500
    Event: time 1721363468.555115, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0041
    Event: time 1721363468.555115, type 1 (EV_KEY), code 28 (KEY_ENTER), value 1
    Event: time 1721363468.555115, -------------- SYN_REPORT ------------
    Event: time 1721363468.704544, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0041
    Event: time 1721363468.704544, type 1 (EV_KEY), code 28 (KEY_ENTER), value 0
    Event: time 1721363468.704544, -------------- SYN_REPORT ------------
    ^C
    Livingroom:~ #

    Step Seven: RUN cat /proc/bus/input/devices |grep Sysfs

    Code
    Livingroom:~ # cat /proc/bus/input/devices |grep Sysfs
    S: Sysfs=/devices/platform/soc/107c701400.hdmi/sound/card0/input0
    S: Sysfs=/devices/platform/soc/107c706400.hdmi/sound/card1/input1
    S: Sysfs=/devices/platform/pwr_button/input/input2
    S: Sysfs=/devices/virtual/misc/uhid/0005:0508:1980.0001/input/input3
    S: Sysfs=/devices/virtual/misc/uhid/0005:0508:1980.0001/input/input4
    Livingroom:~ #

    Step Eight: COALATE REQUIRED INFORMATION!!

    From /proc/bus/input/devices, you want the ling that looks like this:

    Code
    S: Sysfs=/devices/virtual/misc/uhid/0005:0508:1980.0001/input/input3

    You can ALSO grope around in the output of /storage/.kodi/addons/virtual.system-tools/bin/evtest for this data:

    Code
    Select the device event number [0-4]: 3
    Input driver version is 1.0.1
    Input device ID: bus 0x5 vendor 0x508 product 0x1980 version 0x0
    Input device name: "UR02 Keyboard"

    Which is translated in this line/format: Use 0005 as Bus, 0508 as Vendor and 1980* as Product:

    Code
    evdev:input:b0005v0508p1980*

    From the output of evtest, you want to use the "EV_MSC" and EV_SCAN output value, the LAST thing on the line:

    Code
    Event: time 1721363468.555115, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0041

    Which is translated thus: (NOTE THE LEADING SPACE!!!) I had missed this and it forked me for a bit.. :cursing:

    Code
     KEYBOARD_KEY_c0041=enter

    Step Nine: Create a file: /storage/.config/hwdb.d/99-$SOMESTRING.hwdb
    Put these two lines you coalated from all this data into a file - essentially ANY file, but in startup.d name format in the /storage/.config/hwdb.d/ directory.
    Use anything you like for "$SOMESTRING" I used date related to my brand of remote. Format it as the example below.
    AGAIN, NOTE THE LEADING SPACE on the "KEYBOARD" line!! (the forum SW nicely trims this for us - so it was difficult to figure this little tidbit out!! It's CRITICAL!!) Credit Chewitt for plainly showing me, and me for blowing it at first.. :cursing:

    Code
    Livingroom:~ # cat /storage/.config/hwdb.d/99-UR02.hwdb
    evdev:input:b0005v0508p1980*
     KEYBOARD_KEY_c0041=enter
    Livingroom:~ #

    Step Ten: RUN /usr/bin/systemd-hwdb (Other posts list "udevadm hwdb --update", which works, but is depreciated..)

    Code
    Livingroom:~ # systemd-hwdb update
    Livingroom:~ # 

    Step Eleven: RUN /usr/bin/udevadm

    Code
    Livingroom:~ # udevadm trigger -s input
    Livingroom:~ # 

    Step Twelve: RESTART kodi!!

    Code
    Livingroom:~ # systemctl start kodi
    Livingroom:~ #

    Step Thirten: TEST!! Does it work - it did for me - it should for you! Congratulations!

    This was one of the most difficult things about kodi to figure out that I've ever encountered (Mostly because I can't read!! ^^ ) - and there are SO MANY FORUM ENTRIES ABOUT IT, but they seem a little scattered and none have the process listed from end to end, soo... Chewit detailed the leading space issue, but I missed it - dumb ass me. Hiassoft pointed me to a previous post that listed "udevadm hwdb --update" which is depreciated now and replace with systemd-hwdb.. Both work, but we should use the current stuff, right?

    Anyway, A SUPER SHOUTOUT to both ChewitT and HiassofT for their great assistance - could NOT have got it done without you!

    Hope this summary helps the next person in line that sees a deal in a cheap BT remote from AliExpress!!

    Time to watch a movie!!

    :D:P^^

    Thanks, Chewitt!

    I've set up the file and tried a number of "c00$CODE" string variations - rebooting after each variation. So far, no luck..

    I had originally named the file "70-local-keyboard.hwdb", but as it's the ONLY init file in the hwdb.d directory, the file name hardly seems to matter.. (I updated it to your suggestion..)

    Code
    Livingroom:~ # cat /storage/.config/hwdb.d/99-UR02.hwdb
    evdev:input:b0005v0508p1980*
    KEYBOARD_KEY_c0096=enter
    Livingroom:~ #

    I've tried all the "enter" codes, and a few others including the c0041 quoted in the original article just for fun..

    I'll keep going down the list.. What heck - there are only a couple hundred possibilities, right? :D

    I'll report back if I figure out the right mix..

    Thanks for helping me at least figure out that I' on the right path here!

    Sincerely,

    -ET-

    Thank you, Chewitt!

    That got me a little further, but I'm not 100% sure how or if I can use the information gleaned. First, here's the output of "evtest" after a clean reboot, then running "journalctf -f"


    I think the key here is:

    Code
    Input device ID: bus 0x5 vendor 0x508 product 0x1980 version 0x0
    AND from "cat /proc/bus/input/devices" 
    S: Sysfs=/devices/virtual/misc/uhid/0005:0508:1980.0001/input/input4

    ...which sort of matches this format;

    Code
    evdev:input:b0003v4842p0001*

    ..ie; a bus, a vendor and a product:

    "evdev:input:b0005v0508p1980*"

    But now I'm confused about the keycode part? grep'ing on "enter", I see:

    Code
    Select the device event number [0-4]: 3
       Event code 28 (KEY_ENTER)
       Event code 96 (KEY_KPENTER)
    ^C
    Livingroom:~ #
    Code
    (the example code)
    KEYBOARD_KEY_c0041=enter

    So, my theoretical at this point might be:

    evdev:input:b0005v0508p1980*
    KEYBOARD_KEY_c0028=enter

    The problem is I have a button labeled "OK", but there's no "OK" string in any of this output, soooo... Which keyboard key is it that I'm trying to map to the action "enter"? Sigh - so very close..

    When I run evtest to interactively watch my remote input, I keep getting this message and nothing is output:

    Code
    ***********************************************
     This device is grabbed by another process.
     No events are available to evtest while the
     other grab is active.
     In most cases, this is caused by an X driver,
     try VT-switching and re-run evtest again.
     Run the following command to see processes with
     an open fd on this device
    "fuser -v /dev/input/event3"
    ***********************************************

    ...So I have discovered the device, but now I can't see the key events to nail down the final mapping?

    I've been using a Rii-25 wireless remote - it's a piece of crap. I foolishly purchased another one and it, too, is a piece of crap. The issue is horrible keybounce, you simply CANNOT get a key to fire only ONCE - it's always two or ever three times. Like Neil Young sings, "Piece of CRAP!"

    So, having a new RPi5 with built in bluetooth capabilities, I took a chance on a simple UGOOS BT Remote Control UR02 from Ali Express.. I figured I could risk $12 US.

    I received the remote, I got it to pair, and BINGO - it works - it works and the keys DO NOT BOUNCE.. Happy dance!

    Except...

    The OK key the center of the click wheel doesn't do anything. Well, lets modify that, it will wake Kodi from the screen saver, so I know it WORKS and is sending something, but I can't use it to select menu items. Time to search the forums!

    In this thread, 26261-fix-for-xiaomi-bluetooth-remote-with-nonworking-button, there is a description of a fix that includes two lines, an EVDEV identifier (?) string and then a KEYBOARD_KEY remap statement included in one of the init files:

    Quote

    Couldn't get evtest working, but got enough information from running cat /proc/bus/input/devices

    Created the 70-local-keyboard.hwdb file with the code below and it worked OK <3

    Code
    evdev:input:b0003v4842p0001*
     KEYBOARD_KEY_c0041=enter

    In theory, I should be able to use "/storage/.kodi/addons/virtual.system-tools/bin/evtest" or "cat /proc/bus/input/devices" to help me figure out the input device, then remap the code to effect an "enter" action. That's my interpretation at any rate. I reviewed more than one forum entry and this seems like this is a common issue with Blutooth remotes. Some entries refer to this work around and some are just dead threads, but in threads with a solution all the input devices appear to have a unique "evdev:input:$STRING" entry. So how do I find this identifier as it relates to my cheap little remote? (that does NOT suffer keybounce!) 8o

    Running evtest doesn't show me anything that looks like my BT remote: (only shows the HDMI and RPi5 power button)

    Code
    Livingroom:~ # evtest
    No device specified, trying to scan all of /dev/input/event*
    Available devices:
    /dev/input/event0:    vc4-hdmi-0 HDMI Jack
    /dev/input/event1:    vc4-hdmi-1 HDMI Jack
    /dev/input/event2:    pwr_button
    Select the device event number [0-2]:
    ^C
    Livingroom:~ #

    Likewise, viewing /proc/bus/input/devices doesn't reveal anything useful to me: (again, only showing data pertinent to the HDMI ports and the integral RPi5 power switch)

    I'm feeling a little lost here... I THINK the work around is right at my finger tips, but for the life of me I can't seem to put it all together.

    I wonder if anyone has a clue how I should proceed, SPECIFICALLY, how I determine the "evdev:input:$STRING" that would apply to my bluetooth device.

    Thanks so much for any and all input!

    Sincerely,

    -ET-

    YES!! Thank you so much, Popcornmix - the thread referenced and the cure quoted is indeed the fix for my problem!


    I can now confirm I can power off my TV/Receiver without, leaving the RPi5 media player on and it does NOT force a power back on..

    My home automation "scenes" that turn the TV off are working again.

    Thank you so much - I'm embarrassed my search of the thread base didn't turn that up - apparently my search-foo is quite weak!

    :)

    Hello all!

    I have recently upgraded all my RPi3 media players (running LE 9.2.8) to RPi5/LE 12.0.0 stable..

    My living room is very typical: Vizio M50-C1 (ARC HDMI) <-> Denon AVR-s720w <-> RPi5 (HDMI 0)

    What USED to happen was something like: It's late, I'm going to bed, use Vizio remote to power off TV, which powered off the Denon receiver and left the RPi3/LE 9.2.8 media player on.. This is perfect behavior for my use as the CEC driver let me use the TV remote to run things and left the RPi on all the time.

    But now, after the upgrade, the first thing that caught me by surprise was I couldn't reboot the PRi5 without powering down the chain of devices, which then brought the RPi5 up in headless mode because it couldn't see anything as it had just powered them all off.. I investigated the default CEC settings, adjusted a few and that problem no longer occurs... BUT.. (there's always a 'but', right?)

    Now, when I power off the TV and get up to go to bed, the TV/Receiver is coming back on again after about 15 seconds. I cannot for the life of me see a CEC setting that might cause this behavior.. I can manually use the RPi5 power button to power it down, then power off the TV/receiver, but then when I want to power up I have to physically reach out (or get up and walk over to, which is a challenge as I'm crippled) and physically power on the RPi5.

    I have confirmed that the CEC driver is at the root - if I disable it, I can power off the TV/Receiver and the RPi5 stays on, which is my desired state. But I'd really like to be able to use the TV remote to drive everything as it's a pretty nice remote. (backside keyboard/back lighting and the like)..

    Can someone suggest a CEC setting that might be behind this behavior that I can adjust to be able to power off the TV/Receiver without the PRi5/CEC detecting this and powering it all back on again without any input from me?

    Thanks so much for your thoughts - this forum has been incredibly useful (I did a search on this, by the way!) and always seems so responsive..

    -ET-


    OH, I'm sorry - the current CEC setting might be useful, right?

    Current settings:

    Hi CvH!

    Uhm - I THINK I upgraded that 9.2 unit to LE12, and suspect that as a result the logs are toast? Let me look around and see if I can confirm that.. I already dedicated the RPi3 HW to a new task, but I should have another one around here someplace..

    VERY happy to help - I'm sure I can re-create a LE9.2.8 instance and run it through a few addon installs and ship you the logs.

    I'm sort of questioning your logic - I had clearly multiple installs all not working, then after a router reboot, ALL started working, which REALLY implies the issue was here local to me. At least it would appear that way on the surface.

    I will admit that after I "got it working", I ended up with four LE12 instances that I was hitting the repositories pretty hard, and I'm certain in one case I had troubles till the next morning, which supports your "rate limit by IP" statement..

    I should note that I have a business class ISP with a fixed IP to support postfix.. So I get the same outward facing IP address every time and it hasn't changed in man years.

    Give me a bit to rummage around and I'll see what I can send you..

    Sincerely,

    -ET-

    Update.. Okay, in a fit of desperation, I rebooted my router. At least some repositories are now working again..

    Why? Not the slightest clue in the world.. My HINT was reviewing the logs and seeing that Kodi was making requests from high number ports vs. just straight from secure http on 443.. Was my router somehow bungling these high port requests? Apparently..

    Code
    connect to 116.203.139.247 port 443 from 192.168.100.47 port 45494 failed:

    so, I guess close this thread as 'solved'...

    Hello, back at this today and am MORE CONFUSED THAN EVER..

    I have tried the following matrix:

    HW LE vers Kodi LE
    ----- --------- ---- ---
    RPi 5 LE 12.0.0 yes no
    PRi 5 LE 11.0.6 no no
    RPi 3 LE 9.2.8 yes ?? Can see LE repository packages, can't install any?
    RPi 3 LE 10.0.4 no no

    The RPi3 LE v9.2.8 is my existing livingroom media player - working fine AT ONE POINT.. I can tell that because it has a cache of LibreElec repository entries, but when I try to install one, most specifically Network Tools, the install fails.

    So.. I have multiple different pieces of hardware, running multiple existing and newly flashed LE versions and NONE OF THEM can get to the LibreElec addon repository..

    I'm at the end of my rope - I have disabled my PiHole server, but I can't see that was EVER an issue as it's just a DNS resolver and we can tell from the existing logs that DNS resolution is not the problem - I can resolve the IP address of the repositories just fine.

    So what could possibly be going on here? There's nothing special about my router - A Mikrotik RB951. I'm using non-tagged (no vlans) direct Ethernet connections (multiple drops).. Why am I having issues installing packages from the official repositories?

    The fact that my existing installs had cached lists of packages to install shows that it USED to work?

    Okay, sorry for the confusion there - i just power cycled, changed HDMI ports and reran - same results:



    getting late for me - need to eat and get some sleep - will revisit this thread tomorrow..

    THANK YOU SO MUCH for the troubleshooting hints, I really appreciate the time and support!

    Sincerely,

    -ET-

    This looks relevant:

    2024-06-23 21:22:29.006 T:1175    error <general>: CRepository: failed read 'https://addons.libreelec.tv/12.0.0/ARMv8/aarch64/addons.xml.gz.sha256'

    I do have pihole running in my home, but I checked the logs there and addons.libreelec.tv was and is allowed to resolve.. WHich I can verify with dig:

    When I try just pointing my browser at it, I get nothing back..

    -ET-


    Oh, thanks for the HDMI hint! Totally new to the RPi5! ;)


    Oh, woops! going too fast - missed the MUST RUN from LE device! Give me a moment...


    Hello!

    I'm the proud new owner of a RPi5 configured with a small NVMe SSD running LE 12.0.0 freshly downloaded from the 'stable' downloads page.. I'm attempting to upgrade from a RPi3 and LE 9..

    I use the network tools AddOn, specifically rsync to update my media library from my master store..

    I've looked at the thread Add-On Repository Problems 2024/03 post that seems to be pinned, and describes my problem, but I can't seem to find a fix that applies to my situation.

    Fresh install, NTP working fine, date looks good, DNS seems okay, other AddOns working okay, wired Ethernet network. Well, I was surprised I can't find any additional skins as well? I was sort of excited to try some of the more complicated skins that somewhat bog down an PRi3/flash config, but I'm not certain that's related to the missing LE repository..

    Should I perhaps try rolling back to LE 11?

    Thanks so much!

    I just de-installed a 12TB disk and replaced it with a 20TB disk. I can apply an ext4 filesystem on it, but I cannot mount it and LibreElec is not automounting as I expected.

    Have I hit a 32bit architecture limitation?

    I thought, well, perhaps if I partition it, but all attempts at using parted to manually create labels and partitions have utterly failed..

    I have two of these sort of "all in one" systems, a case, SATA controller, and big SATA disk with a RPi3 - I have one for SURE that is working with a 16TB disk without issue.. I just sort of assumed that an increment to 20TB under ext4 would be just as straight forward?

    Geekworm X832-C1 Metal Case Compatible with Raspberry Pi 4 & X832 V1.2 3.5" SATA Storage Board & X735 Power Management Board (Not Support X832 V1.0/X835)
    This is a Geekworm deisgn metal case with latching power control switch and super mute 4010 cooling fan for Raspberry Pi 4 , X835 3.5" SATA Storage Board and…
    www.amazon.com

    Any ideas?

    Thanks!

    And, now that I've upgraded from 9.2.8 to 10.0.3, I can't relable the drive as mkfs.ext4 thinks the drive is mounted, which it is not..

    Code
    TrailerTrash:~ # mkfs.ext4 -F -I 128 -i 67108864 /dev/sda
    mke2fs 1.45.6 (20-Mar-2020)
    /dev/sda is apparently in use by the system; will not make a filesystem here!
    TrailerTrash:~ # mkfs.ext4 /dev/sda
    mke2fs 1.45.6 (20-Mar-2020)
    /dev/sda is apparently in use by the system; will not make a filesystem here!
    TrailerTrash:~ #

    I am utterly baffled at this point. The upgrade to 10.0.3 broke my ability to, say, jack with number of inodes or up the block size to perhaps bring things back within limits..

    Thanks for any thoughts!

    -ET-

    Hello all!

    I purchased a ROCKpro64, one of their handy NAS cases and a PCIe SATA card.

    Combining all of the above results in a very expensive SBC that can't see the SATA disk. I found a vague reference to the stock PCIe card being contentious, so I replaced that, but no go - same symptoms.

    The hardware WORKS - when I load up, say, Ubuntu, there is a 9.1TB /dev/sda that I can and did newfs without issues.

    But LibreElec (multiple builds for the ROCKpro64) all refuse to see the SATA disk.

    I'd just use a USB to SATA converter, but there are no INTERNAL USB ports and I don't want an external cluster **** of cables - that was the ENTIRE point of this exercise - a SINGLE box with all my media that works off of 12VDC for my RV like thing far away from the clutches of the internet..

    The output of:

    Code
    blkid
    mount
    dmesg

    ... can be found here: libreelec_sata_missing - Pastebin.com

    My sincere thanks for any thoughts about why this device which SEEMS very nice on paper isn't working the way I would expect it too?

    Sincerely,

    -ET-