68kMLA Classic Interface

This is a version of the 68kMLA forums for viewing on your favorite old mac. Visitors on modern platforms may prefer the main site.

Click here to select a new forum.
Serial Network Programming
Posted by: CodeMonkeyZA on 2016-07-04 09:14:23
Hi,

So, I would like to do some "network" programming on my Macintosh SE/30, if it is possible. I am fairly versed in C, and I was hoping that I would be able to listen to as well as write to the ports. Unfortunately, I have been unable to locate any reference to how it might be possible to do this. Does anyone know how to listen to a port using C, or any other programming language for that matter?

During my search, I saw someone was able to communicate to an Arduino using a vintage Mac, so I assume it must be possible to read and write to the ports... Any suggestions?

Thanks a ton!

CM

Posted by: PowerPup on 2016-07-04 11:40:57
The best resource for programming on the Macintosh would be the Inside Macintosh books from Apple.

Inside Macintosh: Devices has a chapter on Serial Drivers/Communications (Ch 7)

HTML Version of Chapter 7

PDF Version of Chapter 7

Posted by: PowerPup on 2016-07-06 10:40:05
Is this the video you were referring to?
 

https://www.youtube.com/watch?v=k6JPoB0M4zM

In the video he's using a terminal emulator such as ZTerm to talk directly to the Arduino via the Mac's serial ports.

Posted by: olePigeon on 2016-07-06 11:14:23
You also might want to look into AppleTalk programming.  That's Apple's special network protocol that ran over the serial port (and later the ethernet port called EtherTalk.)  Lots of games and software used AppleTalk.

Posted by: CodeMonkeyZA on 2016-07-07 00:58:57
Thanks for the replies!

The Inside Macintosh links really helped! Using it, I was able to send a stream of data over the serial port to control my Raspberry Pi! The plan now is to implement some home automation with the Mac as the control  😉  
 

Thanks a lot guys  🙂

Posted by: PowerPup on 2016-07-07 14:35:57
Sounds like an awesome project!

Please do keep us up to date on your progress. It would also be neat to see a repository of any code you make for the project, for preservation/collaboration/etc. 😉

Posted by: Bunsen on 2016-07-18 10:10:30
There's also a book called Inside Appletalk which might be worth hunting down.

Posted by: KellyTurci on 2016-09-04 10:35:57
Hi...i am a new user here. As per my knowledge you should use the Mam for Mac OS.

Using the MAc you can directly you can directly use the serial ports for programming.

Serial port is directly usable in Mac.

1