kobo-btpt icon indicating copy to clipboard operation
kobo-btpt copied to clipboard

Trouble getting a working config file for page turner

Open dotknott opened this issue 1 year ago • 15 comments

I was able to get this to work with an 8bit do (thanks!) but I'm having trouble with an actual page turner remote.

This is the output from evtest on one of the buttons

    Event: time 1727544179.140229, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042

    Event: time 1727544179.140229, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
    Event: time 1727544179.140229, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 1
    Event: time 1727544179.140229, type 3 (EV_ABS), code 1 (ABS_Y), value 1012
    Event: time 1727544179.140229, -------------- SYN_REPORT ------------
    Event: time 1727544179.162618, type 3 (EV_ABS), code 1 (ABS_Y), value 1100
    Event: time 1727544179.162618, -------------- SYN_REPORT ------------
    Event: time 1727544179.196340, type 3 (EV_ABS), code 1 (ABS_Y), value 1400
    Event: time 1727544179.196340, -------------- SYN_REPORT ------------
    Event: time 1727544179.218819, type 3 (EV_ABS), code 1 (ABS_Y), value 1700
    Event: time 1727544179.218819, -------------- SYN_REPORT ------------
    Event: time 1727544179.252624, type 3 (EV_ABS), code 1 (ABS_Y), value 2000
    Event: time 1727544179.252624, -------------- SYN_REPORT ------------
    Event: time 1727544179.286362, type 3 (EV_ABS), code 1 (ABS_Y), value 2300
    Event: time 1727544179.286362, -------------- SYN_REPORT ------------
    Event: time 1727544179.308817, type 3 (EV_ABS), code 1 (ABS_Y), value 2600
    Event: time 1727544179.308817, -------------- SYN_REPORT ------------
    Event: time 1727544179.342749, type 3 (EV_ABS), code 1 (ABS_Y), value 2900
    Event: time 1727544179.342749, -------------- SYN_REPORT ------------
    Event: time 1727544179.376457, type 3 (EV_ABS), code 1 (ABS_Y), value 3200
    Event: time 1727544179.376457, -------------- SYN_REPORT ------------
    Event: time 1727544179.398873, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
    Event: time 1727544179.398873, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
    Event: time 1727544179.398873, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 0
    Event: time 1727544179.398873, -------------- SYN_REPORT ------------
    Event: time 1727544179.398957, type 3 (EV_ABS), code 1 (ABS_Y), value 3500
    Event: time 1727544179.398957, -------------- SYN_REPORT ------------

but I can't seem to get the page turn to trigger with this device on the kobo.

I thought that this would do it:

    prevPage EV_ABS ABS_Y 1012

but it doesn't seem to do anything. Am I missing a step, or can these page turning devices not be used?

dotknott avatar Sep 28 '24 19:09 dotknott

I have the same output from evtest and cannot get it to work. Did you found a solution?

rootiam avatar Oct 03 '24 10:10 rootiam

I have the same output from evtest and cannot get it to work. Did you found a solution?

I have not. Though I did find this in the closed issues: https://github.com/tsowell/kobo-btpt/issues/1#issuecomment-1086887433

I'm not sure I understand how the user went from nextPage EV_MSC MSC_SCAN 90002 to prevPage 1 272 1

dotknott avatar Oct 03 '24 13:10 dotknott

I'm not sure I understand how the user went from nextPage EV_MSC MSC_SCAN 90002 to prevPage 1 272 1

Yeah I don't get that either.

I tried so many different configurations and I don't get it working.

This is my evtest output:

pi@bf199:~ $ evtest
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0:	vc4-hdmi
/dev/input/event1:	vc4-hdmi HDMI Jack
/dev/input/event2:	D01
Select the device event number [0-2]: 2
Input driver version is 1.0.1
Input device ID: bus 0x5 vendor 0x5ac product 0x22c version 0x11b
Input device name: "D01"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 1 (KEY_ESC)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 116 (KEY_POWER)
    Event code 139 (KEY_MENU)
    Event code 172 (KEY_HOMEPAGE)
    Event code 320 (BTN_TOOL_PEN)
    Event code 330 (BTN_TOUCH)
    Event code 374 (KEY_KEYBOARD)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value   1904
      Min        0
      Max     4095
    Event code 1 (ABS_Y)
      Value    200
      Min        0
      Max     4095
    Event code 40 (ABS_MISC)
      Value      1
      Min        0
      Max        1
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Properties:
  Property type 1 (INPUT_PROP_DIRECT)

This is the first button:

