The future of JP1 in the 64-bit world

Discussion forum for JP1 software tools currently in use, or being developed, such as IR, KM, RemoteMaster, and other misc apps/tools.

Moderator: Moderators

Thomas
Posts: 87
Joined: Sat Feb 16, 2008 1:16 pm

Update - 10 Feb 2010

Post by Thomas »

I have been struggling with writing to EEPROMs, finally deduced that my breadboard circuit was somehow exceeding the clock rate that these EEPROMs would accept for writing the page buffer - I relaxed the clock rate from 100KHz to 80KHz and things started working better. I was able to use RealTerm to consistently read and write to a 2k and a 4k Kameleon (thanks for the loan, Rob!) either to the entire EEPROM or to any specified block.

However, there are two items where I need some help:

In his EEPROM adapter section of the MarketPlace, Tommy Tyler has a URL re obtaining a modified JP12serial.dll file from compendiumarcana. Got it, tried it with IR, consistently get a message 'JP12 Interface not loaded' Also tried a more recent variant and got the same message - is this modified JP12serial.dll specified only for Vista/Win7 ? Do I need to pursue this further?

No success writing with IR - reads OK, hangs on upload command with 'Divide by zero' error message from IR (per Windows error reporting, I am running XP/SP3). I have not yet tried my trusty old Win2K, and as you may have guessed, I don't have Vista or Win7.

Both errors occur regardless of whether I use FTDI, a Silabs CP2102 (USB VCP equivalent), or an RS232 hardware COM port, with any version of JP12serial.dll going back to version 9. Snooping on the Tx line, I see that IR successfully sends ping (E), ID (I), and value (V) commands, and then hangs after the remote/adapter responds via Rx line. Note that RealTerm does manage to read/write with the same hardware.

Next, I plan to try older versions of IR and perhaps try Win2K - or maybe Win98. I no longer have any debugging hardware and my software tools are outdated, too. If anybody needs clarification or has a suggestion, please advise.
Tom Carlson
mathdon
Expert
Posts: 4726
Joined: Tue Jul 22, 2008 8:53 am
Location: Cambridge, UK

Post by mathdon »

Thomas wrote:In his EEPROM adapter section of the MarketPlace, Tommy Tyler has a URL re obtaining a modified JP12serial.dll file from compendiumarcana. Got it, tried it with IR, consistently get a message 'JP12 Interface not loaded' Also tried a more recent variant and got the same message - is this modified JP12serial.dll specified only for Vista/Win7 ? Do I need to pursue this further?
The compendiumarcana version of JP12serial.dll is not only for Vista/Win7, it should also work with XP, but it does not work with Win2K or with Java (i.e. with RemoteMaster RMIR). There is at present no more recent variant than that, but there may be tomorrow - Kevin Timmerman and I have jointly produced a version that works with Kevin's programming adaptor and with Win2K and Java and has some other improvements too. I am awaiting his final approval before posting it. But I don't think any variant should fail with the message "JP12 interface not loaded", so to me that indicates that something else is wrong.
______________
Graham
Thomas
Posts: 87
Joined: Sat Feb 16, 2008 1:16 pm

Post by Thomas »

O/S is XP/SP3. It was upgraded from SP1a with MS patch file.

I am running IR 8.02, jp12serial.dll 0.14, DecodeIR 2.40, as administrator, in normal mode (not in compatibility mode). FTDI drivers are 2.4.16.0, I ran also with SiLabs CP2102 5.4.24.0

This new jp12serial.dll is the only thing that is different. I don't see any traffic on the Tx/Rx lines, either with USB VCP or with a hardware COM port.

RealTerm works, in that I send files with the IR commands, E/I/V/R/S, and my interface reads and writes the EEPROM. I did build Kevin's version to double-check, and IR does not work with it and the new JP12serial.dll, either, same error. Whatever test IR is using to detect the interface, be it download, upload, or check interface, that is the message it reports.

