Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the status of this project? #1

Open
houqp opened this issue Jan 3, 2016 · 29 comments
Open

What's the status of this project? #1

houqp opened this issue Jan 3, 2016 · 29 comments

Comments

@houqp
Copy link

houqp commented Jan 3, 2016

Just found this gem :) Is it ready for use now?

@lgeek
Copy link
Owner

lgeek commented Jan 3, 2016

Hi houqp,

I've been using it for almost an year now. There are a few rough edges:

  • there's no UI for mounting the device over USB for synchronisation (the kernel driver works though)
  • there's no UI for configuring the WiFi network and enabling / disabling from koreader are broken (the kernel driver and wpa_supplicant work)
  • there's no way to cleanly shut down the ereader (actually I have an ugly patch for koreader that I haven't commited yet)

I now have a few free days. I'm trying to update the packages, check that everything still works and commit my private patches, plus document everything. Keep an eye on the repository. Also, please let me know if you're interested in implementing some of the missing features in koreader or if you want to test okreader. I'll publish installation instructions soon.

@houqp
Copy link
Author

houqp commented Jan 3, 2016

I've been using it for almost an year now. There are a few rough edges:

Awesome, good to know :)

there's no UI for mounting the device over USB for synchronisation (the kernel driver works though)

I can help with the UI part if you can provide the script or list of system calls needed to perform the task.

there's no UI for configuring the WiFi network and enabling / disabling from koreader are broken (the kernel driver and wpa_supplicant work)

Yeah, I was about to ask you about this :) I acutually started a wpa_supplicant client a long time ago: https://github.com/koreader/lj-wpaclient. But never got time to actually finish it. I was able to talk to wpa_supplicant and get the a list of networks. Once I tested the connect command, we can pull it into koreader-base and throw a UI on it.

there's no way to cleanly shut down the ereader (actually I have an ugly patch for koreader that I haven't commited yet)

Looks like you already got this part? What do you mean by cleanly shutdown the reader? Do you mean killing the reader from a script instead of the UI home button?

if you want to test okreader. I'll publish installation instructions soon.

Sure, I would love to help test the build.

@lgeek
Copy link
Owner

lgeek commented Jan 6, 2016

Hi, I've been making some progress over the past few days in terms of automating some of the modifications I'm using and replacing some hacks with nicer implementations. The generated rootfs (using the git head) is now actually usable without requiring any configuration or modifications. I expect to move my attention towards the bootloader, the kernel and the installation procedure over the next few days.

I can help with the UI part if you can provide the script or list of system calls needed to perform the task.

Thanks. I've looked a bit more into this, and it actually seems possible to always have the data partition exposed as a USB mass storage device with g_file_storage.ko. It needs more testing and I need to disable & enable it in the koreader suspend.sh script, but if it continues to work well I'm tempted to just leave it always on for now.

Yeah, I was about to ask you about this :) I acutually started a wpa_supplicant client a long time ago: https://github.com/koreader/lj-wpaclient. But never got time to actually finish it. I was able to talk to wpa_supplicant and get the a list of networks. Once I tested the connect command, we can pull it into koreader-base and throw a UI on it.

A WiFi configuration UI would be nice to have. At this point it's a pretty low priority for me, but definitely let me know if you start working on it, and I'll help test it.

Looks like you already got this part? What do you mean by cleanly shutdown the reader?

I meant powering off the device. Basically asking something like "Power off?" if the power button is held for longer than 2-3 seconds and then waiting for confirmation. I have a patch for that.

Sure, I would love to help test the build.

It's getting there. Do you have an ARM system to build okreader? If not, I'll look into setting up an automated build server soonish. Out of curiosity, what device(s) do you intend to run it on?

@houqp
Copy link
Author

houqp commented Jan 7, 2016

Thanks. I've looked a bit more into this, and it actually seems possible to always have the data partition exposed as a USB mass storage device with g_file_storage.ko. It needs more testing and I need to disable & enable it in the koreader suspend.sh script, but if it continues to work well I'm tempted to just leave it always on for now.

