Mobileread
Using your eBookwise eb-1150 with Linux
#1  derrell 08-24-2008, 08:00 AM
The most recent version of this howto is at http://wiki.mobileread.com/wiki/EBookwise-1150-Linux

My eb-1150 has so far been a very nice reader. The only complaint that I have had is I am a Linux user and it seems that all of the software for it is windows only. At first glance that seems to be true but like most hardware you can use this reader with your favorite OS.

Using the book creation software from eBook Technologies in wine has works just fine. Iv'e had no problems with it so far. Just download the software from http://www.ebooktechnologies.com/support_publisher_download.htm and install it with wine. All full Linux distros have wine packages that can be installed with whatever package management software they use. This will let you create the imp files that the reader will convert to its internal format once you have loaded them in the reader.

If you haven't used wine before just use your distros package manager to install wine then open a terminal and change to whatever directory you downloaded the Win_eBookPub_2.2.5.exe file to and use the command below to install it.
Code
>$ WINEPREFIX=/home/yourusername/.wine
>$ wine Win_eBookPub_2.2.5.ex
Then follow the prompts as the windows installer runs just as you would installing any application in windows.

To get my books into the reader after they were created I have been copying the imp files created with eBookPublisher to a smart media card using a card reader. Then plugging the card back into the eb-1150. While this really isn't much of an inconvenience it does put some wear on the card and with SM cards not that easy to find anymore I really would like to be able to use that nifty USB cable that came with the reader. Not to mention I might want to purchase a book and download from my personal online bookshelf without having to use a phone line and dialup internet service.

After some digging around and some help from nrapallo I now have a setup that will let me do just that. This is my attempt at sharing what Iv'e gotten to work so that someone else might not have to sit around and do so much head scratching.

To start off you need two small pieces of software. The first is eb1150-0.1.1 this runs as a daemon and lets your eb-1150 communicate with the computer though a USB port. The second is one that nrapallo has worked over so that it works with the newer readers instead of their older reb brothers linreb.0.2.1. You can download both from the links to the attachments below.

After you have them downloaded start with eb1150. This program needs libusb installed before it will compile. With most Linux distros you will also need to install the libusb-dev or libusb-devel package as well. After that is done unzip eb1150 archive and change to the created directory. From here just do the ./configure, make and make install steps as you would for any other source package.
Code
>$ ./configure
>$ make
>$ sudo make install
Once it is installed find that USB cable that came with eb-1150 and plug it in. Don't turn on the eb-1150 just yet, first open two terminals in the first one issue this command. NOTE you might have to be root for this to work.
Code
tail -f /var/log/messages
This will let you see what is going on when the eb-1150 is turned on and the computer notices it. Here is what shows on mine. You should see something similar.
Code
Aug 24 03:12:19 festus kernel: [30230.144230] usb 2-1: new full speed USB device using ohci_hcd and address 49
Aug 24 03:12:20 festus kernel: [30230.231330] usb 2-1: configuration #1 chosen from 1 choice
Now that the computer knows the reader is there its time to try out eb150. In the second terminal start eb1150. For now we just want to see if the installed program is going to work so it will need to be started with root privileges. We'll fix that later for now just start it and let it run as root.
Code
>$ sudo eb1150
or if you don't have sudo
Code
>$ su
enter root password:
>$ eb1150
You should see this in the terminal.
Code
eb1150 0.1 (Dec 19 2007) - eBookWise/GemStar 1150 communication daemon
Licensed under the GNU General Public License. ABSOLUTELY NO WARRANTY.
See the GNU GPL for details.
Found eBook 1150, attempting to open ...Success
Socket created 4
If you got that its working and you can now try going to your personal bookshelf. Try tapping the Online Bookshelf tab in the library screen of your eb-1150. You should see something like this in the terminal.
Code
gethostbyname : 207.158.6.50
Socket created 6
Connected to 207.158.6.50:80
Sent: 183 byte(s)
Recv: 560 byte(s)
socket closed
Error: Recv failed (errno = 9)
gethostbyname : 207.158.6.50
Socket created 6
Connected to 207.158.6.50:80
Sent: 611 byte(s)
Recv: 914 byte(s)
socket closed
The eb-1150 will show you your online bookshelf if you have already registered the device.