The 'Division by zero' thing - I worked back as far as IR 7.09, with most of the iterations of jp12serial.dll, with the same result. I also tested with a new install of SP3 from MS OEM distribution disk, on a different computer, same results.

Any other tests I can run for you?
Tom Carlson
Thomas
Posts: 87
Joined: Sat Feb 16, 2008 1:16 pm

Post by Thomas »

I tested IR on a laptop with XP/SP2 - got the same error, 'JP12 interface not loaded' and RealTerm worked as previously noted.

All these computers have hardware serial ports. I uninstalled the windows drivers, disabled them in BIOS and, rebooted and redirected the VCP port to COM1. No joy........
Tom Carlson
mathdon
Expert
Posts: 4726
Joined: Tue Jul 22, 2008 8:53 am
Location: Cambridge, UK

Post by mathdon »

Thomas, I have looked at the IR.exe source to see where the error "Jp12 interface not loaded" is created. I cannot understand how it can ever appear, since any route to that error should have already caused a "Unable to open jp12serial.dll" error. The only other error I can find that could be generated by an attempt at any of upload, download or an interface check is "Failed to open JP1.x interface". This is caused by the jp12serial.dll routine "openRemote" failing to find a port with a connected remote. In case this is the cause of the problem even though the error message is different, here are the COM port settings that it tries to make:

Code: Select all

	dcbSerialParams.BaudRate = 38400;
	dcbSerialParams.ByteSize = 8;
	dcbSerialParams.StopBits = TWOSTOPBITS;
	dcbSerialParams.Parity = NOPARITY;
	dcbSerialParams.fDtrControl = DTR_CONTROL_ENABLE;
	dcbSerialParams.fRtsControl = RTS_CONTROL_ENABLE;
	dcbSerialParams.fOutX = FALSE;
	dcbSerialParams.fInX = FALSE;

	timeouts.ReadIntervalTimeout = 50;
	timeouts.ReadTotalTimeoutConstant = 50;
	timeouts.ReadTotalTimeoutMultiplier = 10;
	timeouts.WriteTotalTimeoutConstant = 50;
	timeouts.WriteTotalTimeoutMultiplier = 10;
Perhaps there is something here that might be helpful to you. At present that's the best that I can do.

_________________
Graham
mathdon
Expert
Posts: 4726
Joined: Tue Jul 22, 2008 8:53 am
Location: Cambridge, UK

Post by mathdon »

I should probably have added the test code it applies for JP1.2:

Code: Select all

int jp12Test( void )
{
	DWORD bytesRead = 0;
	if ( !ReadFile( hSerial, cmdBuff, 20, &bytesRead, NULL ))
		return 0;

	cmdBuff[ 0 ] = 'E';
	DWORD bytesWritten = 0;
	if ( !WriteFile( hSerial, cmdBuff, 1, &bytesWritten, NULL ))
		return 0;

	bytesRead = 0;
	if ( !ReadFile( hSerial, cmdBuff, 1, &bytesRead, NULL ))
		return 0;

	if ( bytesRead == 0 )
		return 0;

	if ( cmdBuff[ 0 ] != 6 )
		return 0;

	return 1;
}
You can find the full source of jp12serial.dll version 0.14 here.
_________________
Graham
Kevin Timmerman
Expert
Posts: 142
Joined: Tue Jan 09, 2007 5:52 pm
Location: West Michigan

Re: Update - 10 Feb 2010

Post by Kevin Timmerman »

Thomas wrote:In his EEPROM adapter section of the MarketPlace, Tommy Tyler has a URL re obtaining a modified JP12serial.dll file from compendiumarcana. Got it, tried it with IR, consistently get a message 'JP12 Interface not loaded' .
I setup a VM with XP SP3 and got the same error. A new DLL will be available soon.
Kevin Timmerman
Expert
Posts: 142
Joined: Tue Jan 09, 2007 5:52 pm
Location: West Michigan

