Page 4 of 5

Posted: Sat Oct 30, 2010 4:01 am
by MikeT
Hi RamBuck,

I finished a patch against jp12serial017 which could work. Can you please test it? My DIY cable seems to have a problem.

Here the patch, the complete source and a compiled binary for Intel Mac OS X 10.6:
/edit: cleaned it up
http://www.5dot1.de/arduino/jp12serial17to18.patch
http://www.5dot1.de/arduino/jp12serial018Source.zip
http://www.5dot1.de/arduino/libjp12serial.so

MikeT

Posted: Sun Oct 31, 2010 7:08 am
by MikeT
In the meanwhile I got my cable working and the communication to my URC-7950 also works with the jp12serial library from my last post on my iMac.

Additionally to the changes of the posted version, I had to disable the checksum check, when the checksum byte could not be read. This is somewhat dangerous, therefore I'm not posting this version without request.

When the remote type is read (10 signature bytes) the checksum can be read and is correct, but when 128 data bytes are read, the 1 byte read of the checksum fails. I tried to reduce the read block size to 64 bytes to make sure it isn't a buffer overflow problem, but It didn't help either.

Does anybody else have this problem using a URC-7950? Is this a Mac specific problem (could only be FTDI driver or timing)?

MikeT

Posted: Tue Nov 02, 2010 2:25 pm
by MikeT
MikeT wrote:when 128 data bytes are read, the 1 byte read of the checksum fails.
Is this a Mac specific problem (could only be FTDI driver or timing)?
I debugged the code on the same iMac hardware in a Windows 7 Virtual Machine using the FTDI driver installed in Windows and there it works.

Here are the details what happens under Mac OS X:
1. jp12GetIdentity() reads 4 bytes => ok
2. jp12GetVersion() reads 12 bytes => ok
3. readBlock(1536, 128) reads 130 bytes (cmd+128+checksum) => ok
4. readBlock(1664, 128) reads 130 bytes (cmd+128+checksum) => ok
5. readBlock(1792, 128) reads 128 bytes => error!

So this really is a Mac specific problem. It is reproducable every time with exactly the same effect. Does anybody have an idea?

MikeT

Posted: Tue Nov 02, 2010 2:55 pm
by The Robman
Thanks for your detailed descriptions Mike, hopefully one of the guys that know about this stuff will be able to chime in to let you know if it helps.

Posted: Tue Nov 02, 2010 4:41 pm
by MikeT
Hi Robman,
The Robman wrote:Thanks for your detailed descriptions Mike, hopefully one of the guys that know about this stuff will be able to chime in to let you know if it helps.
I found at least one of the problems:
When initializing the serial port, the following line is missing:
options.c_lflag &= ~IEXTEN; // this is needed on a Mac

My remote contains the character 0x16 (SYN) in the flash. This is filtered out, when the IEXTEN flag is set. I'm reading the description of all the other thousand flags to be sure not to miss any other.

MikeT

Posted: Tue Nov 02, 2010 5:46 pm
by MikeT
Hi Robman,
The Robman wrote:Thanks for your detailed descriptions Mike, hopefully one of the guys that know about this stuff will be able to chime in to let you know if it helps.
I found at least one of the problems. When initializing the serial port, the following line:

Code: Select all

  options.c_lflag |= IEXTEN;
has to be replaced by

Code: Select all

  options.c_lflag &= ~IEXTEN; // this is needed on a Mac
My remote FLASH contains the character 0x16 (SYN). This is filtered out, when the IEXTEN flag is set. I'm reading the description of all the other thousand flags to be sure not to miss any other.

It works, now I can download and upload :)

Here the links to the updated files:
http://www.5dot1.de/arduino/jp12serial17to18d.patch
http://www.5dot1.de/arduino/jp12serial018dSource.zip
http://www.5dot1.de/arduino/libjp12serial.so

MikeT

Posted: Wed Nov 03, 2010 9:33 am
by mathdon
Do you think the Mac OS X versions of DecodeIR and jp12serial are now ready for release? If so, I would like to add them to the versions currently in the Tools folder. Now that the release of RMIR v2.00 seems close, it would be particulary nice if that could also include Mac OS X support.

I know nothing about Macs, so this may be a silly question, but I see that you have called your jp12serial binary "libjp12serial.so". Alex750 said in his development that the extension needed to be ".jnilib", and he used that also for his version of DecodeIR. Is there an issue here?

He also posted three binaries, one for each of three different hardware platforms. I may have missed it, but which is your platform and are you in a position to compile also for the other two, so that support for all three platforms can be released at the same time?

Posted: Wed Nov 03, 2010 2:05 pm
by MikeT
mathdon wrote:Do you think the Mac OS X versions of DecodeIR and jp12serial are now ready for release?
jp12serial is ready for a beta release now. I tested it on Windows 7 with IR.exe 8.03 and an Mac OS X 10.6.4 with RemoteMaster 1.99b.

I don't have a Linux or Solaris machine a the moment, therefore I even couldn't compile it there.
mathdon wrote:I see that you have called your jp12serial binary "libjp12serial.so". Alex750 said in his development that the extension needed to be ".jnilib"
I was just too lazy to rename it before uploading and I wanted to keep the same Makefile for Linux and Mac OS X but actually the extension .jnilib is required.
mathdon wrote:He also posted three binaries, one for each of three different hardware platforms. I may have missed it, but which is your platform and are you in a position to compile also for the other two, so that support for all three platforms can be released at the same time?
I adapted the Makefile.MacOSX and compiled a so called "universal" binary which contains the code of i386, x86_64 and ppc in one file:
http://www.5dot1.de/arduino/libjp12serial.jnilib
http://www.5dot1.de/arduino/jp12serial018eSource.zip
http://www.5dot1.de/arduino/jp12serial17to18e.patch

MikeT

Posted: Wed Nov 03, 2010 3:25 pm
by MikeT
Here the new archives with adapted Makefile.MacOSX and the separated binaries for x86_64, i386 and ppc:
http://www.5dot1.de/arduino/jp12serial_018f_MacOSX.zip
http://www.5dot1.de/arduino/jp12serial_018g_Source.zip
http://www.5dot1.de/arduino/jp12serial17to18f.patch

MikeT

Posted: Fri Nov 12, 2010 9:06 am
by mathdon
I have now posted official releases of DecodeIR and jp12serial that include file versions for Windows, Linux (both 32-bit and 64-bit) and Mac OS X (PowerPC and both 32-bit and 64-bit Intel). You can find them here:

DecodeIR v2.41 release 2
jp12serial v0.18

The release version of RemoteMaster 2.00 (RMIR), due shortly, will include support for all three operating systems.

After a LONG absence...Thank you

Posted: Mon Feb 28, 2011 10:56 pm
by alex750
When I started this thread, I didn't even know whether a port to OS X would work--I was working from a wild guess (it works in Linux, Linux and OS X are both Unix, therefore it just might work in OS X). And I didn't have the necessary cable for testing.

With your help, I got an initial build of the binaries that appeared to work. Specifically, while running in OS X, DecodeIR successfully decoded some learned signals imported from Windows, and the existence of some sort of JP1.x serial interface library was recognized by RMIR.

When, in early January, I finally got my hands on one of Tommy's cables (with the EEPROM adapter--both my remotes are old-school JP1) for testing, I learned to my dismay that it didn't work in OS X. It worked in my Windows VM (with both IR and RMIR) and my Linux PC, but I couldn't save the EEPROM dumps with RMIR in either Windows or Linux. I guessed--correctly as it turned out--my /dev/tty entries in the jp1serial source were incorrect. But I was busy elsewhere and had no time to check back for an update...until now.

With this latest version (2.00), everything works 'just like in Windows'.

I'd like to thank gfb107, mathdon, and Kevin Timmerman, who helped me get the code ported, and RamBuck and MikeT, who found my bugs and got everything working. It's been a long, long journey from those early days, when I was hand-programming EFCs into my Cinema 6! :)

Posted: Fri Mar 04, 2011 4:41 pm
by unclemiltie
Are there any tricks to getting RM and RMIR to work on Mac's? I've downloaded what I believe are the most recent of everything (RemoteMaster 2.0 release, RemoteMaster 2.08 jar file, DecodeIR and JP12serial, RDFs and MAPS) but when I try to download from my remote I get no flashing lights on my USB cable and it doesn't appear to download anything.

Suggestions?

I'm running Snow Leopard 10.6.4 on this MacBook Pro.

Posted: Fri Mar 04, 2011 4:41 pm
by unclemiltie
Are there any tricks to getting RM and RMIR to work on Mac's? I've downloaded what I believe are the most recent of everything (RemoteMaster 2.0 release, RemoteMaster 2.08 jar file, DecodeIR and JP12serial, RDFs and MAPS) but when I try to download from my remote I get no flashing lights on my USB cable and it doesn't appear to download anything.

Suggestions?

I'm running Snow Leopard 10.6.4 on this MacBook Pro.

Posted: Fri Mar 04, 2011 5:31 pm
by MikeT
Hi unclemiltie,

have you installed the FTDI USB serial drivers?

After you plug in your cable, what do you see when you execute the following command in a Terminal:

Code: Select all

ls -l /dev/cu.usbserial*
You should see something like this:

Code: Select all

crw-rw-rw-  1 root  wheel   11,  17  5 Mär 00:17 /dev/cu.usbserial-@6008i8L
When this works, you can start RM IR and choose "JP1.X Serial..." in the "Remote/Interface" menu. In the window which pops up, you should see the device name of you cable ("/dev/cu.usbserial-@6008i8L" in my case) as second choice. Just select "Auto-detect" in this dialog and click OK.

I'm using RemoteMaster V2.00 + RDFs + maps + FTDI driver, but no additional downloads because DecodeIR 2.41 and JP1.X Serial 0.18 are already included in the distribution. Don't use other versions, because older version will not work.

When you open the Help/About dialog, you should see some text like this:

Code: Select all

RDFs loaded from /Users/michael/Documents/JP1/RemoteMaster.v2.00/rdfs
Images and Maps loaded from /Users/michael/Documents/JP1/RemoteMaster.v2.00/maps
DecodeIR version 2.41
Interfaces:
JP1.X Serial version 0.18 

System Properties:
java.version = "1.6.0_22"
java.vendor = "Apple Inc."
os.name = "Mac OS X"
os.arch = "x86_64"
Libraries loaded from /Users/michael/Documents/JP1/RemoteMaster.v2.00/Mac OS X-x86_64
MikeT

Posted: Fri Mar 04, 2011 6:53 pm
by unclemiltie
that's it. no driver.

Where is that?


Would it be worthwhile for me to write up a "how to get this stuff working on a mac"

I'd also like to make icons on the desktop that are RM and RMIR with the right parameters. is that possible? (with the right icons would be even better!)