ExpressCard parallel port with unbuffered JTAG cable works!

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2  Next
Author Message
scootley
DD-WRT Novice


Joined: 14 Nov 2009
Posts: 17

PostPosted: Tue Nov 17, 2009 11:43    Post subject: ExpressCard parallel port with unbuffered JTAG cable works! Reply with quote
Hi folks,

[SEE MY POST BELOW - IT WORKS]

Can I use an ExpressCard parallel port adapter on a laptop with an unbuffered JTAG cable and tjtag?

ExpressCard is sometimes erroneously referred to as its predecessor, PCMCIA (or PC Card, CardBus).

I guess such a parallel port adapter would have to be using ExpressCard in "PCI Express" mode, and not USB mode, since USB-based parallel ports are known to have many complexities and issues with JTAG.

Has anyone tried this?

I have a WRT54G v6 stuck in Management Mode. See here: http://www.dd-wrt.com/phpBB2/viewtopic.php?p=371470

[SEE MY POST BELOW - IT WORKS]


Last edited by scootley on Wed Nov 18, 2009 22:52; edited 3 times in total
Sponsor
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7161

PostPosted: Tue Nov 17, 2009 13:08    Post subject: Reply with quote
An ExpressCard parallel port should equal a motherboard or PCI card parallel port.

I have only tried ExpressCard serial ports and they work as a normal serial port.

_________________
I'm on a whiskey diet, lost 3 days already
Murrkf
DD-WRT Guru


Joined: 22 Sep 2008
Posts: 11414

PostPosted: Tue Nov 17, 2009 14:28    Post subject: Reply with quote
You mean one like this:

http://www.dealextreme.com/details.dx/sku.22075

_________________
SIG:
I'm trying to teach you to fish, not give you a fish. If you just want a fish, wait for a fisherman who hands them out. I'm more of a fishing instructor. So See this:
http://i31.tinypic.com/24mz3ms.png

LOM: "If you show that you have not bothered to read the forum announcements or to follow the advices in them then the level of help available for you will drop substantially, also known as Murrkf's law.."
scootley
DD-WRT Novice


Joined: 14 Nov 2009
Posts: 17

PostPosted: Tue Nov 17, 2009 14:38    Post subject: Reply with quote
Yes one like that, for example
Murrkf
DD-WRT Guru


Joined: 22 Sep 2008
Posts: 11414

PostPosted: Tue Nov 17, 2009 14:42    Post subject: Reply with quote
If that works, it might solve a lot of problems for some people. Let us know if you test it.
_________________
SIG:
I'm trying to teach you to fish, not give you a fish. If you just want a fish, wait for a fisherman who hands them out. I'm more of a fishing instructor. So See this:
http://i31.tinypic.com/24mz3ms.png

LOM: "If you show that you have not bothered to read the forum announcements or to follow the advices in them then the level of help available for you will drop substantially, also known as Murrkf's law.."
scootley
DD-WRT Novice


Joined: 14 Nov 2009
Posts: 17

PostPosted: Tue Nov 17, 2009 15:02    Post subject: Reply with quote
Yeah I'm surprised that no one else seems to have tried it (as far as I can find when searching)
barryware
DD-WRT Guru


Joined: 26 Jan 2008
Posts: 12857
Location: Behind The Reset Button

PostPosted: Tue Nov 17, 2009 15:28    Post subject: Reply with quote
I believe it will work. A pcmcia device usually becomes part of the mainboard. It is not like a usb to ~ adapter.

Remember to post back if you purchase one and it works. I have a need for a new laptop (I get the new one, the wife gets her freshly broken one replaced by my existing one Cool ) and no pp port has kept my acquisition on the back burner.

_________________
[Moderator Deleted] Shocked
PetervdM
DD-WRT User


Joined: 11 Jun 2009
Posts: 282
Location: EU

PostPosted: Tue Nov 17, 2009 16:00    Post subject: Reply with quote
it will work by default in XP and earlier.
if not located on the motherboard, Vista and W7 do not load the required lowlevel drivers for bit manupulation by default, so it might be necessary to force windows to load parport.sys as a driver for the device.
also it may be necessary to manually allocate the resources, and force windows to use port 0378h or 0278h.

_________________
now running tomato by shibby
E4200v1 cfe 2010.09.20.0


Last edited by PetervdM on Mon Dec 14, 2009 9:34; edited 1 time in total
scootley
DD-WRT Novice


Joined: 14 Nov 2009
Posts: 17

PostPosted: Wed Nov 18, 2009 22:42    Post subject: It works Reply with quote
I am happy to announce that an ExpressCard parallel port works (from both Windows Vista and Linux)

Hardware Details:
- ExpressCard 34mm (small size) parallel port adapter (the only one I could find is this one made by Chronos)
- The adapter uses PCI Express mode, not USB
- Comes with a driver CD
- Chipset is made by Oxford

Using Windows Vista
- Shows up in Device Manager as "PCI Express ECP Parallel Port" under "Ports (COM & LPT)"
- Had to install the driver from the CD
- After installation, the driver file is "parport.sys" (made by Microsoft), as PetervdM recommended
- In Device Manager, it is configured to never use an interrupt, no legacy plug & play, and as LPT1
- It uses I/O Ranges CFF4-CFF7 and CFF8-CFFF (not the usual 0378h as PetervdM warned) and they cannot be changed
- I had to recompile tjtag in order to get it to work with these strange I/O Ranges


Recompiling tjtag:
- Started with tjtag3-0-1
- Used Microsoft Visual C++ 2008 Express (free)
- Made slight changes to includes
- tjtag.c: Changed 0x378 to 0xCFF8 on line 513, 524
- tjtag.c: Changed 0x379 to 0xCFF9 on line 530

- got inttypes.h and stdint.h from http://code.google.com/p/msinttypes/
- setup project as Win32 Console app with character set as multi-byte (not unicode)
- defined WINDOWS_VERSION
- executed tjtag as an administrator

Using Knoppix (v 6.0.1) - it's linux
- ExpressCard parallel adapter is recognized at boot time and /dev/parport0 is created
- The tjtag linux binary does not need to be recompiled
- In order to allow tjtag to get exclusive use of the parallel port, you have to kill the "cupsd" process and unload the "lp" kernel module. Otherwise you will get an error from tjtag that says "Failed to lock /dev/parport0: No such device or address" and errors visible from dmesg that say "parport0: cannot grant exclusive access for device ppdev0" and "ppdev0: failed to register device"
- Ran tjtag as root

Here is the output that I get:
Code:
tjtag.exe -probeonly /noemw

==============================================
 EJTAG Debrick Utility v3.0.1 Tornado-MOD
==============================================

Probing bus ... Done

Instruction Length set to 8

CPU Chip ID: 00000101001101010010000101111111 (0535217F)
*** Found a Broadcom BCM5352 Rev 1 CPU chip ***

    - EJTAG IMPCODE ....... : 00000000100000000000100100000100 (00800904)
    - EJTAG Version ....... : 1 or 2.0
    - EJTAG DMA Support ... : Yes
    - EJTAG Implementation flags: R4k MIPS32

Issuing Processor / Peripheral Reset ... Done
Enabling Memory Writes ... Skipped
Halting Processor ... <Processor Entered Debug Mode!> ... Done
Clearing Watchdog ... Done

Probing Flash at (Flash Window: 0x1fc00000) ...
Done

Flash Vendor ID: 00000000000000000000000000000001 (00000001)
Flash Device ID: 00000000000000000010001011000100 (000022C4)
*** Found a AMD 29lv160DT 1Mx16 TopB   (2MB) Flash Chip ***

    - Flash Chip Window Start .... : 1fc00000
    - Flash Chip Window Length ... : 00200000
    - Selected Area Start ........ : 00000000
    - Selected Area Length ....... : 00000000



 *** REQUESTED OPERATION IS COMPLETE ***


If I run it without /noemw, then it seems to hang after "Enabling Memory Writes ..." and spikes my CPU.

Any ideas on that? Is it a problem?


I haven't tried to unbrick yet, but the ExpressCard parallel port seems to be unquestionably working.


Last edited by scootley on Thu Nov 19, 2009 14:10; edited 3 times in total
Donny
DD-WRT Guru


Joined: 13 Nov 2008
Posts: 5266
Location: CENTRAL Midnowhere

PostPosted: Wed Nov 18, 2009 22:53    Post subject: Reply with quote
It is normal to have to use the /noemw on some chipsets. Time to go for it! Thanks for reporting.
_________________
Warning: I'm "out of my element!"
http://www.youtube.com/watch?v=MjYJ7zZ9BRw&NR=1

Peacock Thread Sticky- Just read it! (Anyone using SP1 will be taken out back and shot)
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7161

PostPosted: Thu Nov 19, 2009 12:16    Post subject: Re: It works Reply with quote
scootley wrote:
I am happy to announce that an ExpressCard parallel port works (from both Windows Vista and Linux)

Hardware Details:
- ExpressCard 34mm (small size) parallel port adapter (the only one I could find is this one made by Chronos)
- The adapter uses PCI Express mode, not USB
- Comes with a driver CD
- Chipset is made by Oxford