Now that you know the eb1150 daemon is working hit ctrl-c in the terminal where it is running to stop it. Now it needs to be fixed so that it doesn't need to have root privileges to run. This means that a udev rule needs to be added so your normal user has permission to read and write to the USB port that the eb-1150 is hooked to. This rule is just a simple text file added to the directory /etc/udev/rules.d along with all of the files full of rules about how to handle different devices in your computer. Open a text editor as root and add this line to a file.
Code
SUBSYSTEM=="usb", ATTR{product}=="eBook", MODE="0660", GROUP="plugdev"
Save the file as /etc/udev/rules.d/99-ebook.rules. The 99 at the beginning of the file name should insure that this is the last set of rules that get read and will change the permissions for the eb-1150 when it is plugged into one of the USB ports. You may or may not have to restart udev to get it to use the new rule. To restart it go back to the terminal with this command.
Code
>$ sudo /etc/init.d/udev restart
Now to test it out as a normal user. Close the terminal you were using and open another one or just make sure you are no longer root in that terminal. If you used sudo in front of the commands you are not. Just like before but without root privileges...
Code
>$ eb1150
You should get the same results as the first test but now you are no longer running it with root privilege. When you are through experimenting go ahead and stop eb1150 with ctrl-c again.

linreb-0.2.01
While it is nice to be able to use eb1150 with the USB ports on your computer to get full speed access to your online bookshelf it is even nicer to use it with linreb so that you can have a local bookshelf where you can put your own personal content without having to go through the hassle of uploading files and then downloading them again with the eb-1150. The program linreb works something like GeB Librarian. It intercepts the eb-1150's requests to the online bookshelf server and uses content on your personal computer.

Unzip the linreb-0.2 archive and change to the directory that it creates in a terminal. There all you need to do is issue the command:
Code
>$ make
It should compile and leave you with an executable named linreb. Now then before we are ready to try it out some set up on the eb-1150 needs to be done first. Go to Settings Phone Connection in the eb-1150. On this page check mark the Use proxy for USB box. Then tap the HTTP proxy address box and the keyboard will pop up. Put the ip address of your computer here 127.0.0.1 should work. Then tap the next button and enter the port number 1026 and tap enter. You might need to change the port number but that was one I wasn't using. I think it may be most often used for webcams but since I don't have a webcam it was open. Go back to the library page when you are done and turn off the eb-1150.

Back to the terminal where you compiled linreb. Start it running with this command.
Code
>$ ./linreb -p 1026 -v
It needs to be started in the same directory where the sub-directories content, shelf and store are. The shelf directory is where you can put your imp files to be transferred to the eb-1150. The -p option is the number of the port that you set in eb-1150 setting page. After starting it up you should see a message in the terminal similar to this.
Code
LinReb v0.2 Build 23-Aug-2008
Simple eLibrarian for REB1200/EBW1150
Bookshelf from "shelf/"
Bookstore from "bookstore/index.html"
Html content from "content/"
Listening on INADDR_ANY:1026
Loaded 2 files in bookshelf
Now turn on the reader and open another terminal and start eb1150 with the -h option which is the proxy host ip you entered in the eb-1150 settings.
Code
>$ eb1150 -h 127.0.0.1
Tap the Online Bookshelf tab on the reader and it should show you the contents of the shelf directory on your reader just like it would your real Online Bookshelf. You should see something similar to this in the terminal that is running linreb.
Code
GET http://bookshelf.ebooksystem.net/bookshelf/default.asp?INDEX=1&REQUEST=100&SHOW_HIDDEN=NO Sent BOOKLIST 175 bytes.
Once that works you can download the files to your reader just as you normally would. You can also try tapping on the bookstore icon in the main tool bar of the reader and it will show you a test page that is being served from store directory. Most people will be most interested in the fact that the bookshelf works though. After trying to download some of the books that are in the bookshelf you can turn off the eb-1150 and stop the running programs linreb and eb1150. This all needs to be done manually for now. I might try cobbling together a script of some kind that uses zenity dialogs to make this a little friendlier, but for now I am happy that there is a way to get the content off of the computer and onto the eb-1150.

Finishing up:
You can copy the linreb binary to another location that is in your path. I use ~/bin for small binaries like this. It could just as well go in /usr/bin though. Pick a location for the directory structure that linreb needs to serve you the content and copy the three directories there. Something like ~/Books/EB1150/bookshelf then I can move files into and out of the shelf directory as I want and still keep them sorted by author in ~/Books/EB1150. Just remember to start linreb from within ~/Books/EB1150/bookshelf or whatever the path is to where the three directories are.

That's it enjoy being able to use your eb-1150 with your Linux box.

08/25/08
Added eb-control script
*******************************
08/27/08
Get linreb from the link below. Points to the latest version from nrapallo linreb-0.2.02.
http://www.mobileread.com/forums/att...2&d=1219839151
********************************
01/17/2010
Added source package eb1150-0.1.2.zip that will compile under ubuntu 9.10.
Added binary package eb1150-0.1.2-bin.tar.gz with eb1150 binary that was compiled under ubuntu 9.10 64 bit.
[zip] eb1150-0.1.1.zip (99.7 KB, 1744 views)
[zip] eb-control-.01.zip (1.8 KB, 964 views)
[zip] eb1150-0.1.2.zip (100.6 KB, 933 views)
[gz] eb1150-0.1.2-bin.tar.gz (73.6 KB, 954 views)
Reply 

#2  nrapallo 08-24-2008, 08:57 AM
Wow, derrell, excellent tutorial on getting the most of your reader on linux!

I feel like I've learnt a year's worth of linux by reading your post. Very informative and timely too. I just got a new netbook, ASUS eee 1000H (typing on it now-Thanks, Alexander for turning me onto this baby!) and just finished installing Ubuntu 8.04 onto a 8GB SDHC. Now you KNOW I'm going to try this right away!!!!!

I've got a lot of ideas for extending the usefulness of the Linreb program, and to avoid duplication, I suggest we make all future mods to my original post and then, once stable, update this post with the next version!

Thanks for helping out, Derrell (The Linux Guy)!

We're off to the make the "wiki", the wonderful wiki of mobileread.com... (hum to the Judy Garland song from the Wizard of Oz)
Thanks to Derrell for the EBookwise-1150@Wiki » wiki entry under the Adding Books heading.
Reply 

#3  derrell 08-24-2008, 09:14 AM
Thanks, hope it works all works out with Eee. Hardy is what I'm using now so there shouldn't be any problems there.

As to linreb sounds good to me. I was going to pm you and ask about the change in the source of linreb. I was planning on linking back to your original. Lots of small changes floating around are just a way to kill a project by causing mass confusion.
Reply 

#4  shighfield 08-24-2008, 10:45 AM
Great post Derrell! I was able to follow your insturctions quite easily and it works great on my Gentoo box as well.
Reply 

#5  nrapallo 08-24-2008, 04:39 PM
Derrell:

I followed your tutorial and now I too have the ebookwise 1150 running on Ubuntu 8.04!!!!

Not one stumbling block encountered on my way to success! I liked your tutorial, perhaps we can see more of your work in the future!

I only changed one thing, the HTTP proxy address and port number. When using GEBLibrarian my EBW1150 is set to: 192.168.0.X where X is the last octal of my computer's IP address and the port is 9090. To find out the IP address in linux, right-menu click on the network icon in the top status bar and choose Connection Information. It's displayed beside IP Address: (no figure ).

I still couldn't get any of my links to make the EBW1150 'surf the internet'! Check out the second page in Content (directory)...

Thanks again for an invaluable write-up! Kudos!

EDIT: I just wanted to add that Linreb works just fine in linux connecting to the REB1200 without needing the eb1150 usb driver since it uses ethernet to communicate. For those like me who have multpile devices...
Reply 

#6  derrell 08-25-2008, 01:10 PM
Added a quick dirty bash script that uses the zenity dialogs to control eb1150 and linreb with sort of a gui look, to the main post. Just to automate things a little.

The origninal settings are hard coded but you can change them and the script will create an rc file in your home directory with your changed settings, book shelf directory, ip and port information. It will then use that from the beginning the next time it is run.

It shouldn't hurt anything as the only file that it ever writes or reads is its own rc file.
Reply 

#7  derrell 09-02-2008, 02:47 AM
Added a section to the wiki on how to integrate the eBook Publisher software with a file manager.
http://wiki.mobileread.com/wiki/EBoo...Book_Publisher
Reply 

#8  nrapallo 09-02-2008, 09:25 AM
Quote derrell
Added a section to the wiki on how to integrate the eBook Publisher software with a file manager.
http://wiki.mobileread.com/wiki/EBoo...Book_Publisher
Derrell, thanks for this!

Very thorough and helpful! A Linux user's dream come true...
Reply 

#9  Sanderella 01-11-2009, 05:24 PM
I got as far as this:

After that is done unzip eb1150 archive and change to the created directory. From here just do the ./configure, make and make install steps as you would for any other source package.

I don't know how to change to the created directory, or ...install as for any other source package. I'm not a linux geek, just a little old lady trying to use my linux box to transfer books to my eBookwise. Any help greatly appreciated.
Reply 

#10  mbernardi 06-17-2009, 06:20 PM
Quote Sanderella
I got as far as this:

After that is done unzip eb1150 archive and change to the created directory. From here just do the ./configure, make and make install steps as you would for any other source package.

I don't know how to change to the created directory, or ...install as for any other source package. I'm not a linux geek, just a little old lady trying to use my linux box to transfer books to my eBookwise. Any help greatly appreciated.
I have to agree, even though I'm a bit of a geek

For example WHICH programming languages are required to configue and make eb1150?

Can these programs be packaged for the main linux versions?
Reply 

  Next »  Last »  (1/3)
Today's Posts | Search this Thread | Login | Register