Event: time 1727882830.593015, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1727882830.593015, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1727882830.593015, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 1
Event: time 1727882830.593015, type 3 (EV_ABS), code 1 (ABS_Y), value 1012
Event: time 1727882830.593015, -------------- SYN_REPORT ------------
Event: time 1727882830.622979, type 3 (EV_ABS), code 1 (ABS_Y), value 1100
Event: time 1727882830.622979, -------------- SYN_REPORT ------------
Event: time 1727882830.652966, type 3 (EV_ABS), code 1 (ABS_Y), value 1400
Event: time 1727882830.652966, -------------- SYN_REPORT ------------
Event: time 1727882830.682962, type 3 (EV_ABS), code 1 (ABS_Y), value 1700
Event: time 1727882830.682962, -------------- SYN_REPORT ------------
Event: time 1727882830.712957, type 3 (EV_ABS), code 1 (ABS_Y), value 2000
Event: time 1727882830.712957, -------------- SYN_REPORT ------------
Event: time 1727882830.742960, type 3 (EV_ABS), code 1 (ABS_Y), value 2300
Event: time 1727882830.742960, -------------- SYN_REPORT ------------
Event: time 1727882830.772961, type 3 (EV_ABS), code 1 (ABS_Y), value 2600
Event: time 1727882830.772961, -------------- SYN_REPORT ------------
Event: time 1727882830.802897, type 3 (EV_ABS), code 1 (ABS_Y), value 2900
Event: time 1727882830.802897, -------------- SYN_REPORT ------------
Event: time 1727882830.832959, type 3 (EV_ABS), code 1 (ABS_Y), value 3200
Event: time 1727882830.832959, -------------- SYN_REPORT ------------
Event: time 1727882830.862968, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1727882830.862968, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1727882830.862968, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 0
Event: time 1727882830.862968, -------------- SYN_REPORT ------------
Event: time 1727882830.862980, type 3 (EV_ABS), code 1 (ABS_Y), value 3500
Event: time 1727882830.862980, -------------- SYN_REPORT ------------

And the second one:

Event: time 1727882840.403047, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1727882840.403047, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1727882840.403047, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 1
Event: time 1727882840.403047, type 3 (EV_ABS), code 1 (ABS_Y), value 3200
Event: time 1727882840.403047, -------------- SYN_REPORT ------------
Event: time 1727882840.433018, type 3 (EV_ABS), code 1 (ABS_Y), value 2600
Event: time 1727882840.433018, -------------- SYN_REPORT ------------
Event: time 1727882840.462996, type 3 (EV_ABS), code 1 (ABS_Y), value 2300
Event: time 1727882840.462996, -------------- SYN_REPORT ------------
Event: time 1727882840.492997, type 3 (EV_ABS), code 1 (ABS_Y), value 2000
Event: time 1727882840.492997, -------------- SYN_REPORT ------------
Event: time 1727882840.522985, type 3 (EV_ABS), code 1 (ABS_Y), value 1700
Event: time 1727882840.522985, -------------- SYN_REPORT ------------
Event: time 1727882840.552992, type 3 (EV_ABS), code 1 (ABS_Y), value 1400
Event: time 1727882840.552992, -------------- SYN_REPORT ------------
Event: time 1727882840.582991, type 3 (EV_ABS), code 1 (ABS_Y), value 1100
Event: time 1727882840.582991, -------------- SYN_REPORT ------------
Event: time 1727882840.612991, type 3 (EV_ABS), code 1 (ABS_Y), value 800
Event: time 1727882840.612991, -------------- SYN_REPORT ------------
Event: time 1727882840.642992, type 3 (EV_ABS), code 1 (ABS_Y), value 500
Event: time 1727882840.642992, -------------- SYN_REPORT ------------
Event: time 1727882840.672984, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1727882840.672984, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1727882840.672984, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 0
Event: time 1727882840.672984, -------------- SYN_REPORT ------------
Event: time 1727882840.672997, type 3 (EV_ABS), code 1 (ABS_Y), value 200
Event: time 1727882840.672997, -------------- SYN_REPORT ------------

And this is my latest attempt on the configuration:

nextPage 1 1 1
nextPage 1 114 1
nextPage 1 115 1
nextPage 1 116 1
nextPage 1 139 1
nextPage 1 172 1
nextPage 1 320 1
nextPage 1 330 1
nextPage 1 374 1
nextPage 3 0 1904
nextPage 3 1 200
nextPage 3 40 1
nextPage 4 4 1
nextPage 1 1 0
nextPage 1 114 0
nextPage 1 115 0
nextPage 1 116 0
nextPage 1 139 0
nextPage 1 172 0
nextPage 1 320 0
nextPage 1 330 0
nextPage 1 374 0
nextPage 3 0 1904
nextPage 3 1 200
nextPage 3 40 0
nextPage 4 4 0
nextPage 1 KEY_ESC 1
nextPage 1 KEY_VOLUMEDOWN 1
nextPage 1 KEY_VOLUMEUP 1
nextPage 1 KEY_POWER 1
nextPage 1 KEY_MENU 1
nextPage 1 KEY_HOMEPAGE 1
nextPage 1 BTN_TOOL_PEN 1
nextPage 1 BTN_TOUCH 1
nextPage 1 KEY_KEYBOARD 1
nextPage 3 ABS_X 1904
nextPage 3 ABS_Y 0
nextPage 3 ABS_Y 200
nextPage 3 ABS_Y 500
nextPage 3 ABS_Y 800
nextPage 3 ABS_Y 1012
nextPage 3 ABS_Y 1100
nextPage 3 ABS_Y 1400
nextPage 3 ABS_Y 1700
nextPage 3 ABS_Y 2000
nextPage 3 ABS_Y 2300
nextPage 3 ABS_Y 2600
nextPage 3 ABS_Y 3200
nextPage 3 ABS_Y 4095
nextPage 3 ABS_MSC 1
nextPage 4 MSC_SCAN 1

