View Single Post
Old 12-20-2024, 02:32 PM   #44
lumping-sugar66
Zealot
lumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trolls
 
lumping-sugar66's Avatar
 
Posts: 100
Karma: 81981
Join Date: Oct 2023
Location: Ontario, Canada
Device: Kobo Aura Edition 2, Kobo Clara 2E
Hello all. Wow, it's been a while since I got back to MR, and I'm excited to see all the interest. I'll try to answer all the questions as much as I can.


Quote:
Originally Posted by lkws1 View Post
I managed to get it working, with a few hacks. The major problems were:
1. The path the the plugin folder is set on an absolute basis - my folder directory was different (i.e. '/mnt/onboard/.adds/koreader/...') so I changed it as such. That meant at least the on.sh script would begin to run
2. For whatever reason, the on.sh script doesn't return the right variables and so the plugin thinks that Bluetooth isn't on (although it is). So I turned off the checks and just forced it to try to connect to my device (which works)
Thanks for the investigation. the absolute installation path is indeed a design limitation right now that I haven't fixed yet. A dynamic reading of the current koreader installation would be a great addition.
Currently the application is expecting the koreader installation to be in "/mnt/onboard/.koreader". The full path to the plugin as a result becomes: "/mnt/onboard/.koreader/plugins/bluetooth.koplugin/". If you have a different installation path, make sure to change the executeScript function in main.lua to execute in the right path. (At the time of writing, it's line #179 in main.lua)

The on.sh isn't intended to return anything but the output message is parsed in the koreader plugin code. It may be good to see what your device is messasing when it turns on bluetooth. The plugin is expecting the word "complete" to appear in the message. Anything else is considered a failure. Happy to change this to something more proper.


Quote:
Originally Posted by Lonenso View Post
And `bluetoothctl devices` hangs, so I try this `rtk_hciattach` directly and it tells
```
[root@kobo bluetooth.koplugin]# ash on.sh
insmod: can't insert '/drivers/mx6sll-ntx/wifi/sdio_bt_pwr.ko': No such file or directory
insmod: can't insert './uhid/uhid.ko': invalid module format
Unfortunately, the wifi drivers and patches are sometimes different between different devices. We have certainly seen this with the Libra users.. (see above as another user figured out the modifications needed to make this compatible with Libra 2, maybe they're the same with your device, too?) The BW and Color devices seem to have changed many things, and I only have a Clara 2E and can't really see what options are available to BW users. If you can check the folders in these locations, maybe there are other kernel patches etc. that were made available.


Quote:
Originally Posted by Jadehawk View Post
Do I need this Plugin if I am not using KoReader. can this plugin still help me with battery savings? (You mention turning bluetooth from the regular menu (Nickel), doesn't really work that well, is there a command that can be use with NickelMenu to send to the device the proper Kill command for Bluetooth (If needed))
If you're not using this plugin, you may still benefit from running off.sh in some manner from Kobo still. Nickel doesn't properly turn off properly I found, and this easily drains battery. You can test if your workflow ensures bluetooth is turned off properly by giving it 8-10 hours. You won't see any noticeable battery drain on a kobo device (koreader or nickel, doesn't matter) in 8-10 hours. If bluetooth is not turned off properly, I found a Clara 2E sees around %3 drain per hour, so it'll be very hard to mistake.
lumping-sugar66 is offline   Reply With Quote