itsalljustaride Posted April 8, 2007 Share Posted April 8, 2007 I have a project that I'm going to be working on this summer that I fear may require me to code a hardware driver for a device before I can even think about making an interface app. Our lab has an analog video/audio network that is controlled by a Windows machine at the moment. The lab was converted recently to a mac lab, but we had to leave in the windows machine just for the sole purpose of being able to control this network. The application that distributes the AV is awful. It's bulky, buggy, ugly, and does a whole bunch of stuff that we don't even need anymore. The only thing it DOES do that we need is interface with a board via serial port, telling it which stations get which AV source, as well as use some universal remotes for the VCR, DVD, etc. What I want to do is write a lightweight Mac app that interfaces with this board so we can finally toss the Windows machine in the garbage. The question becomes, where do I even start? Would I need to write a driver before I could do anything? How do I know what data to send this board? What is the "language" it speaks? What commands will it recognize? Would I need detailed technical notes from the original engineers to even get off the ground? It wouldn't seem like it for something that does what seem like fairly simple tasks (tell this station to get that audio/video signal from one of 4 or 5 sources). It's basically a big AV hub with some fairly rudimentary device controls. Link to comment https://www.insanelymac.com/forum/topic/47815-serial-port-hardware-interfacing/ Share on other sites More sharing options...
U.C. Posted April 8, 2007 Share Posted April 8, 2007 Well if you can connect to that device in Windows through Hyper Terminal, then u can use the "screen" command. After you find out the speed at which its COM port works, then you just need to find out the commands the windows app sends and manually type them after connecting to the board. After you got all that working, then simply make a bunch of Apple scripts. Example: My Router is connected to my comp using the COM1 port. I connect to it using either Hyperterminal or the Screen command in Mac. Its speed is set at 115200bps. It uses a linux kernel, so commands are not a problem. Heres what I do: 1) Open Terminal 2) Type in "screen /dev/tty1 115200" 3) Send commands to router 4) Quit by typing Apple+A and Apple+| There are several guides on google on how to use Macs to communicate to RS-232's. RS-232's are a fairly commonly used serial port controllers. Link to comment https://www.insanelymac.com/forum/topic/47815-serial-port-hardware-interfacing/#findComment-342407 Share on other sites More sharing options...
gnubeard Posted April 20, 2007 Share Posted April 20, 2007 This is a fairly advanced project. The Mac interface side can likely be done with a Mac-mini and a USB->serial converter. You shouldn't need a low-level driver for this, either. What you will need to do is to write the Mac-side application. Since you're asking about specs for the board, I assume you have no programming information for this legacy device? If the company that built the board is still around, you might want to contact them. They might have programming specs for the board. If not, you'll need to reverse engineer it. Build a serial snooper. Basically, its a device that sits between your Windows box and the AV board and relays everything that is sent between them to your Mac. Set up a logging program on the Mac, and run the Windows machine through its paces doing all the stuff you need to do. Once you have your log file, make a pot of coffee and have at reverse engineering the protocol. Once you have a draft of the protocol figured out, implement it on the Mac and try it out. Iterate as needed. Link to comment https://www.insanelymac.com/forum/topic/47815-serial-port-hardware-interfacing/#findComment-350376 Share on other sites More sharing options...
itsalljustaride Posted April 20, 2007 Author Share Posted April 20, 2007 This is a fairly advanced project. The Mac interface side can likely be done with a Mac-mini and a USB->serial converter. You shouldn't need a low-level driver for this, either. What you will need to do is to write the Mac-side application. Since you're asking about specs for the board, I assume you have no programming information for this legacy device? If the company that built the board is still around, you might want to contact them. They might have programming specs for the board. If not, you'll need to reverse engineer it. Build a serial snooper. Basically, its a device that sits between your Windows box and the AV board and relays everything that is sent between them to your Mac. Set up a logging program on the Mac, and run the Windows machine through its paces doing all the stuff you need to do. Once you have your log file, make a pot of coffee and have at reverse engineering the protocol. Once you have a draft of the protocol figured out, implement it on the Mac and try it out. Iterate as needed. Thanks. I figured it would take some kind of interceptor, but wasn't sure if such a thing existed. I know the company that makes the board is still around, but I'm not sure how willing they'd be to pass along their protocol info, but I'll definately try to take the easier route and get them to cough it up. If that doesn't work I can try to decrypt it by the method you mentioned above. Thanks for the tips. Link to comment https://www.insanelymac.com/forum/topic/47815-serial-port-hardware-interfacing/#findComment-350557 Share on other sites More sharing options...
gnubeard Posted April 25, 2007 Share Posted April 25, 2007 If you need help building a serial snooper, PM me. Link to comment https://www.insanelymac.com/forum/topic/47815-serial-port-hardware-interfacing/#findComment-353678 Share on other sites More sharing options...
Recommended Posts