Read serial port like Linux

6 posts / 0 new
Last post
afxgroup
afxgroup's picture
Offline
Last seen: 5 months 2 weeks ago
Joined: 2011-02-03 15:26
Read serial port like Linux

Someone know if it is possible to read the serial port using a file? Something like SER0: or a device is always needed?

thomas
thomas's picture
Offline
Last seen: 3 months 1 week ago
Joined: 2011-05-16 14:23
Re: Read serial port like Linux

It's called SER:

afxgroup
afxgroup's picture
Offline
Last seen: 5 months 2 weeks ago
Joined: 2011-02-03 15:26
Re: Read serial port like Linux

Yes, SER: sorry. But it is possible to read and write with fopen, fread and fwrite like a simply file? Like tty on linux?

thomas
thomas's picture
Offline
Last seen: 3 months 1 week ago
Joined: 2011-05-16 14:23
Re: Read serial port like Linux

That's what I tried to tell you. SER: is a DOS handler for the serial port. It's based on port-handler which is part of the Kickstart since Kick 2.0 IIRC. Older versions had it on disk.

hypex
hypex's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 2011-09-09 16:20
Re: Read serial port like Linux

Yes SER! :-D

There is SER and there is AUX for unbuffered serial use. SER wll get stuck until it sees a newline, but AUX goes through straight away.

It sounds like you are porting from Linux. Unfortunately SER or AUX can't be guaranteed to be persistent as they need to be in DOSDrivers. Though they commonly are installed there.

The Amiga way is obviously through serial device though it's harder to set up than a simple file channel.

afxgroup
afxgroup's picture
Offline
Last seen: 5 months 2 weeks ago
Joined: 2011-02-03 15:26
Re: Read serial port like Linux

Thanks.. i'm getting old and sometimes forgot the basics of AmigaDOS.. thanks. I'll try and i'll be back to you (:|

Log in or register to post comments