Sunday, 27 January 2013

Nook - e-reader / Pi Display - Attempt 1.

OK - This isn't strictly related to the Raspberry Pi as such - at least not yet, but it was because of running the weather station software on the Pi that I bought the Nook. - I want to be able to use the Nook as a remote display, pulling data from the weather station's Raspberry Pi, and displaying it remotely - e.g. at my office for example, or stuck on the wall. - I've seen similar things with the Kobo etc.

- The Nook (Nook simple touch) seems easier to hold / read on than my kindle keyboard - It seems lighter, and easy to turn the pages with just a touch rather than using the side buttons as on the kindle, but that's maybe just personal preference. I can't see me buying much from the B&N Nook store as I've really committed to Kindle previously, although by using Calibre with a decoder, I could install my purchased items onto the Nook. - I didn't want to be tied into one platform in the long term...... Anyway. - This post is just for notes on the install so far.

1. - Register the Nook with B&N having turned it on for the first time and setup connection to Wi-Fi etc.
2. - Download and follow instructions to create an SD card with NookManager on. - See this post - http://forum.xda-developers.com/showthread.php?t=2040351
3. - Reboot the Nook with the NookManager and BACKUP the Nook before proceeding.
4. - Transfer the backup from the SD card somewhere safe.
5. - Repeat steps 3 and 4 so we know we have a backup from which we can hopefully recover the Nook should the root fail but nothing guaranteed.
6. - Reboot with Nook Manager and 'root' the device.
7. - Reboot and verify it's all working OK.
8. - Reboot with Nook Manager - make a backup at this stage.
9. - Install NTGAppsAttack as per - http://forum.xda-developers.com/showthread.php?t=2086582
10. - Assuming this has worked OK we now have market etc installed.
11. - Reboot and install Kindle app from the market. - I've now got that installed and working fine with my Kindle books.

... to be continued.

(28/1/13) Much googling, and playing with the screensaver on the Nook shows that what may be possible is to create a directory on the Nook 'screensavers' directory e.g. /screensavers/weather. Then, mount the Nook (in this case on the RPi), copy an image file into the 'screensavers/weather' directory on the Nook, then remove the nook. - The Nook will timeout and if you have it to display files from the 'weather' screensaver - Brilliant - it doesn't even need rooting to do that.

Then, I found this from the Kindle. - http://www.mpetroff.net/archives/2012/09/14/kindle-weather-display/
Currently trying to get the script running on the Pi to create the image which can then be transferred to the Nook. Problem I've hit so far is that I can't 'rescan' the USB bus to remount the Nook periodically. - When it's 'removed' from the Pi, the device files are removed. - I can't find a way to get udev to think it's been replugged ..... yet.

I can force 'removal' of the Nook on the USB with :-

echo 1 > /sys/bus/usb/devices/1-1.2/remove

But can't find a way to remount. - The device files are gone, and I don't know how to rescan the bus to force recognition as if it has been replugged.

I didn't originally want to do it this way because it involves a dedicated Pi for the purpose. - Originally I'd wanted a script running on the Nook which would pull the image from the Pi. - However, I'm a simple guy and I like simple solutions, so this is good enough if it works. - The upside is that I only need one power supply - the Nook charges OK from the Pi. albeit slowly. - I'll just have to get another Pi to use as my general purpose Pi if this project works :)

TBC....

OK - now looking for the essentials for the Kindle scripts. - namely pngcrush and rsvg_convert. - pngcrush was easy:-

apt-get install pngcrush

rsvg_convert took a little more finding, but I think is provided by librsvg2-bin

apt-get install librsvg2-bin

Run the scripts from the above link and put the resultant image into the screensaver directory on the Nook, et voila:-

OK - It's not entirely what I want, but as a proof of concept it pretty much works OK. Now I just need to know how to rescan the USB to remount the Nook at intervals....

(Update 3/2/13.) - I could find no way of re-establishing / rescanning the USB devices once one had been removed. - I don't mean just re-mounting a filesystem here, I mean once the device files are removed, I could find no way of getting them recreated / re-establishing as if the device had been replugged. - Anyway, see next post, I'm now getting the file via ftp periodically which is a better solution anyway.