I tried every combination I could think of^^ Still no luck.

rootiam avatar Oct 03 '24 15:10 rootiam

HI there, I guess I have a similar device and the proper config for you is a file named

D01

with this content:

prevPage EV_ABS ABS_Y 1012 nextPage EV_ABS ABS_Y 500

BTW, the device that I bought was this ring.

That's all, it worked for me.

fesaje avatar Nov 08 '24 16:11 fesaje

I'm glad it worked for you! Which Kobo model are you working with, because if you read my first comment I have the exact same prevPage setup as you and it isn't working on my 2e. I've confirmed just now that your configs do not work with my Kobo/page turner combo.

dotknott avatar Nov 08 '24 16:11 dotknott

Kobo Libra Colour

fesaje avatar Nov 08 '24 17:11 fesaje

Hey there, im having the same problem

Got any good news?

RodasQ avatar Dec 18 '24 20:12 RodasQ

sadly, no.

dotknott avatar Dec 18 '24 20:12 dotknott

Sad...

One question, do you have the color or the normal libra2?

RodasQ avatar Dec 18 '24 21:12 RodasQ

Hi there, it is working like a charm for me, on libra colour with the device I linked.

fesaje avatar Dec 18 '24 21:12 fesaje

Sad...

One question, do you have the color or the normal libra2?

Clara 2e. 8bitdo controller works, bluetooth page turners don't

dotknott avatar Dec 18 '24 21:12 dotknott

Hi there, it is working like a charm for me, on libra colour with the device I linked.

Hi!! I will risk it and will try with that one! in the link you shared we can see two, is the one remote like or the ring (aka more expensive :D )

RodasQ avatar Dec 18 '24 22:12 RodasQ

Hi there, it is working like a charm for me, on libra colour with the device I linked.

Hi!! I will risk it and will try with that one! in the link you shared we can see two, is the one remote like or the ring (aka more expensive :D )

Yes, the 'expensive' one, the ring. Probably the cheap would work without any problem but I cant assure you the events.

fesaje avatar Dec 19 '24 07:12 fesaje

You may need the uhid.ko kernel module (check https://github.com/tylpk1216/kobo-libra2-uhid-module ), that is needed for most bluetooth mouse-like or keyboard-like devices and is not included in the Clara 2E (I don't know about other Kobos).

I guess 8bitdo controller is maybe using something like hid-generic, which Clara 2E's kernel includes built-in.

According to your events dumps, the devices you are trying to connect are acting as a pen or pen tablet and simulating the action of clicking and dragging to scroll the screen (to scroll in social media apps). They may only need uhid.ko (and the built-in hid-generic), but I'm not sure.

Mine (JX-05Pro clicker) is acting as a multitouch touchpad mimicking similar gestures. I had to build the hid-multitouch.ko module and load it in addition to just uhid.ko in order to make it work.

I guess your event dumps are from your PCs and not from the Kobo. You can use dmesg to check what driver gets assigned to your devices when you connect it to your PCs. In my case:

[318630.061975] input: JX-05Pro Consumer Control as /devices/virtual/misc/uhid/0005:FFFF:0000.002D/input/input125 [318630.062197] input: JX-05Pro as /devices/virtual/misc/uhid/0005:FFFF:0000.002D/input/input126 [318630.062413] hid-multitouch 0005:FFFF:0000.002D: input,hidraw7: BLUETOOTH HID v1.00 Device [JX-05Pro] on b4:0e:de:3

acaso avatar Dec 24 '24 00:12 acaso

I'm not sure I understand how the user went from nextPage EV_MSC MSC_SCAN 90002 to prevPage 1 272 1

The user mentioned that he finally went for events other than MCS_SCAN to avoid duplicate events. prevPage 1 272 1 is the same as prevPage EV_KEY BTN_LEFT 1 (a left button press).

acaso avatar Dec 24 '24 01:12 acaso