Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-08-2008, 08:10 PM   #1
-Thomas-
Addict
-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.
 
-Thomas-'s Avatar
 
Posts: 325
Karma: 1725
Join Date: Dec 2007
Location: Münster, Germany
Device: iRex iLiad v2
Lightbulb My iLiad became a network printer...

Hi folks,

I just converted my iLiad into a network printer
  • I've ported GhostScript, including ps2pdf, to the iLiad (files coming soon, I'm still packaging ),
  • I configured ajnorth's Samba to offer me a printer (which calls the ps2pdf script)
  • And finally I installed a standard PostScript printing driver on my notebook, accessing the Samba printer
As a result I can print out documents and stuff directly onto my iLiad...

Edit: Files and more details are in this post.

Last edited by -Thomas-; 01-09-2008 at 03:48 PM.
-Thomas- is offline   Reply With Quote
Old 01-08-2008, 10:50 PM   #2
Adam B.
Addicted to Porting
Adam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the rough
 
Adam B.'s Avatar
 
Posts: 1,697
Karma: 7194
Join Date: Oct 2006
Location: Indianapolis, IN
Device: iRex iLiad, Nokia 770, Samsung i760
Brilliant! I don't know why it wasn't thought of before. Great work.
Adam B. is offline   Reply With Quote
Old 01-09-2008, 03:13 AM   #3
tribble
iLiad Maniac
tribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it is
 
tribble's Avatar
 
Posts: 1,382
Karma: 2369
Join Date: Apr 2006
Location: Germany
Device: Bookeen Opus (i love that thing) and iPad (what an irony)
Great idea. Do you have your network permanently on for that, or do you have to start the printerapplication? Just curious, because WiFi draws soooo much power.
tribble is offline   Reply With Quote
Old 01-09-2008, 03:23 AM   #4
JustADecoy
Junior Member
JustADecoy began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2007
Lightbulb

Quote:
Originally Posted by -Thomas- View Post
Hi folks,

I just converted my iLiad into a network printer
Very cool! I've been dying to do something like this, but I'm not yet satisfied with the connectivity options (more below). I have a couple questions about how you've done this:

Quote:
  • I've ported GhostScript, including ps2pdf, to the iLiad (files coming soon, I'm still packaging ),
  • I configured ajnorth's Samba to offer me a printer (which calls the ps2pdf script)
  • And finally I installed a standard PostScript printing driver on my notebook, accessing the Samba printer
GhostScript strikes me as a heavyweight solution (though I'm not sure if we have any better way to output a PDF file in the Open Source world) -- how large is the installation? Does it seem especially slow?

The biggest issue I have with Samba is the fact that I put my iLiad and my laptop on many different networks and sometimes they can't be on the same one. Frankly, this makes Wi-Fi a terrible option for me, though I hope Ad Hoc networking+Zeroconf might make things easier. If I'm reading things correctly, you have to connect to the shared 'printer' by its IP address -- is that correct?

Even better would be a tiny Bluetooth adapter and a software stack to make the iLiad look like a printer. (Though I'm more likely to send a Mac OS X-generated PDF file via Bluetooth file exchange using Automator, because that's dead easy.) Even better than that would be a pop-up window on the iLiad once the file is received to let me put the file where I want it (and give it a new title, etc.)

Enough about my crazy ideas and complete lack of time to work on them. This is really cool news, and I'm looking forward to poking at the code when you post it. Once upon a time, I remember Windows could auto-download a driver for a properly configured printer via Samba -- I think it's time to figure out how that works.
JustADecoy is offline   Reply With Quote
Old 01-09-2008, 12:31 PM   #5
-Thomas-
Addict
-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.
 
-Thomas-'s Avatar
 
Posts: 325
Karma: 1725
Join Date: Dec 2007
Location: Münster, Germany
Device: iRex iLiad v2
Quote:
Originally Posted by JustADecoy View Post
GhostScript strikes me as a heavyweight solution (though I'm not sure if we have any better way to output a PDF file in the Open Source world) -- how large is the installation? Does it seem especially slow?
Ghostscript is using ~7 MB in total, the binary itself is at 3.8 MB (stripped). It's a bit slower than on a PC, but not remarkably. Rendering this thread for example takes 6.5 sec, the printable version takes only 4 sec.

I still have some problems due to missing fonts, so the disk usage might still go up...

Quote:
The biggest issue I have with Samba is the fact that I put my iLiad and my laptop on many different networks and sometimes they can't be on the same one. Frankly, this makes Wi-Fi a terrible option for me, though I hope Ad Hoc networking+Zeroconf might make things easier. If I'm reading things correctly, you have to connect to the shared 'printer' by its IP address -- is that correct?
Yes, thats correct. Samba is currently built without the nmbd service, so you have to address samba by its IP.

I also did some WLAN Ad-Hoc tests which were positive. The new busybox already includes a DHCP server (udhcpd), so all you have to do is set up an ad-hoc network, start the dhcp server and give clients an IP in a private address space.

Quote:
Even better would be a tiny Bluetooth adapter and a software stack to make the iLiad look like a printer. (Though I'm more likely to send a Mac OS X-generated PDF file via Bluetooth file exchange using Automator, because that's dead easy.) Even better than that would be a pop-up window on the iLiad once the file is received to let me put the file where I want it (and give it a new title, etc.)
Moving files around on the iLiad is still a big issue IMO. At the moment a printed document shows up in the "download history". Bluetooth would be great, but I think it drains your battery at least as much as WiFi does...

Quote:
Enough about my crazy ideas and complete lack of time to work on them. This is really cool news, and I'm looking forward to poking at the code when you post it. Once upon a time, I remember Windows could auto-download a driver for a properly configured printer via Samba -- I think it's time to figure out how that works.
From what I've cross-read so far, all you have to do is to put the driver files onto a corresponding Samba share on the server, but I still have to figure that out.
-Thomas- is offline   Reply With Quote
Old 01-09-2008, 02:50 PM   #6
-Thomas-
Addict
-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.
 
-Thomas-'s Avatar
 
Posts: 325
Karma: 1725
Join Date: Dec 2007
Location: Münster, Germany
Device: iRex iLiad v2
I finally packaged GhostScript into an ipkg package. I didn't create an installer yet for the following reason: For now, this is a beta version as I think, and you have to do other steps by hand either. So running the ipkg command on a console should be possible for everyone who wants to use it.

GS and the fonts need about 9 MB disk space, samba not included. Here's what you have to do:
  1. Install the attached ipkg file by issuing
    Code:
    ipgk install -force-overwrite -force-defaults gs-esp_8.15.3.iLiad.0.1.ipk
    This will install GS and the fonts into /usr/local (I used the symlink-creating-script flying around in other packages).
  2. Download the attached print2pdf.sh and configure the target directory for your PDF files (standard: Documents on Internal memory). Place the script in /usr/local/bin on your iLiad.
  3. Get ajnorth's samba, install and configure it as seen in the attached smb.conf.
  4. Now start up samba by issuing
    Code:
    /mnt/free/samba/bin/start.sh
    and configure your network.

After you have done so, you may install the "printer" in your PC's control panel. Choose "Samba printer", "\\(your iliad ip)\PDF" as the URL and select any PostScript printer driver. The driver for the "Apple Color LW 12/660 PS" works quite well ("Color" works even without the secret color hack ).

The next step will be a "One click activation", so you don't have to mess around with the console that much.

Have fun with your tree-saving toner free printer

EDIT: /usr/local/bin has to be in the $PATH for ps2pdf, this is now corrected in the new version of the print2pdf.sh script.
Attached Files
File Type: zip gs-esp_8.15.3.iLiad.0.1.ipk.zip (5.28 MB, 406 views)
File Type: gz smb.conf.gz (371 Bytes, 475 views)
File Type: gz print2pdf.sh.gz (332 Bytes, 455 views)

Last edited by -Thomas-; 01-10-2008 at 04:30 AM. Reason: New version of print2pdf.sh fixes an error
-Thomas- is offline   Reply With Quote
Old 01-10-2008, 02:39 AM   #7
chupit
Junior Member
chupit began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2007
Device: iLiad
Quote:
Originally Posted by -Thomas- View Post
Have fun with your tree-saving toner free printer
Dear Thomas,

When using this solution, do you still observe that working with CF cards using WiFi is very slow or it's just content lister's problem?
chupit is offline   Reply With Quote
Old 01-10-2008, 04:27 AM   #8
-Thomas-
Addict
-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.
 
-Thomas-'s Avatar
 
Posts: 325
Karma: 1725
Join Date: Dec 2007
Location: Münster, Germany
Device: iRex iLiad v2
Quote:
Originally Posted by -Thomas- View Post
[*] Download the attached print2pdf.sh and configure the target directory for your PDF files (standard: Documents on Internal memory). Place the script in /usr/local/bin on your iLiad.
This script is missing one line as I found out (adding /usr/local/bin to the $PATH is necessary). Please download the new attached version.

Quote:
Originally Posted by chupit View Post
Dear Thomas,

When using this solution, do you still observe that working with CF cards using WiFi is very slow or it's just content lister's problem?
This problem still exists and is not only related to the content lister. The system log tells me about lost interrupts when trying to copy a file over ssh onto the CF card, and I get exactly 1 kb/s in speed.

But despite that printing to CF isn't slower, because CF and WiFi are not used at the same time. Samba first writes a temporary file to /tmp (which is located in RAM), converts it to pdf and then moves it to the CF card after using the WiFi interface.
-Thomas- is offline   Reply With Quote
Reply

Tags
ghostscript, iliad, network printer


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pretty Printer crutledge Sigil 4 09-01-2010 04:42 PM
Kindle 2 as a printer mowbray Amazon Kindle 10 02-21-2010 03:16 PM
About Printer for Librie mike007dog Sony Reader 0 12-14-2009 03:29 AM
Iliad as wireless printer? eterps iRex 5 05-14-2008 06:14 PM
Virtual Printer phyzjqk iRex 4 02-15-2007 02:43 PM


All times are GMT -4. The time now is 12:04 PM.


MobileRead.com is a privately owned, operated and funded community.