Post by Kevin Timmerman »

Fixed DLL

Source

The MSVC 9.0 CRT is now statically linked, so it will work with XP and 2K that do not have the MSVC 9.0 redistributable support files installed.
Thomas
Posts: 87
Joined: Sat Feb 16, 2008 1:16 pm

Post by Thomas »

Thanks, Kevin - I will try it this evening and report back.
Tom Carlson
The Robman
Site Owner
Posts: 21884
Joined: Fri Aug 01, 2003 9:37 am
Location: Chicago, IL
Contact:

Post by The Robman »

Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
mathdon
Expert
Posts: 4726
Joined: Tue Jul 22, 2008 8:53 am
Location: Cambridge, UK

Post by mathdon »

Thomas, in case you looked at the link Rob has given you before I made my posting there about DbgView, have a look again. DbgView should at least tell you whether jp12serial.dll actually starts searching COM ports for remotes, and whether it finds a remote at the port you are using.
________________
Graham
Thomas
Posts: 87
Joined: Sat Feb 16, 2008 1:16 pm

Post by Thomas »

Thanks all,

@ Graham
Just getting underway (more coffee!) and I will look at Rob's post next.

@Kevin
I plugged in jp12serial.dll ver 15 and it is working, at least on two of my computers. A slight setback for me, however, as I had coded to handle a default write size of 0x80 bytes as that was what IR.exe was sending with the earlier versions of the serial dll (JP1.x format).

I find that it also works as expected with SiLabs CP2102 adapter.

And I am still trying to understand USB buffer descriptors - but I now have the hardware in place, learning as I go......
Tom Carlson
stangbat
Posts: 58
Joined: Thu Feb 28, 2008 9:51 pm
Location: KC

XP Mode

Post by stangbat »

Don't know if this is the correct place to post this, but I was able to successfully get my Tommy Tyler JP1 USB cable to work on Win 7 64 Pro using XP Mode. I had to use some older Delcom drivers, Version 3.1.0.0. The newer ones kept blue screening the virtual machine and making it reboot. But IR interfaced with the Delcom controller and downloaded data from the remote.

Edit: Using IR 8.02 in the VM.

Edit #2: If you need any more information, let me know. I have a URC-8910B02. I haven't done anything other than download from the remote at this point.

Also, I cannot get the following drivers to work on a computer with XP SP3 (not a VM, a separate computer with XP as the OS):
4.7.0.0
4.6.0.0
I have to use 3.1.0.0. Versions 4.7 and 4.6 do not bluescreen my XP computer as they do the XP virtual machine. They install but give an error when synching with the remote. However, when using 4.7 and 4.6 with the XP Mode VM, it crashes when loading them during the driver installation.
Thomas
Posts: 87
Joined: Sat Feb 16, 2008 1:16 pm

Post by Thomas »

Fell off the map....

Not really, I was experiencing some frustration trying to get USB to work and put the project aside for a while.

I learned after the fact that 18F14K50 chips do not have debug hardware, which made the coding more challenging. Finally ordered a chip with debug capabilities and hope to make some progress which can be ported to the cheaper 14K50.
Tom Carlson
Thomas
Posts: 87
Joined: Sat Feb 16, 2008 1:16 pm

Update 3/1/2010

Post by Thomas »

Finally more forward progress. Compiled the Microchip USB demo for Communications Device class and actually got the computer to enumerate it. That one is C18 code, I did another in assembler which enumerates but does not do much else - it runs to about 3k bytes, which would halfway fill 14K50 program memory (C code is twice as large).

So I still have some work to pare it down, stir in a JP1 module and add the JP1.2/3 pipe.

One current issue, the COM1 UART port is running at 38400, but the USB is set to low speed, virtual COM port functioning at 26000, next step is to find the bug in the timing.
Tom Carlson
Post Reply