{"id":21816262,"url":"https://github.com/tylpk1216/kobo-libra2-uhid-module","last_synced_at":"2025-04-14T01:13:00.567Z","repository":{"id":92039471,"uuid":"479561674","full_name":"tylpk1216/kobo-libra2-uhid-module","owner":"tylpk1216","description":"Insert this module to support some bluetooth pageturners on Kobo Libra 2.","archived":false,"fork":false,"pushed_at":"2023-07-04T01:51:35.000Z","size":20,"stargazers_count":32,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T01:12:49.638Z","etag":null,"topics":["bluetooth","clare2e","kobo","libra2","linux","nickelmenu","pageturner"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tylpk1216.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-08T23:02:31.000Z","updated_at":"2025-02-11T06:13:39.000Z","dependencies_parsed_at":"2024-11-27T15:44:07.378Z","dependency_job_id":null,"html_url":"https://github.com/tylpk1216/kobo-libra2-uhid-module","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylpk1216%2Fkobo-libra2-uhid-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylpk1216%2Fkobo-libra2-uhid-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylpk1216%2Fkobo-libra2-uhid-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylpk1216%2Fkobo-libra2-uhid-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tylpk1216","download_url":"https://codeload.github.com/tylpk1216/kobo-libra2-uhid-module/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804825,"owners_count":21164135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bluetooth","clare2e","kobo","libra2","linux","nickelmenu","pageturner"],"created_at":"2024-11-27T15:32:59.277Z","updated_at":"2025-04-14T01:13:00.560Z","avatar_url":"https://github.com/tylpk1216.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kobo-libra2-uhid-module\n\nMy Logitech R500 can't work on Kobo Libra 2 so I try to check the problem. Finally, I rebuild the uhid.ko and it works with R500.\n\nBecause Kobo Clare 2E has the same issue of bluetooth, you could use this project concept to support your bluetooth device. I use kobo-libra2-uhid-module to use my Logitech R500 on Kobo Clare 2E.\n\n# How to use it\n\nFor version 4.31.19086\n\n1. Install [NickelMenu](https://github.com/pgaskin/NickelMenu), I use it to launch the application.\n2. Insert the device into your PC over USB.\n3. Put kobo-libra2-uhid-module folder in \".adds\" folder of device.\n4. Copy \"kobo-libra2-uhid-module/config\" to \".adds/nm\" or you could add the text below to your own config if you already use NickelMenu.\n```\nmenu_item :main    :Bluetooth Patch (toggle) :cmd_output         :500:quiet :rmmod -w /mnt/onboard/.adds/kobo-libra2-uhid-module/uhid.ko\n  chain_success:skip:3\n  chain_failure                              :cmd_spawn          :quiet :exec /mnt/onboard/.adds/kobo-libra2-uhid-module/run.sh\n  chain_success                              :dbg_toast          :insmod uhid.ko successfully\n  chain_always:skip:-1\n  chain_success                              :dbg_toast          :rmod -w uhid.ko successfully\n```\n\n# How to build kernel\n\nI follow the concept of [this site](https://blukat.me/2017/12/cross-compile-arm-kernel-module/). However, I use WSL(Widows Subsystem for Linux) to build the uhid.ko. If your WSL miss some applications, you could use apt command to install them. \n```\nsudo apt install xxx\n```\n\n\nHere is my steps. \n1. Use [NickelMenu](https://github.com/pgaskin/NickelMenu) to telnet into the device to get the /proc/config.gz. The user name is root, and the password is empty.\n```\nmenu_item :main    :Telnet (toggle)          :cmd_output         :500:quiet :/usr/bin/pkill -f \"^/usr/bin/tcpsvd -E 0.0.0.0 1023\"\n  chain_success:skip:5\n  chain_failure                              :cmd_spawn          :quiet :/bin/mount -t devpts | /bin/grep -q /dev/pts || { /bin/mkdir -p /dev/pts \u0026\u0026 /bin/mount -t devpts devpts /dev/pts; }\n  chain_success                              :cmd_spawn          :quiet :exec /usr/bin/tcpsvd -E 0.0.0.0 1023 /usr/sbin/telnetd -i -l /bin/login\n  chain_success                              :dbg_toast          :Started Telnet server on port 1023\n  chain_failure                              :dbg_toast          :Error starting Telnet server on port 1023\n  chain_always:skip:-1\n  chain_success                              :dbg_toast          :Stopped Telnet server on port 1023\n```\n2. Copy /proc/config.gz to your device drive, then use PC to get the file.\n```\ncp /proc/config.gz /mnt/onboard\n```\n3. Download kernel from [here](https://mirrors.edge.kernel.org/pub/linux/kernel/). I download linux-4.1.15.tar.gz.\n4. Download cross compiler from [here](https://releases.linaro.org/components/toolchain/binaries/). I download gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf.tar.xz.\n5. Suppose your work dir is /mnt/d. copy relevant files to this folder and cd to this folder.\n6. Extract config.gz\n```\nsudo gunzip config.gz\n```\n7. Extract linux-4.1.15.tar.gz\n```\nsudo tar zxvf linux-4.1.15.tar.gz\n```\n8. Extract gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf.tar.xz\n```\nsudo tar Jxvf gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf.tar.xz\n```\n9. Enter linux-4.1.15 folder.\n```\ncd linux-4.1.15\n```\n10. Copy config to this folder.\n```\ncp ../config .config\n```\n11. Modify .config file, add CONFIG_UHID=m to this file.\n```\nCONFIG_UHID=m\n```\n12. Run make command to set up configuration from old settings.\n```\nsudo make ARCH=arm CROSS_COMPILE=/mnt/d/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- oldconfig\n```\n13. Run make command to build the uhid.ko. If you have error when doing insmod. Please make all kernel first.\n```\nsudo make ARCH=arm CROSS_COMPILE=/mnt/d/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- drivers/hid/uhid.ko\n```\n14. After completing building, the uhid.ko is in drivers/hid folder. You colud use file command to check whether this module is for ARM or not.\n```\nfile drivers/hid/uhid.ko\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylpk1216%2Fkobo-libra2-uhid-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftylpk1216%2Fkobo-libra2-uhid-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylpk1216%2Fkobo-libra2-uhid-module/lists"}