tsowell / kobo-btpt

Page turning via Bluetooth for Kobo eReaders
MIT License
81 stars 7 forks source link

Trouble getting a working config file for page turner #11

Open dotknott opened 1 week ago

dotknott commented 1 week ago

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?

rootiam commented 1 week ago

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

dotknott commented 1 week ago

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

rootiam commented 1 week ago

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.