Re: How to access serial port data in Linux using Euphoria?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi

Set the serial port wih setserial

open the port for read or write eg open("
dev
ttyS0", "r") (may need to be root for this, or allow program to have access)

get bytes from the serial port with getc or gets

put bytes with put putc or puts

Remember that on linux all files, terminals, ports access etc are just streams of data, you just have to tell the computer where to put them. While the above is obviously extremely simplified, its a good starting point for experiments.

Read everything else you can, there's no simple one size fits all solution.

If you're wanting to do modem stuff just use mgetty

Chris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu