March 19th, 2004, 21:45 PM
Laptop Parallel Port Problems
I have an HP/Compaq nx9010 Laptop running Windows XP. I am working with a proprietary device that uses bi-directional communication through the parallel port. I am interfacing this device using Microsoft Visual Studio .NET VC++. Traditionally I have used the c functions inp() and outp() to communicate with the port, but Windows XP does not allow user mode programs to directly access ports. So I have been using a parallel port driver called "inpout32.dll" in conjunction with my program to allow access to these ports.
The problem I am having deals specifically with the laptop when it is plugged in to AC power. For some reason when the laptop is plugged into AC power the driver "hangs" and I must restart my program to get it working again. This solution is short lived because the driver will "hang" again so long as the AC cord is plugged into the laptop. Testing on a desktop with Windows XP or when the laptop is on batteries causes no problems.
I have tried numerous drivers, changing interrupts, changing port addresses, changing BIOS port settings(bi-directional, EPP, ECP), disabling certain power management features, etc... all to no avail. The current port setting on the laptop that works with batteries only is ECP, address 0x378 - 0x38F and
0x778 - 0x77F, DMA 00. Never use and Interupt is selected as well.
Any solutions or ideas would be very much appreciated.
March 20th, 2004, 01:39 AM
Have you tried contacting HP regarding this? If so what did they say? That would be my first line of attack.
It is strange that it works fine when on batteries but won't work under AC power..
YOu have hit all the major things I'd suggest, from the BIOS settings, IRQs, port addys, power management, etc...
The only other thing I could think of is a reinstall of XP? But I doubt it will work. This could just be a hardware incompatibility.
Have you tried running a different version of Windows on the laptop to see if it works. If it works with a different OS, then you know it isn't a hardware problem. But if it doesn't then you know it is hardware problem...
Sorry I couldn't be of more help.. perhaps someone else has a more fruitful solution.
March 21st, 2004, 23:18 PM
BB's Suggestions are excellent, also, check in the bios that the parrallel port is set to Bi-directional. Also, check your power settings. It seems that the laptop may be changing state when plugged into ac, ie like docking. You may have to use the system control panel to see what drivers are used in different states.
Otherwise it is tough, XP does block direct access to ports, I had trouble doing project with serial port communications. Had to use HyperTerminal workaround
Let us know how you go.
--- 0wN3D by 3gG ---
March 31st, 2004, 20:24 PM
Well I contacted HP and there only answer is the new 90W power supplies might be causing problems with the parallel port itself. The old power supplies were 45W or 60W or something like that and they have noticed a few weird problems with the new 90W power supplies.
I'd like to test their theories using an old 45W power supply but the plug in connections are different. AAAHHHH!!!! Looks like I'll be sticking raw pins into the socket and hope nothing gets crossed or shorted out. The Chief will have my ass in a sling if I blow this thing up.
Any other ideas would be appreciated!!
April 2nd, 2004, 00:38 AM
Ok, sounds like a Hardware issue and would make sense from your first post about running fine on batteries but not on AC pack.
You could strip the connectors on the 90W and solder onto 45W plug. Else, you might try to switch to use the serial port instead of Parrallel, you might better bandwidth anyway And its easier to serialise data, better protocols and functionality.
--- 0wN3D by 3gG ---