Sounds reasonable, assuming it won't consume extra energy when enabled.

A WiFi configuration UI would be nice to have. At this point it's a pretty low priority for me, but definitely let me know if you start working on it, and I'll help test it.

I am working on some minor fixes for the new restructured koreader-base right now. Wifi configuration will be the fast follow up after that. Will let you know when I get a working demo.

I meant powering off the device. Basically asking something like "Power off?" if the power button is held for longer than 2-3 seconds and then waiting for confirmation. I have a patch for that.

Awesome, looking forward to your patch :)

It's getting there. Do you have an ARM system to build okreader? If not, I'll look into setting up an automated build server soonish. Out of curiosity, what device(s) do you intend to run it on?

I don't have a ARM build system. I am only using my laptop for cross compile right now. A build server would really nice. I have a kobo aura hd.

@houqp
Copy link
Author

houqp commented Feb 2, 2016

BTW, you can remove this patch now since it's fixed in a recent build system overhal upstream:
https://github.com/lgeek/okreader/blob/master/src/koreader_base_arm.patch#L8

@lgeek
Copy link
Owner

lgeek commented May 2, 2016

Alright, this past weekend I've finished up and committed all patches I have been using on my own ereader. Apologies about taking so long.

I was wondering how you'd envisioned the WiFi manager working. Would it generate wpa_supplicant config files directly? How would it scan for networks? On Debian we could just use its /etc/network/interfaces infrastructure, NetworkManager or wicd as the backend, but I guess that would be quite difficult to set up on Kobo's system.

To be honest, I don't really have a use for WiFi at all on my regular ereader, I just use it to SSH to the ereader I use for development. On the other hand if a WiFi manager would be available, it would be useful at least for delivering package updates and for NTP.

@houqp
Copy link
Author

houqp commented May 3, 2016

It will store the config outside of wap_supplicant and use its own config to tell wpa_supplicant how to connect to a network through its socket interface. Think of lj-wpaclient as a programable interface for wpa_cli. The core part is done, I just need to wire it up with the KOReader.

I personally need this wireless manager because i am tired of updating KOReader through USB ;P

@houqp
Copy link
Author

houqp commented Sep 24, 2016

Hi @lgeek ,

Just to sync up on the progress. Now that we have network manager and power off support in KOReader, the last item is UI for mounting the device over USB for synchronisation? Do we really need a UI for this? Is it possible to get the usb plugin event from the kernel and automatically drop into USB mode?

@lgeek
Copy link
Owner

lgeek commented Sep 24, 2016

Hi @houqp. I've been keeping the module loaded all the time (see my rc.local). I'm pretty sure it's not theoretically safe because the filesystem on the data partition gets mounted both by the device and the host computer. On the other hand, I haven't managed to break it, so... I guess it works for me. IIRC, on Debian/okreader the USB plugged in event shows up in udevadm (as a different event compared to plugging into a charger), so I'm sure a proper solution could be implemented that way.

Edit: I've been pretty busy with other things and I haven't updated koreader in ages, so I haven't checked out the network manager. I'll try to test the git head next week.

@houqp
Copy link
Author

houqp commented Sep 24, 2016

Thanks @lgeek , this is very helpful! I will take a look at how to feed udev event into KOReader :)

@houqp
Copy link
Author

houqp commented Nov 18, 2016

Forgot to update here. KOReader reads USB hot-plug events now via uevent from netlink sockets. So all we have to do is to hook these event up with an action ;P

@dtamas
Copy link

dtamas commented Mar 10, 2017

Hi @lgeek. I've tested the pre-release 1e7825eb3111_auto_build files on a Kobo Glo, and happy to report it's booting up, touch screen working, usb working, koreader working. Haven't tried wifi yet. I've noticed the status led on the Glo keeps slowly blinking green while the reader is in use.

@dtamas
Copy link

dtamas commented Mar 21, 2017

Just tested on Kobo Mini (with the swapping internal microSD card to a prepared one method), happy to report the pre-release 1e7825eb3111_auto_build files working there too.

@houqp
Copy link
Author

houqp commented Mar 21, 2017

This is awesome, we should update the model matrix in the readme ;)

@lgeek
Copy link
Owner

lgeek commented Mar 21, 2017

@dtamas Oops, I've somehow missed the notification for the previous message.

That's great, thanks for letting me know. I'll edit the readme and try to update to an up-to-date koreader soonish.

@lgeek
Copy link
Owner

lgeek commented Mar 24, 2017

OK, I've updated koreader and the readme. @houqp: have there been any upstream changes regarding the WiFi manager or USB detection for mounting? If not, I'll build the packages for public release now.

@houqp
Copy link
Author

houqp commented Mar 24, 2017

wifi manager has been changed to work with wpa_supplicant compiled without plaintext psk passphrase support (latest nickel firmware). USB detection code has been added, see 1, 2. But we haven't hooked up any UI to the hotplug event yet.

@lgeek
Copy link
Owner

lgeek commented Mar 24, 2017

@houqp Thanks. Regarding the WiFi manager, is there an UI to actually set it up or is it just an on/off toggle setting? When running on Debian/okreader, I've only found the latter. I don't have a reader with Nickel installed at the moment.

@houqp
Copy link
Author

houqp commented Mar 25, 2017

@lgeek you should see a UI for managing wifi from gear icon tab -> network -> wi-fi connection. It will prompt you for turning on Wifi, then show you a list of network that you can configure. This feature doesn't require nickel, it will work as long as wpa_supplicant is installed in the system.

@lgeek
Copy link
Owner

lgeek commented Mar 26, 2017

@houqp Thanks, I got it working with custom network scripts in b8fcc58. My Kobo Touch works as expected, but the open source WiFi driver fails to connect when wpa_supplicant is controlled by Koreader on my Kobo Aura. I'll investigate it.

Update: there's no problem with WiFi on Aura. I was running into this bug: koreader/koreader#2681

@dtamas I've built a new prerelease if you're interested in upgrading your devices. I would appreciate it if you could test whether you can connect to WiFi networks.

@houqp
Copy link
Author

houqp commented Mar 27, 2017

So the last remaining item is UI for entering usb storage mode?

@lgeek
Copy link
Owner

lgeek commented Mar 27, 2017

I would also like to have an UI for setting the timezone (I first need to check how Nickel is handling it) and manually setting the time and date.

@dtamas
Copy link

dtamas commented Mar 27, 2017

@lgeek I've tested latest build on glo, could connect to wifi, no issues. The green status led on glo keeps blinking while not in sleep mode, despite not on charger.

@lgeek
Copy link
Owner

lgeek commented Mar 27, 2017

@dtamas Thanks for testing. The LED is just a software controlled indicator, it doesn't mean anything. Could you try adding echo 0 > /sys/class/leds/pmic_ledsg/brightness to the start of /opt/koreader/okreader.sh and see it if gets turned off on your device at boot time, before koreader is launched? That works for me on a Kobo Touch.

This was referenced Mar 29, 2017
@anarcat
Copy link

anarcat commented Mar 29, 2017

how about we split that ticket up in different parts so people can track what they're interested in?

from what I could tell, the current limitations are explained in the README, and that doesn't seem to include Wifi, which has been factored into koreader. i opened #4 for the USB stuff and #5 for time sync...

anything else someone should keep in mind?

if so, we should open different issues and close this ticket.

if not, we should close this ticket anyways. :)

thanks for this great project, it's amazing to see debian running on the kobo readers!

@anarcat
Copy link

anarcat commented Nov 21, 2017

i think this ticket should be closed. there are two tickets for the missing features and the rest is clearly explained in the README.

@allentiak
Copy link

@dtamas Have you tried the latest commit (at the time of writing this, 2c253e5) on your Kobo Glo?

@dtamas
Copy link

dtamas commented Apr 15, 2022

@dtamas Have you tried the latest commit (at the time of writing this, 2c253e5) on your Kobo Glo?

unfortunately my Glo is no longer usable, so can't test it, sorry.

@allentiak
Copy link

No worries. Thank you for your reply :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants