USB to Parallel Printer Cable


Fworg64

Who knows?
Joined
Apr 27, 2011
Messages
196
Location
Fargo, ND
Will a High Speed USB 2.0 to bidirectional parallel printer cable converter work with the Pandora? I don't need to print anything, just want to know if I can output with it, as I need to make a robot and the Pandora would be a neat controller as it fits within the competition requirements and is easily programmed. I imagine if there is no driver for Pandora it wouldn't be too hard to port since its a rather simple device. Also as of this week I have no means to test it myself.


Thanks for any advice.


EDIT: just fyi its a 36 pin cable.
 
Last edited by a moderator:
I haven't seen mention of anything like that. You might have to be a trailblazer, if you can pick up a USB-parallel cable for cheap. (I just asked my has-everything-in-a-drawer-somewhere workmate, but he doesn't have one.)


I did a search on GP32X and someone mentioned these: http://www.maplin.co.uk/usb-experiment-interface-board-42857


The hardware hacking wiki page may be of interest too, although there is no allowance for parallel on that breakout board. I'm sure people will have other alternate suggestions too. But I'm guessing you've sent your Pandora for repair, so none of this is likely to help right now.
 
Well i very much have my Pandora with me but I know that printing doesn't work. I do have the cable too, thats why i was wondering if it worked. I just wouldn't know how to test it, and my multimeter is at my robot competitions coaches workshop till this weekend. So i guess im also wondering how i would even test it? I suppose i could work up a test program or shell script but i wouldn't know how to interface with it (which is some knowledge ill need if i want to control a robot with it :p ).
 
Oh I see. :) How silly are you prepared to get? Maybe you could plug some LEDs into the appropriate pins, look for the cable somewhere in /dev, find some bash commands to send out a cooee. Just the kind of thing I'd probably enjoy wasting a night on.


This is how I usually end up looking:

U1Ljh.jpg


(I may have just put a couple of bucks on a used USB-parallel cable on ebay...)
 
i did think about the led thing :p but then thought i might be crazy, however ill prolly try it now that you suggested it too :p . Ill have to check if i left my LEDs here though or brought them to the shop as well.. either way ill prolly just run to the shack and buy some.


Do you know off hand how i would output to it from the terminal? or even a C++ program?
 
I was just looking at this page: http://www.epanorama.net/circuits/parallel_output.html


Contains detailed info on LED hookup (with resistors) and a fairly comprehensive approach to control methods (including Linux and C++). There might be a roadblock though - that page and some others I've seen suggest that USB-parallel cables are only good for printers, and if they're to be believed, categorically do not work for this kind of low level I/O control.


I thought DOSbox might be an interesting route with its port passthrough business, but those guys say the same limitations apply. Bummer. Not that it would stop me trying.
 
This interests me too, for another reason - I have an Atari Portfolio and a Gameboy Camera, and both of these are happiest when speaking with a parallell port. I will get around to getting a cable for experiments later on, but if someone gets any relevant results before then, I'd be all ears.


Re checking if it works: The first thing I'd do would be to plug it in, run dmesg in a terminal and see whether and as what the kernel recognizes it.
 
"lsusb", "dmesg | tail" and "ls -lrt /dev" will tell you whether the device was properly detected and has proper drivers to use it.
 
I've done some work with the parallel port long time ago in high school. Hell I used GW-Basic as that was the only language I knew with any proficiency back then that. I know C/C++ and python ( pyparallel ) all have parallel port connects


I'm not sure if a USB device will act like a true parallel port.. it's worth a shot..


found several links that could be handy:


http://logix4u.net/component/content/article/14-parallel-port/15-a-tutorial-on-parallel-port-interfacing


http://www.codeproject.com/Articles/4981/I-O-Ports-Uncensored-1-Controlling-LEDs-Light-Emit


http://as6edriver.sourceforge.net/Parallel-Port-Programming-HOWTO/parallel-port-programming-howto.html
 
Last edited by a moderator:
I know not the parallel port, but I've been looking at some USB interfaces on the internet and I found one that may be interesting.


http://www.quasarele...e-board-kit.htm


looks like it has linux support and libusb is the only pre-requirement.


http://libk8055.sourceforge.net/


EDIT: Well I bought that USB Experiment Interface Kit... what can I say I'm an impulsive buyer... I'll tell you how it goes.
 
Last edited by a moderator:
Update: even though the cable says "high-speed USB revision 2.0" it must not work directly with the Pandora. I think it crashed the USB host or whatever, as it now wont read my flash drive. Does this mean ill need to run it through a hub? if so what kind in particular?


Also out put from "dmesg | tail"


[ 434.729156] hub 1-0:1-0: unable to enumerate USB device on port 2


seems to be pertinent. until tomorrow when i can pick up a hub ill try playing with it on my Linux desktop.


UPDATE again. when i plug the cable into my desktop and run "dmesg | tail" it says


[2045.240883] usb 6-2: new full speed USB device number 3 using uhci_hcd


sneaky bastards wrote high speed on the cable when its full speed.


also edit, not sure if theres any confusion but this is defiantly a 36 pin one. not 25.


prolly last edit: All the inernetz are saying that usb to parallel doesn't work for anything other than printing applications :( prolly just buy an EXT connector :p
 
Last edited by a moderator:
prolly last edit: All the inernetz are saying that usb to parallel doesn't work for anything other than printing applications :( prolly just buy an EXT connector :p
I find that incredibly difficult to believe, it's not like the parallel interface is complex: open the device, write bytes to it. That's all a print driver does, the bytes then "turn on" the pins at the other end to tell the printer what to print, or commands to run. I can't think of any reason you wouldn't be able to send arbitrary bytes and read those bytes off the connection by any device.
 
I guess in theory no, Stan. But difficult to send multiple lines of data over a serial bus some buffering and flow control hardware, no? Maybe that's what keeps this thing dirt cheap, maybe the driver software does it and that's what's missing here?
 
I know we have apps on pandora such as document viewer and abiword wanted print directly from them,is it possible connect pandora to a printer.
 
I dont think anyone has CUPS (common unix printing system) working yet. So if thats true, unfortunately no.
 
i couldnt bug slaeshjag enough into inter-grading CUPS. i think he mentioned once that he could get it done, if CUPS stayed on NAND at all times or something along the lines, which some of us found perfectly fine. but nobody else ever got anything out of it
 
prolly last edit: All the inernetz are saying that usb to parallel doesn't work for anything other than printing applications :( prolly just buy an EXT connector :p
I find that incredibly difficult to believe, it's not like the parallel interface is complex: open the device, write bytes to it. That's all a print driver does, the bytes then "turn on" the pins at the other end to tell the printer what to print, or commands to run. I can't think of any reason you wouldn't be able to send arbitrary bytes and read those bytes off the connection by any device.

Well, for both applications I'd want to use it with, I'd need it to be bidirectional (I.e. I want to get data back from the other end, too), and I can imagine that that wouldn't be on the top of the prio list, unfortunately :( If anyone stumbles upon any cable that does this, please let me know.
 
Back
Top