Porting RM libraries to Mac OS X
Moderator: Moderators
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
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
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
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
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.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)?
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
-
The Robman
- Site Owner
- Posts: 21890
- Joined: Fri Aug 01, 2003 9:37 am
- Location: Chicago, IL
- Contact:
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.
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Hi Robman,
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
I found at least one of the problems: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.
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
Hi Robman,
has to be replaced by
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
I found at least one of the problems. When initializing the serial port, the following line: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.
Code: Select all
options.c_lflag |= IEXTEN;
Code: Select all
options.c_lflag &= ~IEXTEN; // this is needed on a Mac
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
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?
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?
Graham
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.mathdon wrote:Do you think the Mac OS X versions of DecodeIR and jp12serial are now ready for release?
I don't have a Linux or Solaris machine a the moment, therefore I even couldn't compile it there.
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:I see that you have called your jp12serial binary "libjp12serial.so". Alex750 said in his development that the extension needed to be ".jnilib"
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: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?
http://www.5dot1.de/arduino/libjp12serial.jnilib
http://www.5dot1.de/arduino/jp12serial018eSource.zip
http://www.5dot1.de/arduino/jp12serial17to18e.patch
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
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
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.
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.
Graham
After a LONG absence...Thank you
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!
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!
Remotes: URC-6800 "Cinema 6L", URC-8910 ("hat switch" style)
RCVR: Yamaha HTR-5440 VCR: JVC HR-VP782U (NTSC) TV: Elgato EyeTV Hybrid (NTSC/ATSC)
Media server: Western Digital WD TV Live Other: iHome IH5 iPod clock radio, Whirlpool window A/C
RCVR: Yamaha HTR-5440 VCR: JVC HR-VP782U (NTSC) TV: Elgato EyeTV Hybrid (NTSC/ATSC)
Media server: Western Digital WD TV Live Other: iHome IH5 iPod clock radio, Whirlpool window A/C
-
unclemiltie
- Expert
- Posts: 1819
- Joined: Wed Jan 21, 2004 12:50 pm
- Location: Pittsburgh, PA
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.
Suggestions?
I'm running Snow Leopard 10.6.4 on this MacBook Pro.
this JP1 stuff is a sickness!
-
unclemiltie
- Expert
- Posts: 1819
- Joined: Wed Jan 21, 2004 12:50 pm
- Location: Pittsburgh, PA
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.
Suggestions?
I'm running Snow Leopard 10.6.4 on this MacBook Pro.
this JP1 stuff is a sickness!
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:
You should see something like this:
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:
MikeT
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*Code: Select all
crw-rw-rw- 1 root wheel 11, 17 5 Mär 00:17 /dev/cu.usbserial-@6008i8L
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
-
unclemiltie
- Expert
- Posts: 1819
- Joined: Wed Jan 21, 2004 12:50 pm
- Location: Pittsburgh, PA
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!)
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!)
this JP1 stuff is a sickness!