Hello there!
I am new to low level programing. I have a Moxa 5232 Device server. I have a rs485 device that I like to be able to access from a Linux computer. It is a 2 wire 1/2 duplex rs485 enabled device.
After installing the Moxa drivers I have a "/dev/ttyr00 & /devttyr01" devices/ports on my Linux server.
In order for me to access this device, I wrote a C program. It basically opens the port and then writes some ASCII text to the port. If I send H-E-L-L-O the device should respond with a H-I and vice verse.
The trick is, since it is a 1/2 duplex I need to be able to send the initial text and then flip the line so that I could receive the data. If I don't receive the data with in 100ms then I have to resend the initial text again.
Is there any sample codes available for C on the net. I have been searching for the last 3 days and I am having no luck with it. Unfortunately Moxa does not have any sample codes on their web site and their tech support is not the greatest. I think they are more into the windows side than Linux.
Please let me know of any sample codes or ideas that I could make use of. Thanks in advance for all of your helps :)
CM23