JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

Porting IR to the Mac: It's time to ask
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Software
View previous topic :: View next topic  
Author Message
alex750



Joined: 14 Sep 2003
Posts: 70
Location: Fayetteville AR USA

                    
PostPosted: Fri Dec 19, 2003 2:41 am    Post subject: Porting IR to the Mac: It's time to ask Reply with quote

Now that a USB interface is available, the big question becomes: what about porting IR to the Macintosh?

One early idea I had was starting with lirc (the Linux JP1 program), porting that to OS X's command line, then building an Aqua interface. But lirc is not IR; most JP1ers use IR to handle actual programming, and most newbie questions, FAQs, and other docs refer to IR, not lirc.

Plus, an OS X-only solution would leave Classic users out in the cold: there are lots of Macs out there (starting with the 7200) which can use USB cards, under MacOS 8.6 or later, but cannot run Mac OS X. On the other hand, the newest Macs require OS X and cannot run Classic at all, and those of us who can use OS X would definitely want to do our JP1 programming there; RM doesn't work well in Classic, and an OS-specific Excel (Excel:mac 2000 for Classic, Excel:mac X for OS X) is preferable for running KM and PB.

For the record, RM 0.81 works just fine on my Mac, running under Java 1.4.1 in OS X 10.2.6 'Jaguar' on a Beige G3. I don't have Excel on the Mac, but I've been able to import my KM upgrades and work with them in RM, and the resulting upgrade codes are byte-for-byte identical. As for PB, I haven't had the need (yet) for custom protocols.

The need for back- and forward compatibility means 'MacIR' should probably be built as a Carbon application, at least for now; this would permit the same program to be used with OS versions from Classic 8.6 to the present OS X 10.3.2 'Panther'. I envisioned the interface to look and feel as much like IR as possible, but also conform to Apple's Human Interface Standard (e.g., Quit is always Command-Q, and is always the last item in the File menu; the Edit menu always includes Cut, Copy, Paste, Clear, and Select All; TextEdit and other system services must be supported; and so on). For Classic operation, a USB driver might also be needed; USB support is built into OS X. There would be no need for a "Set Port Address" option, since no Mac has a parallel port, but "Check Interface" might still be used.

New features might include better integration with KM, PB, and/or RM, automatic updating of RDFs, and possibly a provision for installing and removing extenders; since extenders are now built into, and distributed via, the RDFs, this could be done within MacIR without the need for a separate extender installer. (Of course, extender developers still need S3C80, 6805, and 740 editors, assemblers, debuggers, RDF build tools, etc., but that's another story.)
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21234
Location: Chicago, IL

                    
PostPosted: Fri Dec 19, 2003 10:08 am    Post subject: Reply with quote

The problem has always been finding people to do the Mac work. The guys who created all the current JP1 tools are PC only people AFAIK, so it would be up to someone like yourself to take the initiative and start the Mac project. If you're up for it, go for it.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
jamesgammel
Exile Island Resident


Joined: 03 Aug 2003
Posts: 394
Location: Gillette, Wyoming

                    
PostPosted: Fri Dec 19, 2003 11:18 am    Post subject: Reply with quote

Rob, suggestion.

This MAC issue has come up several times in the past. Obviously it's going to take programmers with MAC knowledge. How about setting up a "Poll" to see how many Mac/programming "experts" would be willing to co-work on the project. if you can get at least 4-5, then maybe set up and give them a yahoo JP1-MAC forum for someplace to share ideas, program code, division of "project" areas, etc. Right now, I don't know if we have enough programming experts to co-share in working on a project of this magnitude. Maybe they could start with a MAC version of IR. I'd assume at least one would have to know delphi to see how IR is set up (to read and interpret IR's code).

Jim
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Nils_Ekberg
Expert


Joined: 02 Aug 2003
Posts: 1689
Location: Near Albany, NY

                    
PostPosted: Fri Dec 19, 2003 8:11 pm    Post subject: Reply with quote

Since the ultimate goal is for RM to incorporate IR functionality the question on my mind is which will take longer to get there, RM or IRMac. Since so far no one has volunteered to do the Mac work RM may get there quicker but that is going to be a long time I think.

I know Greg has his hands full just getting all of the KM to RM functions in place even though it is real close now.
_________________
Nils
Files Section
Diagnosis File Section
Back to top
View user's profile Send private message Send e-mail
alex750



Joined: 14 Sep 2003
Posts: 70
Location: Fayetteville AR USA

                    
PostPosted: Sat Dec 20, 2003 12:44 am    Post subject: still Delphi based? Reply with quote

Is IR still based on the Delphi libraries? I thought one of the goals of the 4.0 version was to get away from that...

For Jaguar users, Apple's Developer Tools suite includes the Cocoa (native OS X) and Carbon (common Classic-OS X) runtime libraries. Its native language is Objective C, but it's supposed to be backward-compatible with ANSI C and C++.

If you're running Panther (which I can't, yet) the new XCode environment (from what I can gather from Apple's developer site) is said to include a greatly expanded class library as well as some new tools to make interface building easier.

Of course, there's also the BSD/Darwin development environment, which includes all the familiar (to Unix geeks) GNU tools and libraries: gcc and gcc++, glibc, gtk, a CVS system with fink, and so on: this, again, is the route I initially envisioned taking with lirc.

All these are free, under either the GNU or Apple Open Source licenses. Whether use of these would require opening IR's source code is uncertain. If a Mac port of IR would require a wholesale rewrite, or a completely new code base, in order to function, perhaps a Java solution (either as part of RM or a separate program) would be better. The only problem I have with Java is speed, or lack thereof: RM takes so long to load that I sometimes forget I've launched it! (Once it's running, though, it's not too bad--it's at least as fast as KM on my antique Pentium. 8) )
Back to top
View user's profile Send private message
VitalyRindner



Joined: 18 Jan 2004
Posts: 3

                    
PostPosted: Sun Jan 18, 2004 4:08 am    Post subject: Reply with quote

Maybe I'm missing something but, I am able to run RemoteMaster from my Mac running Panther.
Unfortunately, I don't yet have a JP1 USB cable so that I can test.
I also noticed that I get an error when trying to open the KM excel sheet under Microsoft Office v.X. Anyone else try this?


Last edited by VitalyRindner on Mon Jan 19, 2004 10:53 am; edited 1 time in total
Back to top
View user's profile Send private message
cdhixson



Joined: 04 Aug 2003
Posts: 48
Location: Charlotte, NC USA

                    
PostPosted: Mon Jan 19, 2004 9:00 am    Post subject: Reply with quote

I see a bigger problem that needs to be addressed. The USB interface needs a special driver written by the USB chip maker. The driver is only for Windows as far as I can tell. Someone will have to write a Mac driver for this hardware. That doesn't sound easy to me.
_________________
Chris
Back to top
View user's profile Send private message Send e-mail
VitalyRindner



Joined: 18 Jan 2004
Posts: 3

                    
PostPosted: Mon Jan 19, 2004 10:52 am    Post subject: Reply with quote

About the KM spreadsheet, upon further analysis, it seems that it works except for the New, Load, Save buttons. Everything else seems to work.
Back to top
View user's profile Send private message
VitalyRindner



Joined: 18 Jan 2004
Posts: 3

                    
PostPosted: Mon Jan 19, 2004 10:55 am    Post subject: Reply with quote

Has anyone tried one of those USB->serial cables on a Mac?
If that works, we could use the JP1 serial cable.
Back to top
View user's profile Send private message
Mark Pierson
Expert


Joined: 03 Aug 2003
Posts: 3017
Location: Connecticut, USA

                    
PostPosted: Mon Jan 19, 2004 11:08 am    Post subject: Reply with quote

VitalyRindner wrote:
If that works, we could use the JP1 serial cable.

I think you'd have the same sort of problem that the USB interface has: drivers. IR contains its own driver used by the serial and parallel ports. It's obviously Windows-specific, so I'm certain it wouldn't run on a Mac.
_________________
Mark
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bsoplinger



Joined: 04 Jan 2004
Posts: 37

                    
PostPosted: Thu Jan 22, 2004 9:12 am    Post subject: Reply with quote

Hmm, what about the keyspan (or other) USB->serial adapter. Lots of things that talk serial seem to work with that, so couldn't we just talk serial to the general serial port and pray that keyspan will do all the work we need? After all, the Palm program works fine for folks and I'm sure it doesn't do anything special with the serial port. Then we could just use the IR code for its serial work, unless there's some very fancy timing issues built into the code, no?
Back to top
View user's profile Send private message
gjarboni
Expert


Joined: 20 Sep 2003
Posts: 294
Location: Columbia, MD

                    
PostPosted: Fri Jan 23, 2004 8:31 pm    Post subject: Reply with quote

bsoplinger wrote:
Hmm, what about the keyspan (or other) USB->serial adapter. Lots of things that talk serial seem to work with that, ...


Unfortunately, it's not that simple. The serial interface designed by Tommy does not use normal serial communications. To quote from his "HOW TO BUILD A SERIAL PORT INTERFACE FOR JP1":

Quote:
Instead, the PC uses the Transmit Data (TXD) line and two handshake lines, Data Terminal Ready (DTR), and Request To Send (RTS), to control RESET, SDA, and SCL signals to the EEPROM. And it uses the Clear To Send (CTS) status input to receive data on the SDA line from the EEPROM.


This approach is sometimes called "bit banging" and it raises and lowers signal lines to talk I2C to the eeprom. I don't know specifics of I2C, but uploading to a 2K eeprom could take at least 16,000 toggles (almost definitely more, I've never looked into the I2C protocol). I've tried using USB -> Serial adapaters (and others have as well) and the adapters can't keep up.

In order to get Mac support you'd need a chip that has I2C (inter-IC Communications) commands and Mac support. That way you could design a Mac USB JP1 interface. Or you could port the Windows driver for the Delcom chip to the Mac.
Back to top
View user's profile Send private message Send e-mail AIM Address
gjarboni
Expert


Joined: 20 Sep 2003
Posts: 294
Location: Columbia, MD

                    
PostPosted: Fri Jan 23, 2004 8:35 pm    Post subject: Reply with quote

gjarboni wrote:
Or you could port the Windows driver for the Delcom chip to the Mac.

Actually, it looks like things are looking a little better for you Mac users. Delcom has released a Mac driver. You can check it out here:
Back to top
View user's profile Send private message Send e-mail AIM Address
robert



Joined: 27 Mar 2004
Posts: 6

                    
PostPosted: Sat Mar 27, 2004 11:09 pm    Post subject: Reply with quote

Where is the USB communication code in the current PC system - application and file?

I'm a Mac developer interested in this software. But, I just stumbled onto this whole thing tonight, so I'm completely unfamiliar with "RM", "IR", etc. What I have looked at is that on the PC there are Decode_IR.DLL which decodes IR sequences and there is IR.exe which is where all the programming happens.

I'm also an electrical engineer. I looked at the USB chip. I see there is mention of a Mac driver, but I don't think it is necesarily needed. On the Delcom site, they clearly indicate that you can either use their driver with it's built in commands or you can write commands (fully documented on their site) directly to their chip via the USB port. Since OS X supports USB, this latter option should be fairly easy.

So, my first question is "where should/would I begin"? I think what would make the most sense would be to first establish communication capabilities and build from there. So I need to build a cable - that's just a matter of taking some time to do it. Next is figuring out what I need to send to the cable for communication. So here's the real question - where is the USB communication code in the PC application. Is it in IR.exe and if so, what file?

Any additional "quick reference" of applications (if one already exists, just point me to it), their names and what they are for, how they all relate and fit together, would be greatly appreciated.

Robert
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21234
Location: Chicago, IL

                    
PostPosted: Sat Mar 27, 2004 11:21 pm    Post subject: Reply with quote

You've found the main one that you need, that being IR.exe. That's the first and most important stumbling block. If you can get that to communicate with any of the interfaces, that would be a great start.

Next up would be the DecodeIR.dll, which as you found, is used to decode learned signals.

KM is an Excel spreadsheet that is used to create upgrades. There's virtually no chance that this will work with Excel for Mac, so you can skip right past that.

Finally there's RM, which is a Java program that does the same task as KM, it's used to create upgrades. In theory at least, this one should be ready to go on the Mac platform as Java is supposed to be platform independant.

Good luck.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - Software All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
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


 

Powered by phpBB © 2001, 2005 phpBB Group
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control