You don’t really say what type of problems you are having. At that speed, 115200baud, the port might be a little more sensitive to noise than you expect. Could that be the problem? Also, make sure you are using a full 9 wire serial connection and that if there is a modem eliminator on cable or connector that it is not simple three wire version. Otherwise you will lose any hardware protocol. At 115200 baud that would probably be disastrous.
I changed the bound rate to 9600 but its still the same.
The next strange thing is that if I do
cat < /dev/ser2
and send random characters via hyper terminal and press enter - they appear but if I use a different application (the listen32 ) and send some data they won’t be there.
( However If just after that I return to hyper terminal and send anything else the message from the listen 32 appear ).
I think that I don’t really understand what is going on.
but that still don’t brings me closer to understanding why function read() returns -1 and don’t put anything to the buffer.
Sorry to reply today but I have access to the board Mon-Fr ;]
I used your code and some of your ideas and manage to get one port up and running perfectly (almost) the other two seems to be resistive to my motivation and persuasion
But I run into another strange problem - Now I send messages /receive them but after a while my port is starting to go nuts.
It stills get the messages but when I try to send something I get err 11 resource temporary unavailable - even if I try to open() it again the same thing happens - furthermore until I reset the board no application can send() to it
when I do echo “smt” > /dev/ser2 it does nothing (hangs kind off)
My advice would be to use a hardware debugger to see if you can send and receive a byte at a time without any trouble. If not, it’s a hardware issue (broken hardware or it’s not being configured correctly at boot time - clocks, gpios, port enable, power management, etc). If you can then it’s time to dive into the driver source to see where things are going wrong. If you don’t have experience with the way serial ports work you’ll have a bit of a learning curve.