- In Device Manager, it is configured to never use an interrupt, no legacy plug & play, and as LPT1
- It uses I/O Ranges CFF4-CFF7 and CFF8-CFFF (not the usual 0378h as PetervdM warned) and they cannot be changed
- I had to recompile tjtag in order to get it to work with these strange I/O Ranges




That is a bit of a bugger since not all users will be able to recompile tjtag.
I think the culprit here is the no legacy plug & play.
I googled and found a few but very expensive Expresscards ($100 and up) which claim they don't use any driver and will appear at the normal I/O addresses for LPTx.
Most of older PCMCIA cards do also map the card in the normal I/O area.

Can you do a quick test in Windows, open a cmd prompt, type debug, and when in the debugger enter
D 0:400
Does the cards I/O address appear at the first line displayed?

_________________
I'm on a whiskey diet, lost 3 days already
PetervdM
DD-WRT User


Joined: 11 Jun 2009
Posts: 282
Location: EU

PostPosted: Thu Nov 19, 2009 12:53    Post subject: Re: It works Reply with quote
scootley wrote:
- In Device Manager, it is configured to never use an interrupt, no legacy plug & play, and as LPT1
- It uses I/O Ranges CFF4-CFF7 and CFF8-CFFF (not the usual 0378h as PetervdM warned) and they cannot be changed

could you please try to load the default windows parallel port driver ( uncheck "show compatible hardware" and choose ECP printerport or printerport )? windows will warn you it can not vouche for the usabilty of the driver, ignore that.
probably you will have the possibility to alter the resources with this driver.
although the parport.sys is the same, msports.inf file installs it differently.

_________________
now running tomato by shibby
E4200v1 cfe 2010.09.20.0
scootley
DD-WRT Novice


Joined: 14 Nov 2009
Posts: 17

PostPosted: Thu Nov 19, 2009 13:07    Post subject: Re: It works Reply with quote
LOM wrote:
That is a bit of a bugger since not all users will be able to recompile tjtag.


Well it honestly should take Tornado very little time to change tjtag to accept the port address as a parameter. I am perfectly willing to distribute such a version of it, but it seems silly to "fork" it for such a trivial thing.

LOM wrote:
I think the culprit here is the no legacy plug & play.


Perhaps, but that would have to be "plug & play" for the ExpressCard, as opposed to the parallel port. What I mean is that in the Device Manager, on the properties of the parallel port, there is a port setting for "enable legacy plug and play detection". My understanding of this setting is that it allows plug and play detection of legacy devices plugged in to the port, as opposed to the port itself. Perhaps you're saying that in order to support such a thing, the port would have to be at the fixed address of 0378, but that seems weird.

LOM wrote:
Can you do a quick test in Windows, open a cmd prompt, type debug, and when in the debugger enter
D 0:400
Does the cards I/O address appear at the first line displayed?


No, but the hex string "03 78" appears in that line.

PetervdM wrote:
could you please try to load the default windows parallel port driver ( uncheck "show compatible hardware" and choose ECP printerport or printerport )? windows will warn you it can not vouche for the usabilty of the driver, ignore that.
probably you will have the possibility to alter the resources with this driver.
although the parport.sys is the same, msports.inf file installs it differently.


I tried both "ECP Printer Port" and "Printer Port", and for both of them the Resources tab is all read-only, and I don't know of another way to change the address.
Mordak
DD-WRT Guru


Joined: 27 Dec 2007
Posts: 931
Location: Orange, MA

PostPosted: Thu Jan 07, 2010 1:22    Post subject: Reply with quote
This is great for when my old laptops finally die. Very Happy
_________________

6 X WRT54G-TM
1 X WRT54G V1.0
1 X WRT54G V2.2
1 X WRT54G V5.0
2 X WRT54GS V1.0
2 X WRT54GS V1.1
1 X WRT54GS V2.0
1 X WRT160NL v1.0
1 X WRT320N
2 X WRT350N
1 X WRT600N v1.0
2 X WRT610N v1.0
1 X E1500
Tornado
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 2087
Location: Odessa, Ukraine

PostPosted: Thu Jan 07, 2010 7:10    Post subject: Reply with quote
@scootley
Why not write and submit a patch ?

_________________
Want JTAG support - Donate a router
or Donate with PayPal !

My preferred parallel jtag adapter:
TIAO Parallel adapter

Tjtag website - http://tjtag.com

Compiling DD-WRT on:
AMD Phenom II X6 1090T @ 3926.667 Mhz

Aptosid X64 - Debian SID X64
Ubuntu 10.10 X64 - Arch X64
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum