|
|
View Full Version : Hacking EBW-1150 to browse the Internet
sputnik 07-18-2007, 04:04 AM Has anyone managed to browse the Internet with an EBW-1150?
I'm thinking this would not be completely crazy. When I click a hyperlink in a document that I read on the device, the device tries to connect to the Internet and the "Initiating connection... Dialing 1-858xxxxxxx" message is displayed." The internal modem wants to connect, and then ""The connection to the eBook Network was not successful. No dialtone. Connect a phone like to your eBook and try again"
If i plug the device in the USB port, when I click a link I get the message "Communicating with eBook Network" but the page is never displayed.
Part of the difficulty is that the device reads IMP files, while most of the internet is html. I would very much like to be able to browse the internet on this device, so if anyone has managed to hack it for this purpose I'm all ears.
nekokami 07-18-2007, 09:32 AM I haven't done it, but I can think of a theoretical approach. As far as I know, there's no way to change the software on the reader itself, but you could make a proxy on the computer you connect to that would catch the network request and figure out what to do with it. The Librarian software does this now and redirects the bookshelf access to your local bookshelf, rather than the one at eBookWise, so it seems at least possible that you could catch the hyperlink network calls the same way.
sputnik 07-18-2007, 01:19 PM I have noticed that in the settings page of the device one has the option of both HTTP proxy and proxy for USB. In both cases, you can specify the http proxy address and the http proxy port. But I have no idea how to go from here.
nekokami 07-18-2007, 02:17 PM Not that proxy -- that would be for if you have a proxy server to get through a firewall, e.g. at a business or school. The idea is similar, though.
sputnik 07-23-2007, 03:02 AM So I have to transform my computer into a proxy server for the ebook, this is what are you saying? If yes, where can I find some reliable information on how to do that?
nekokami 07-23-2007, 04:09 PM Try writing to the author of the eBookwise Librarian software. There are some links from the eBookwise site.
sputnik 07-23-2007, 11:49 PM Thanks for the tip
Yes you can browse the internet with an EBW1150. The only thing is that the internal browser is not very powerful and will not correctly render new HTML pages. Simple HTML is fine for this device.
I tried that when I was trying to write a Java program to upload local ebooks to my device. As a proof of concept I remember generating a special html page that enabled web surfing. The project then died because of my lack of java knowledge and time.
This is how it worked: the device tries to connect to ebooktechnologies server and asks for a file which is a list of books. You change your OS "hosts" file so that that URL resolves to another IP. Breeno has done that and changed it to point to 127.0.01 (localhost) so that you can upload local content.
The second part is to instead of giving the list of books file, give it a specific file with a link to the internet so that you can start browsing. I think you cannot directly type an URL.
I still have the java files if you are interested in that small proof of concept.
Hope this helps a little...
Regards!
nrapallo 08-07-2008, 10:51 PM Yes you can browse the internet with an EBW1150. The only thing is that the internal browser is not very powerful and will not correctly render new HTML pages. Simple HTML is fine for this device.
I tried that when I was trying to write a Java program to upload local ebooks to my device. As a proof of concept I remember generating a special html page that enabled web surfing. The project then died because of my lack of java knowledge and time.
This is how it worked: the device tries to connect to ebooktechnologies server and asks for a file which is a list of books. You change your OS "hosts" file so that that URL resolves to another IP. Breeno has done that and changed it to point to 127.0.01 (localhost) so that you can upload local content.
The second part is to instead of giving the list of books file, give it a specific file with a link to the internet so that you can start browsing. I think you cannot directly type an URL.
I still have the java files if you are interested in that small proof of concept.
Hope this helps a little...
Regards!
This sounds so interesting. :thumbsup:
I have been playing with a proxy server (Linreb - Linux eLibrarian) for the REB 1200 (big brother to the EBW1150) and have not done any testing on the EBW1150 because it doesn't connect to the internet via ethernet. I grab the HTTP GET / POST produced by the REB 1200 and server back my info.
Can you share your (java) code and experiences getting the EBW 1150 to "surf the net"?
Most appreciated if you can! :2thumbsup
EDIT: Just tested Linreb with the EBW1150 and it works perfectly. I'm all set except for that psuedo-surfing ability you hacked together! Cool! This may work together with the recent announcement that Mobileread has gone Mobile by pointing the EBW1150's internal broweser to http://www.mobileread.mobi/ . These are simple pages and hopefully Linreb can be modified to allow direct downloading from the Mobileread IMP ebook uploads forum... :chinscratch: :bulb2: please stay tuned...
Hi,
Unfortunately I had a HD crash and lost the few lines of Java code I managed to work with. I'm sorry. I remember giving the code to users in fictionwise Yahoo group, though.
I remember that that code consisted on responding to a book list request from the EB1150 device with html code. That code was a static html file which had some links to the internet. That was the way the device could surf the web.
Sorry I can't give you more details, I lost all my files so I cannot be more specific. I'm trying to contact a guy from Yahoo group who might still have the code.
Good luck!
nrapallo 08-20-2008, 12:22 PM Hi,
Unfortunately I had a HD crash and lost the few lines of Java code I managed to work with. I'm sorry. I remember giving the code to users in fictionwise Yahoo group, though.
I remember that that code consisted on responding to a book list request from the EB1150 device with html code. That code was a static html file which had some links to the internet. That was the way the device could surf the web.
Sorry I can't give you more details, I lost all my files so I cannot be more specific. I'm trying to contact a guy from Yahoo group who might still have the code.
Good luck!
Thanks for trying to track down that code. :2thumbsup
I have been hacking the Linreb eLibrarian code I uploaded to the Fictionwise forum here (http://www.mobileread.com/forums/showthread.php?t=27529) and trying your idea of sending the html file with links to the internet in place of the booklist, but I couldn't get it to work. :(
I would welcome looking at that java code (even though I have no java programming experience) to see how the special file is transferred to the EBW1150 and what the links in that file 'look like'.
I'm a member of the Fictionwise Yahoo group so I will search there as well.
Again, thanks for trying! Do you still use your EBW1150?
Yes, I still have (and love) my EB1150.
So far I didn't find my code, and I'm afraid I won't be able to get it back :(
Anyway, I remember reading the protocol used between the device and the server. I think I've used some kind of software to "listen to" the network traffic while the device tried to access ebookwise account on the internet (I may have used tcpdump)
The protocol for book request/download was quite simple. I don't remember if I "injected" the html file as a response to the first server access or when the device requested a book.
I'll try to check on an old hard drive I dumped long time ago.
Hope this helps :P
nrapallo 08-20-2008, 08:19 PM Yes, I still have (and love) my EB1150.
So far I didn't find my code, and I'm afraid I won't be able to get it back :(
Anyway, I remember reading the protocol used between the device and the server. I think I've used some kind of software to "listen to" the network traffic while the device tried to access ebookwise account on the internet (I may have used tcpdump)
The protocol for book request/download was quite simple. I don't remember if I "injected" the html file as a response to the first server access or when the device requested a book.
I'll try to check on an old hard drive I dumped long time ago.
Hope this helps :P
Looks promising...
I want to adapt your idea of 'serving up' a html file instead of a booklist or book and "serve up" .imp ebooks directly from the uploads ebook forum here.
The C code for Linreb is very straight forward and shows all the HTTP GET requests that get served up and/or responded to by the (proxy) program. I have sniffed all but the REB1200's communication with the ETI servers. I captured with Linreb the communication between the proxy server and the EBW1150 (and REB1200) and used assniffer v0.2 to capture the EBW1150 communication with the ETI server. The EBW1150 uses the usb to connect to the internet. Alas, I couldn't do the same with the REB1200 as it connects off a router and assniffer under Win XP couldn't sniff other local IPs than my XP box. The REB1200 uses a NIC to connect to the internet but my XP box needs that NIC to connect to the ETI server so no capturing could be done!
However, in the REB1200 Yahoo group Files section in the 'REB1200 content' directory, there is a file (free_book_http.cap) that shows all the HTTP packets exchanged between the REB1200 and the old Gemstar servers in Aug 2002!
So I have 'sniffed'-capture files coming out of my ears, but need to try your hack to see if it is still possible to 'surf the internet'.
I asked for your java code in the Fictionwise Yahoo group so hopefully others can help the cause...
If you want to look at the Linreb code or HTTP capture files, I can point you in the right direction... :grin2:
nrapallo 08-21-2008, 04:32 PM If you want to look at the Linreb code or HTTP capture files, I can point you in the right direction... :grin2:
I now attach those HTTP capture files that show the communications between the EBW1150 and ETI servers, REB1200 and old Gemstar servers as well as REB1200 and GEBLibrarian / Linreb.
Lots of techie stuff in there...
I also include the html files sent to the EBW1150 from the ETI servers along with some of the images, for reference purposes.
The old Gemstar servers capture file shows some interesting communications with the local host, namely:local://remotebooklist
The GEBLibrarian capture file shows that the first ebook in the booklist sent to the reader is the place holder for the directory selector. Very interesting...
Reading those caps I can recall some things:
You see the device uses Allegro HTTP client. It sends HTTP GET requests to the server. If you use a local "Librarian" you can fetch any HTML file. My proof of concept fetched a static html file containing one link to google.com. That prooved that the device could surf the net.
If you want to generate and fetch your own list of books you'll have to fetch an HTTP response containing the string "Content-Type: text/x-booklist" and then the list of books in this format:
3:B:ebook<TAB>BOOKNAME<TAB>AUTHOR<TAB>CATEGORY<TAB>SIZE<TAB>URL_TO_BOOK<TAB>1<TAB>17
Taken from:
3:B:eBook eBook User's Guide Version 2.2 Thomson Consumer Electronics General Interest 452630 http://bookshelf.softbook.net/bookshelf/default.asp?BOOK_ID=eBook&SOURCE_ID=3&SOURCE_TYPE=B 1 17
If the device asks for a book the server should respond with an HTTP response containg "Content-Type: text/x-book" (which I infer, since it's not on those caps)
Does this help you? Hope it does :) Take a closer look at your caps. I think all you need to know is almost all there
Good luck
nrapallo 08-22-2008, 01:24 AM Reading those caps I can recall some things:
You see the device uses Allegro HTTP client.
Is there a reference manual for this client on the web. I found the Allegro FTP documentation, but not this HTTP one.It sends HTTP GET requests to the server. If you use a local "Librarian" you can fetch any HTML file.By local "Librarian" you mean the proxy server program (like Linreb or GEBLibrarian).My proof of concept fetched a static html file containing one link to google.com. That prooved that the device could surf the net.I've served up static html files in the 'content' directory that the reader accesses when displaying 'bookshelf.ebooksystem.net/content/' requests, but no surfing was allowed; even tried the google home page. :cool:
I also noticed that the reader's 'bookshelf page' was very weak in it's support of html pages so I would probably rule that out to serve up static html to its 'bookshelf' requests.
If you want to generate and fetch your own list of books you'll have to fetch an HTTP response containing the string "Content-Type: text/x-booklist" and then the list of books in this format:
3:B:ebook<TAB>BOOKNAME<TAB>AUTHOR<TAB>CATEGORY<TAB>SIZE<TAB>URL_TO_BOOK<TAB>1<TAB>17
Taken from:
3:B:eBook eBook User's Guide Version 2.2 Thomson Consumer Electronics General Interest 452630 http://bookshelf.softbook.net/bookshelf/default.asp?BOOK_ID=eBook&SOURCE_ID=3&SOURCE_TYPE=B 1 17
If the device asks for a book the server should respond with an HTTP response containg "Content-Type: text/x-book" (which I infer, since it's not on those caps)Ya, I omitted those requests from the capture file as they were binary transfers in a text file. I do see the 'content-type: x-softbook' being responded in the Linreb program code. That C code also shows the string replied to the x-booklist request as you have indicated above. We're on the same page...
Does this help you? Hope it does :) Take a closer look at your caps. I think all you need to know is almost all there
Good luck
I think it narrows down where to patch into but I still can't reproduce that 'surfing' ability. Here's to more explorations...(or someone having a copy of your java code) :)
Is there a reference manual for this client on the web. I found the Allegro FTP documentation, but not this HTTP one.By local "Librarian" you mean the proxy server program (like Linreb or GEBLibrarian).I've served up static html files in the 'content' directory that the reader accesses when displaying 'bookshelf.ebooksystem.net/content/' requests, but no surfing was allowed; even tried the google home page. :cool:
I don't know anything about Allegro HTTP client.
Yes, for Librarian I meant the proxy server + local HTTP server.
If you already served static HTML files to the reader and it rendered it ok, then you've done all I did before. If a link in that file pointing to google doesn't work from your reader, I'd say it has something to do with your proxy settings or Linux box (I've worked on XP) or some kind of network related issue (DNS, URL redirection, etc). Try using direct links with full IP addresses (that don't require DNS requests).
nrapallo 08-22-2008, 12:28 PM I don't know anything about Allegro HTTP client.
Yes, for Librarian I meant the proxy server + local HTTP server.
If you already served static HTML files to the reader and it rendered it ok, then you've done all I did before. If a link in that file pointing to google doesn't work from your reader, I'd say it has something to do with your proxy settings or Linux box (I've worked on XP) or some kind of network related issue (DNS, URL redirection, etc). Try using direct links with full IP addresses (that don't require DNS requests).
I'm using a WinXP computer to communicate with the reader. I'm behind a router and working in local IP space (198.168.X.X). The Linreb program seems to work well and v0.2 has a windows executable that you can run in WinXP (check out v0.2).
I think there could be one or more of the following working against me getting this to work:
- ETI may have 'fixed/blocked' that ability to surf the net from 2005 to now with recent firmware updates :angry:
- your java code actually 'processed' the requests by manipulating the info sent whereas the Linreb program merely responds with the requested data. No .asp code is being executed by Linreb when the HTTP requests come in from the reader. :(
- the ability to 'surf the net' is there and I'm too 'blind' to see it. :o
I will continue experimenting with the Linreb code...
From the moment you can use Linreb with your reader, the ability to surf the net is there. You have to remember that what Linreb does is redirect all traffic to ebooktechnologies servers to the local server listening on localhost. In tech terms: it puts an entry in your HOSTS file on your windows machine that translates the ebooktechonologies.com to 127.0.0.1 and runs a web server listening on localhost.
My java code did nothing magic or on the fly, just serve a static html file. You say you can do the same, so you have pretty much everything done. Am I correct? The reader shows your custom static html files, rigth?
nrapallo 08-22-2008, 06:40 PM I'm using a WinXP computer to communicate with the reader. I'm behind a router and working in local IP space (198.168.X.X). The Linreb program seems to work well and v0.2 has a windows executable that you can run in WinXP (check out v0.2).
I think there could be one or more of the following working against me getting this to work:
- ETI may have 'fixed/blocked' that ability to surf the net from 2005 to now with recent firmware updates :angry:
- your java code actually 'processed' the requests by manipulating the info sent whereas the Linreb program merely responds with the requested data. No .asp code is being executed by Linreb when the HTTP requests come in from the reader. :(
- the ability to 'surf the net' is there and I'm too 'blind' to see it. :o
I will continue experimenting with the Linreb code...
From the moment you can use Linreb with your reader, the ability to surf the net is there. You have to remember that what Linreb does is redirect all traffic to ebooktechnologies servers to the local server listening on localhost. In tech terms: it puts an entry in your HOSTS file on your windows machine that translates the ebooktechonologies.com to 127.0.0.1 and runs a web server listening on localhost.
My java code did nothing magic or on the fly, just serve a static html file. You say you can do the same, so you have pretty much everything done. Am I correct? The reader shows your custom static html files, rigth?
Yes, basically a combination of the last two points (in bold) in my post above is taking place.
The Linreb program doesn't do anything but "serve up" static html pages in the 'content' directory. No external html pages are fetched from the internet and placed there. No HOSTS file is 'changed', but all HTTP requests from the reader are RESPONDED to by the proxy program, not the ETI servers. Again, there is no 'processing' done by the Linreb program other than 'give up' what it sees in the local directories.
Have you tried running the program? It does work with the EBW1150 conntected via the usb cable and with the HTTP Proxy server set up according to the GEBLibrarian-way. Presumably you know this already i.e. 192.168.0.X where X is your machine's IP last octal.
I think the Linreb program doesn't use the 127.0.0.1 method directly, but instead relies on the EBW1150 reader to have the HTTP proxy set in Settings as well as use the usb for proxy HTTP. Maybe this is the difference in making it work and not?
OK, I've downloaded and run LinReb (nice software)
I think I now know what your problem is: It's Linreb's lack of proxy feature.
This happens because the reader is set to use an HTTP proxy (which should run in a local IP). In this case, ALL HTTP requests are handled by Linreb which runs in that specific IP:port. So, if the requests are made to those known ETI servers (hardcoded in the readers), Linreb responds. If they are made to different domains (e.g. google.com) Linreb doesn't do anything because it's coded in that way; and because it's also not coded to act as a proxy, it doesn't even forward those requests to the required server onn the internet.
There are two "workarounds for this"
1- Use an HTTP proxy in the reader that points to a separate proxy server that handles web requests AND forwards the ones to ETI server to LINREB.
2- Don't set use proxy settings on the reader, run Linreb in port 80, and change the HOSTS files to forward ETI domain to Linreb in local IP. This is the approach that I coded before (By the way... I've found one old version of it).
Does this help you clear all out?
Good luck!
nrapallo 08-25-2008, 01:30 PM OK, I've downloaded and run LinReb (nice software)
I think I now know what your problem is: It's Linreb's lack of proxy feature.
This happens because the reader is set to use an HTTP proxy (which should run in a local IP). In this case, ALL HTTP requests are handled by Linreb which runs in that specific IP:port. So, if the requests are made to those known ETI servers (hardcoded in the readers), Linreb responds. If they are made to different domains (e.g. google.com) Linreb doesn't do anything because it's coded in that way; and because it's also not coded to act as a proxy, it doesn't even forward those requests to the required server onn the internet.
There are two "workarounds for this"
1- Use an HTTP proxy in the reader that points to a separate proxy server that handles web requests AND forwards the ones to ETI server to LINREB.
2- Don't set use proxy settings on the reader, run Linreb in port 80, and change the HOSTS files to forward ETI domain to Linreb in local IP. This is the approach that I coded before (By the way... I've found one old version of it).
Does this help you clear all out?
Good luck!
I think you are right on the mark! Any chance of getting your java code (early version) to acheive that surfing ability again? Please post your results here if you get it working. I could never see where in Linreb I could "get" those webpages but I thought the reader was doing the surfing for me. I guess not!
After I got that 'surf the internet' feature "activated", I then wanted to modify Linreb to "get" .imp ebooks from our uploaded ebooks forum here directly ala the Mobipocket Download Guide.
You have given me a great headstart with your findings and hopefully this can evolve into something useful. I am going to try this new (and hopefully correct) way as soon as possible.
Thanks again; you have been most helpful!
I think you don't really need my code but if you want it you can get it from here (http://www.filefactory.com/file/9f3d67/n/retlibrarian_zip)
That program runs a webserver listening on port 80. When it is run, it loads the HOSTS file in memory and adds some entries. It listens for requests and serves the files (sample.html should be named index.html). When you close it, it puts the HOSTS files back to original state.
That's not the approach used by Linreb since it doesn't run on port 80 (which needs some privileges).
What you really need is to add some code in Linreb to let it handle requests for domains other than ebooksystem.net and forward the responses back to the reader. In other words, always act as a proxy except when trying to connect to ETI servers.
If you don't want to add code to Linreb (maybe for maintenance reasons) you should run a separate proxy that directs all traffic to ebooksystem.net to Linreb's port. (I tried to do that but I could find a way to do a port redirection.)
One last thing: I think It'll be a lot of work parsing all the Uploaded book forum section and presenting them to the reader.
Nate the great 08-25-2008, 08:36 PM One last thing: I think It'll be a lot of work parsing all the Uploaded book forum section and presenting them to the reader.
That's something that can be automated. We already have a download guide in Mobipocket that is generated automatically.
But it's not worth Alex's time to make one for the Ebw-1150 until we know that it will work. Also, he will need two things. What is the largest file size that the 1150 can handle comfortably? Is there a Linux command line tool for generating IMP ebooks? (got a link?)
nrapallo 08-25-2008, 08:54 PM I think you don't really need my code but if you want it you can get it from here (http://www.filefactory.com/file/9f3d67/n/retlibrarian_zip)Are you kidding; I think I have found the Holy Grail with that java code. Very interesting; perhaps I can merge some segments into Linreb. But since I didn't write Linreb (I only found it), my progress will be all uphill. That's OK though, I like a challenge.
BTW, quick (stupid) question, did you get it to work on the EBW1150 as you remembered it?
That program runs a webserver listening on port 80. When it is run, it loads the HOSTS file in memory and adds some entries. It listens for requests and serves the files (sample.html should be named index.html). When you close it, it puts the HOSTS files back to original state.I tried this already with the EBW1150 (as you previously suggested earlier), but none of the HTTP GETs were processed properly. They were all internet requests (without the proxy 'Http://' prefix). I need to make some adjustments to Linreb to properly interface and incorporate your idea. That's where your java code comes in handy. At least now I'll know what your idea is, IN CODE, so that I can try to duplicate/strong-arm it to work for Linreb.
That's not the approach used by Linreb since it doesn't run on port 80 (which needs some privileges).
What you really need is to add some code in Linreb to let it handle requests for domains other than ebooksystem.net and forward the responses back to the reader. In other words, always act as a proxy except when trying to connect to ETI servers.I will if I find the right code. So far, I've found some web references (in perl) and may try some ideas from there. Here's to hoping it gets me somewhere.
If you don't want to add code to Linreb (maybe for maintenance reasons) you should run a separate proxy that directs all traffic to ebooksystem.net to Linreb's port. (I tried to do that but I could find a way to do a port redirection.)port redirection?; like port forwarding on a router?
One last thing: I think It'll be a lot of work parsing all the Uploaded book forum section and presenting them to the reader.
If you take a look at the first link on the second page of the content directory in Linreb v0.2, you will see (all) the Mobipocket ebooks available for download from Mobileread.com along with their descriptions. That info was extracted from the Mobipocket Download Guide available here daily. You are correct that that would be a lot for me to parse for .imp ebooks, but not for the moderators or main programmers here. Once the proof-of-concept is acheived, then I'm sure I could get their co-operation preparing the 'IMP Download Guide' the way Linreb needs it. Now, will that listing exhaust the limited memory on-board the EBW1150? Perhaps, but then we will have to work with small lists/subsets; an extra pre-processing step would be required.
Time will tell how successful this becomes but for me it is enough to be a catalyst to make this happen. You have been a great part so far as was the original author of Linreb. Besides I like tweaking/hacking (and maintaining) programs written by others; that's what I do!
In the spirit of sharing, I do want to see this come to fruition.
Anybody else want to help out? Please? Ok, pretty please! :grin2:
Speak now or forever (you know the drill) .....
nrapallo 08-25-2008, 09:17 PM That's something that can be automated. We already have a download guide in Mobipocket that is generated automatically.
But it's not worth Alex's time to make one for the Ebw-1150 until we know that it will work.
Nate:
I mentioned this in my previous post, without seeing your repsonse here. Good to see you are 'already in the know'. We know we need this 'proof-of-concept' first, and we are working on it.
Also, he will need two things. What is the largest file size that the 1150 can handle comfortably? Is there a Linux command line tool for generating IMP ebooks? (got a link?)
In the meantime, I'll get you started!
The EBW1150 maxes out its internal memory when many links/styles/images/etc. exist in the ebook. Size and complexity seem to go hand-in-hand. I'll guess that that size limit is under 10 MB, but over 5MB. The REB1200 can surpass that by a lot. It may max out at 30MB and can surely handle most ebooks over 10MB. It has more available memory onboard and its all available for data.
Why do you need to generate those .imp in linux? They already have been uploaded to the IMP ebooks upload forum (and actually are already in that 'mobi' directory used by the Mobipocket Download Guide :cool:).
If you want to generate .imp ebooks 'on-the-fly' from .html files, then my perl scripts for manipulating .imp ebooks will do the trick in linux. It's a sticky in the Fictionwise forum. :thumbsup:
Whatever you need most definitely is available here already; one way or another I've made sure of that!. Ask me for anything you need to do.
My original idea was to use an 'IMP Download Guide' that Alex could format in html for our use and then 'wget' or 'get in perl using LWP' the requested file using Linreb. For a great reference, see Web Basics with LWP (http://www.perl.com/lpt/a/661) - Sample Recipes for Common Tasks by Sean M. Burke - author of Perl & LWP (August 20, 2002).
This should be easy enough to set up, but requires Alex's help formatting the listing and the EBW1150 in sending out those HTTP requests to the proxy server. We seem to be close, but are not there yet!
Stay tuned...
Nate the great 08-25-2008, 09:50 PM I was under the impression that the download guide itself would need to be in IMP to be on the 1150.
The best way to make the guide is to automate the process. You click on a link, a script runs and you are offered a file to download. This is how the Mobipocket Download Guide is set up. And in order to execute the script we would first need the command line tool.
BTW, the Mobi Download Guide is still under 2MB, so the new guide has no worries about size problems.
nrapallo 08-25-2008, 10:56 PM I was under the impression that the download guide itself would need to be in IMP to be on the 1150. The EBW1150 can receive tabbed info in the form of a booklist without getting an actual .imp ebook. The EBW1150 then can choose one of the listed ebooks and have it transferred in. Do you know what I mean?
The best way to make the guide is to automate the process. You click on a link, a script runs and you are offered a file to download. This is how the Mobipocket Download Guide is set up. And in order to execute the script we would first need the command line tool.
BTW, the Mobi Download Guide is still under 2MB, so the new guide has no worries about size problems.
I think it will have to be handled a bit differently, since the EBW1150 cannot connect to the internet without the Linreb (proxy server) program running in the background. The EBW1150 will have to go through the Linreb program to get the .imp.
I was thinking that Alex could prepare a html listing that could be displayed on the EBW1150 with Linreb and then have the Linreb program intercept the requested .imp ebook, download it "on the fly" and present it back to the EBW1150 by "serving up" the .imp in the local directory. This would be a two-step process. GEBLibrarian does something similar when it allows Categories to be changed by the EBW1150.
If the .imp ebook is the 'IMP Download Guide', then it would be Huge and require the hardware reader to "do the surfing". That's just not possible (I think) and therefore differs slightly to your 'Mobipocket Download Guide' implementation.
Do you see it working better differently? Any insights would be appreciated. Call it brainstorming across reader platforms! Mind you, you almost cover them all, by yourself... :rofl:
Nate the great 08-26-2008, 12:22 AM I think you should go try the Mobi Download Guide. Then you'll understand why I want to do something similar with the 1150 (if it is technically possible).
I did understand that Linreb was required. It's just that I just got By Schism Rent Asunder so you're not getting my full attention. ;)
nrapallo 08-26-2008, 12:49 AM I think you should go try the Mobi Download Guide. Then you'll understand why I want to do something similar with the 1150 (if it is technically possible).
I did understand that Linreb was required. It's just that I just got By Schism Rent Asunder so you're not getting my full attention. ;)
I did try using the PC Mobipocket Reader to "fetch" an ebook from the Mobipocket Download Guide a while ago, but it timed out half-way through and failed. Even if I don't have a Mobipocket hardware reader, I understand how it works. :)
I think instead I would use the html file that was used to create the Mobipocket Download Guide. So BEFORE converting it to .prc (or .imp) Linreb would get from here that html file (with descriptions and links to all .imp ebooks) and send the html file to be displayed on the EBW1150. Then the user would navigate the pages on the reader and when they saw an ebook of interest, they would just click the link in that html file.
That would request the .imp file from the internet but as the ETI servers don't accomodate such requests, the Linreb program would do so; but in a sneaky way. It would intercept that requested .imp file and then go out and get it and place it in the 'shelf' directory on the local machine. There would then be a message displayed on the EBW1150 that should ask the user to request a new Bookshelf (by pressing the Online Bookshelf icon). The Linreb program would then look at the 'shelf' directory and see that newly downloaded ebook and send the updated booklist to the EBW1150. Once the user sees that requested .imp in the Online Bookshelf, they would click it again and have it transferred in. And repeat!
A lot of these terms are specific to the EBW1150 way of transferring ebooks and may not yet be intuitive for you. It's Ok if you're not 100% involved in this project, since we all get distracted with other issues every so often...
Thanks for helping me 'crystalize' what is needed here to make this work! You're a great sound board to bounce (written) thoughts off of!
derrell 08-26-2008, 09:11 AM Have you gotten your perl script to work in Linux? It uses Win32::OLE doesn't it? The last time I tried running it in native Linux there was no way for it to make use of the commands to eBook Publisher to create an imp file. The mobi scripts from tommy work but they all only use perl modules.
I've installed perl 5.8.8 in wine and have been trying to get the Mobi2Imp gui and scripts to work that way but haven't spent much time on it yet. My answer so far is to run the script in an install of Windows XP using VirtualBox.
nrapallo 08-26-2008, 09:38 AM Have you gotten your perl script to work in Linux? It uses Win32::OLE doesn't it? The last time I tried running it in native Linux there was no way for it to make use of the commands to eBook Publisher to create an imp file. The mobi scripts from tommy work but they all only use perl modules.
I've installed perl 5.8.8 in wine and have been trying to get the Mobi2Imp gui and scripts to work that way but haven't spent much time on it yet. My answer so far is to run the script in an install of Windows XP using VirtualBox.
Oops, your are absolutely right. There is no .imp creation in linux; eBook Publisher is required to generate the .imp from the .html and images extracted. Now only if eBook Publisher worked in linux...
Mobi2IMP is written in perl and then compiled for windows users, along with that GUI. It uses the same interface that was created for PDFRead. PDFRead has the same issues working in linux; can create the "parts", but can't assemble them into a .imp.
The original creator of PDFRead, ashkulz, recommended taking those "parts" to the "windows"-side to complete the .imp creation. His solution was to just get eBook Publisher to finish the job in windows; your solution is to use Mobi2IMP in windows to begin with.
Which is easier? better?
Can linux use/simulate the eBook Publisher .dll / COM and OLE calls? The SBPubX.doc documentation is quite extensive but I'm not sure how you could get that working in linux. But then again, I'm "The REB1200 Guy", not "The Linux Guy"... :rofl:
nrapallo 08-26-2008, 09:50 AM I think you don't really need my code but if you want it you can get it from here (http://www.filefactory.com/file/9f3d67/n/retlibrarian_zip)
OK, I must admit, you've managed to stump me.
I'm using WinXP with java available at the command prompt. When I issue "java -version", I get:java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
How do you start this proxy server written in java?
Anyone know what to do when using a windows (brain-dead) machine to execute this? I know derrell stays away from the "windows"-side (Star Wars analogy?)
derrell 08-26-2008, 10:11 AM Actually what I've been doing with the conversions from lit and mobi is to run the tool that will convert whichever file type to the oeb style directory and using eBook Publisher run through wine to create the imp file. What I like about your scripts is that they turn that into a one step process.
Even when I get the whole wine setup working thats still going to be a huge round about kludge. I've searched around looking for something that will create an imp file without using eBook Publisher and haven't found anything.
Seeing as how I need my Virtualbox XP to download lit files with IE that I've purchased I guess its not that big of a deal to start it and run the conversion scripts there.
Nick
I'm not one of those militant Linux guys I won't boo and hiss it just because Bill Gates had something to do with. I freely admit the man is one hell of a business man, locked nearly the entire industry into a voluntary monopoly. I just choose not to use when there is a choice. Sometimes there just isn't one though.
nrapallo 08-26-2008, 10:36 AM Derrell:
I am only using WinXP because it satisfies most of my needs.
On the programming side I wouldn't touch MS products with a ten-foot pole!
I have used mostly Unix-style programming since university and that's what I prefer to work with. C and C++ are my main choices to experiment in.
Prior to using windows I used the AmigaOS and loved it. I really felt comfortable there, just that with the demise of the hardware, the choice was windows or MAC. I chose windows and that's why I'm in this quandry!
Oh well, my most recent computer at least dual boots with WinXP and Ubuntu 8.04 so there is light at the end of the tunnel...
Oh, BTW, be sure to check ashkulz's recent post impmake: automated creation of IMP books via the command line (http://www.mobileread.com/forums/showthread.php?t=28245) for an all linux solution to imp creation.
OK... I've managed to let the reader surf the web AND browse books from Linreb's bookshelf!!
I've installed Privoxy which runs on port 8118. So I configured the reader to use proxy listening in 127.0.0.1:8118.
In Privoxy's main configuration file I've added ONE line "forward .ebooksystem.net 127.0.0.1:9090" (without quotes).
So, to surf the web, you only need to put an index.html file on Linrebs store directory pointing somewhere on the internet. In the reader you go to BOOKSTORE and click the icon and Linred should respond with that index page you created, after that, click on the link and VOILA!!
Is it clear? ;)
nrapallo 08-26-2008, 11:26 AM Ret:
Great news! The home page to privoxy is http://www.privoxy.org/ for those so inclined to try this out!
Now onto the many Linreb mods planned.... boohhahahahahaha...
nrapallo 08-26-2008, 02:00 PM OK... I've managed to let the reader surf the web AND browse books from Linreb's bookshelf!!
I've installed Privoxy (http://www.privoxy.org/) which runs on port 8118. So I configured the reader to use proxy listening in 127.0.0.1:8118. In Privoxy's main configuration file I've added ONE line "forward .ebooksystem.net 127.0.0.1:9090" (without quotes).
So, to surf the web, you only need to put an index.html file on Linrebs store directory pointing somewhere on the internet. In the reader you go to BOOKSTORE and click the icon and Linred should respond with that index page you created, after that, click on the link and VOILA!!
Is it clear? ;)
This works fantastic using the EBW1150 to browse the internet.
I surfed to the MR wiki pages and everything downloaded fine (except .imp links! :angry:), just that none of the hyperlinks are underlined (current limitation) so choosing what to click becomes cumbersome.
Alas, my REB1200 did not have any success using this approach to 'surf the internet' since it is connected to a router with a local IP address (192.168.0.X) and not connected to the computer running Linreb (127.0.0.1). The Linreb part works okay but the surfing HTTP requests are not passed through somehow.
I tried different configurations, but still no go! I'll keep trying to get the REB1200 fully working :(!
Ret, is it possible to use your local (WinXP box) IP address instead of 127.0.0.1? My situation, in essence, is one where the hardware reader is at one local IP address and needs to go through a computer running Linreb at another IP address which inturn needs to proxy properly with privoxy. My brain hurts now just thinking about this... :grin:
Any insights? suggestions?
EDIT: I removed the HTTP proxy setting on the REB1200 that is used to communicate with Linreb, but already had its content directory page loaded in and managed to get the REB1200 to surf the internet. So it is possible; just takes some more thinking...
Proof of concept is the surfing to the ETI home page with the REB1200. I just grabbed the closest capturing device to record this. Sorry, it is very low quality and low light!
EDIT: I just took some more pictures of surfing the internet (better lighting and quality). Have a look at my REB1200 Album (http://www.mobileread.com/forums/album.php?albumid=69) and EBW1150 Album (http://www.mobileread.com/forums/album.php?albumid=70)!
(attached thumbnails of movie-low quality)
I guess REB1200 uses other servers to connect for bookshelves so if I'm not wrong you should add to privoxy settings the line "forward .softbook.net 127.0.0.1:9090".
Are you following me on why we are using privoxy, adding those lines, etc? ;)
So, basically you need to do this:
1- Run Linreb (usually uses port 9090)
2- Run privoxy (usually uses port 8118)
3- add the lines "forward .ebooksystem.net LINREB_IP:LINREB_PORT" and "forward .softbook.net LINREB_IP:LINREB_PORT"
(where LINREB_IP is the IP address where Linreb is runnning and LINREBPORT is the port in which it listens)
4- Set the reader to use HTTP proxy pointing to the IP address and port of privoxy.
In the case that privoxy, Linreb and the reader are connected to the same PC just use 127.0.0.1 (I don't know why it didn't work when I use my PC's local IP 192.168.#.1)
nrapallo 08-26-2008, 05:49 PM I guess REB1200 uses other servers to connect for bookshelves so if I'm not wrong you should add to privoxy settings the line "forward .softbook.net 127.0.0.1:9090".No, it uses the same servers as the EBW1150 (I migrated it over already) :)Are you following me on why we are using privoxy, adding those lines, etc? ;):eek: You got me on WHY? other than the obvious to handle non *.ebooksystem.net HTTP requests. Now the task begins getting Linreb to do all of this! Is their a reason, in the future, to keep Privoxy "in the loop"?So, basically you need to do this:
1- Run Linreb (usually uses port 9090)
2- Run privoxy (usually uses port 8118)
3- add the lines "forward .ebooksystem.net LINREB_IP:LINREB_PORT" and "forward .softbook.net LINREB_IP:LINREB_PORT"
(where LINREB_IP is the IP address where Linreb is runnning and LINREBPORT is the port in which it listens)
4- Set the reader to use HTTP proxy pointing to the IP address and port of privoxy.
In the case that privoxy, Linreb and the reader are connected to the same PC just use 127.0.0.1 (I don't know why it didn't work when I use my PC's local IP 192.168.#.1)
That's my problem! (in bold above); my reader is at IP_address_1 and Linreb and Privoxy are at IP_address_2. I will try your suggestions and experiment more, but the BATTLE has been won. The readers can access and surf the 'net!
Job well done, Ret! I'd give you more karma, but the system here is not allowing me to do so soon after already giving you karma!
p.s. is there a capture log that can be saved from Privoxy and posted here to see which HTTP requests don't make it to Linreb? and then post Linreb's capture file to refer to it? This should start us off in adapting the Linreb code to hopefully cut out Privoxy from the equation.
Has anyone tried this in linux yet? how about MacOS! The possibilities could be endless....
That's my problem! (in bold above); my reader is at IP_address_1 and Linreb and Privoxy are at IP_address_2. I will try your suggestions and experiment more
I don't see why that would be a problem. That should work. When things are run locally, maybe the packets don't get routed correctly to privoxy if you don't use the local loop 127.0.0.1.
Job well done, Ret! I'd give you more karma, but the system here is not allowing me to do so soon after already giving you karma!
I just realized about those karma points!. Didn't know they existed! :tongue: What are they for?
Sure, you can code some proxy features into Linreb and get rid of privoxy. You'll have to work on linreb.c. There's an if..then that handles GET requests. Take a look here:
// if it is a request for bookshelf.ebooksystem.net,
// then serve our page
if (strstr(orl,BOOKLIST_PREFIX))
{
handle_booklist_request(rs,orl,orl+
strlen(BOOKLIST_PREFIX));
.
.
.
.
.
else
{
// just print the first line, probably not a
// GET request
char line[1024];
char *a, *b;
for (b=buf,a=line; *b ; /* no increment */)
{
if (*b == '\r')
break;
*a++ = *b++;
}
*a='\0';
if (verbose)
{
printf("%s\n",line);
}
not_found(rs);
}
Nate the great 08-26-2008, 09:45 PM I surfed to the MR wiki pages and everything downloaded fine (except .imp links! :angry:), just that none of the hyperlinks are underlined (current limitation) so choosing what to click becomes cumbersome.
That's because the ebook links do not end in IMP, they end in PHP. The Ebw-1150 is confused by the suffix. The Kindle has the same problem, BTW.
nrapallo 08-26-2008, 09:59 PM I don't see why that would be a problem. That should work. When things are run locally, maybe the packets don't get routed correctly to privoxy if you don't use the local loop 127.0.0.1.
It's strange! If the REB1200 page with the internet links is displayed and I turn off the HTTP proxy setting, then I can get the links to not go through Linreb and pass onto (without Privoxy?) the internet. I have to get this nailed down, but for now I'm happy it works!
I just realized about those karma points!. Didn't know they existed! :tongue: What are they for?I think you collect as many as you can and then redeem them later in life (or after-life), I think NOT! :rofl:
They are a reward system with no apparant purpose other than to electronically "pat someone on the back" so to speak.
Sure, you can code some proxy features into Linreb and get rid of privoxy. You'll have to work on linreb.c. There's an if..then that handles GET requests. Take a look here:
Yep, that "not_found(rs)" message is going to get an overhaul!!!!
BTW, I just took some more pictures of the REB1200 surfing the internet (better lighting and quality). Have a look at my REB1200 Album set up here (http://www.mobileread.com/forums/album.php?albumid=69)!
Next up, an Album for the EBW1150 browsing the internet. Have a look at my EBW1150 Album set up here (http://www.mobileread.com/forums/album.php?albumid=70)!
nrapallo 08-26-2008, 11:03 PM That's because the ebook links do not end in IMP, they end in PHP. The Ebw-1150 is confused by the suffix. The Kindle has the same problem, BTW.
Good to know this info. It will save a lot of debugging later when we try to code it and find out there is no .imp at the end of that link... WTF? Aha a .php ending! :rofl:
Thanks Nate!
nrapallo 08-27-2008, 09:40 AM See continuation of this thread, in: HOW-TO: Surf the Internet with the EBW1150 or REB1200 (http://www.mobileread.com/forums/showthread.php?t=28297)
Major thanks go out to Ret for originally having this idea and finally getting it to work AGAIN as well as to the original author of Linreb (Nandagopal Kirubanandan) wherever and whoever you are!!
Most with just a EBW1150 should follow the first and third HOW-TO at the above link, whereas those with multiple ETI devices (like me) should follow the second and third HOW-TO (follow?)!
EDIT: To easily surf the internet WITHOUT using the (limited) Linreb or Privoxy, please use Impserve (http://www.mobileread.com/forums/showthread.php?t=28363) and be sure to download all of the Impserve plugins (http://www.mobileread.com/forums/showthread.php?t=28863) to allow the downloading of content directly from the internet to your ebook reader!!!
|