open port error

The device is PortServer TS16 for network, I find that sometimes I open(/dev/ttyaa00, 115200, 8, 1, 0) error, and the return value is 22(Invalid argument), and open it again the error is 11(Resource temporarily unavailable), the /dev/ttyaa00 has been closed before that operation and return 0. This happens very frequently. I don’t know what’s the reason. Can you help me??? thank you very much.

Message was edited by: f_kai8025

What operating system version are you using?

What driver version are you using?

Does fuser /dev/ttyaa00 show processes?

If you telnet to the PortServer, login as root and issue the who command, is anything running on the port?

os:Fedora 8,
This time the error happens to the /dev/ttyaa01
fuser /dev/ttyaa01 nothing
telnet who
TTY user Connected from Connected to session
2 logging in 0
17 root local shell 0

You will need to configure the ports on the unit for use with the RealPort driver. Telnet to the unit, login as root and issue the following:

#> set port dev=rp range=*

The unit should be rebooted afterwards for the change to take effect:

#> boot action=reset

ok, I will try it later.
Is this “set tcp realport=771” needed??
could you tell me what is the realport??
And if I do not config like this, why the problem happens that port is opened with errors as described frequently but sometimes correctly ???
I will tell you the result! thank you very much!

Message was edited by: f_kai8025

Message was edited by: f_kai8025

The driver you are using is called RealPort. When using RealPort (to obtain tty devices), you will need to change the port dev/profile type to “rp”.

The default dev/profile is “term”. The term setting forces a login prompt from the PortServer unit. This will cause a race condition with the RealPort host - whoever gets to the port first wins!

You do not need to apply the “set tcp” command.

oh, Could you tell me what dose it mean that “2; no user; no connect from; logging in; 0” when the open error happened. Why dose the error not happen at first, but after working for a while??

If the port is set to “term” the login will spawn at random, causing the behavior you are reporting.

The dev=rp setting will turn off the login, allowing full control for the Realport host - ttyx## device.

OK, I have done as you described but how can I confirm the type setting is rp ??? I log on the web of the serial port ( root, and find the setting of each port the type of realport, terminal, …, not anyone selected. Should I set every port type to realport at the web???

Message was edited by: f_kai8025

Any ports that you want to access from the Unix host (ttyx##) will need to have the RealPort setting applied.

Do you mean that I only do “set #> set port dev=rp range=*
#> boot action=reset” is not enough??? I must set the every port setting to real port by web GUI??? If I don’t config every port on web, the problem will come out again randomly?? But the '’ in the command "set port dev=rp range=" is not to all the ports???

set port dev=rp range=* will change the setting for all ports.