# open port error

**URL:** <https://forums.digi.com/t/open-port-error/7052>\
**Category:** Portserver TS\
**Created:** [May 26, 2009, 2:47am UTC](https://forums.digi.com/t/open-port-error/7052 "2009-05-26T02:47:04Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![f\_kai8025](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@f\_kai8025](https://forums.digi.com/u/f_kai8025)\
**Post date:** [May 26, 2009, 2:47am UTC](https://forums.digi.com/t/open-port-error/7052/1 "2009-05-26T02:47:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![support.wizard](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@support.wizard](https://forums.digi.com/u/support.wizard)\
**Post date:** [May 26, 2009, 2:12pm UTC](https://forums.digi.com/t/open-port-error/7052/2 "2009-05-26T14:12:20Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![f\_kai8025](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@f\_kai8025](https://forums.digi.com/u/f_kai8025)\
**Post date:** [May 27, 2009, 8:09am UTC](https://forums.digi.com/t/open-port-error/7052/3 "2009-05-27T08:09:13Z")

</div>

os:Fedora 8,  
driver:40002086\_P.src.rpm  
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 10.85.7.173 local shell 0

---

<div class="post-metadata">

**Author:** ![support.wizard](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@support.wizard](https://forums.digi.com/u/support.wizard)\
**Post date:** [May 27, 2009, 1:15pm UTC](https://forums.digi.com/t/open-port-error/7052/4 "2009-05-27T13:15:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![f\_kai8025](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@f\_kai8025](https://forums.digi.com/u/f_kai8025)\
**Post date:** [May 27, 2009, 3:41pm UTC](https://forums.digi.com/t/open-port-error/7052/5 "2009-05-27T15:41:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![support.wizard](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@support.wizard](https://forums.digi.com/u/support.wizard)\
**Post date:** [May 27, 2009, 8:22pm UTC](https://forums.digi.com/t/open-port-error/7052/6 "2009-05-27T20:22:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![f\_kai8025](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@f\_kai8025](https://forums.digi.com/u/f_kai8025)\
**Post date:** [May 27, 2009, 11:37pm UTC](https://forums.digi.com/t/open-port-error/7052/7 "2009-05-27T23:37:23Z")

</div>

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??

---

<div class="post-metadata">

**Author:** ![support.wizard](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@support.wizard](https://forums.digi.com/u/support.wizard)\
**Post date:** [May 27, 2009, 11:50pm UTC](https://forums.digi.com/t/open-port-error/7052/8 "2009-05-27T23:50:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![f\_kai8025](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@f\_kai8025](https://forums.digi.com/u/f_kai8025)\
**Post date:** [May 28, 2009, 2:12pm UTC](https://forums.digi.com/t/open-port-error/7052/9 "2009-05-28T14:12:45Z")

</div>

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 ([http://10.85.7.115/](http://10.85.7.115/))with 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

---

<div class="post-metadata">

**Author:** ![support.wizard](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@support.wizard](https://forums.digi.com/u/support.wizard)\
**Post date:** [May 28, 2009, 2:40pm UTC](https://forums.digi.com/t/open-port-error/7052/10 "2009-05-28T14:40:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![f\_kai8025](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@f\_kai8025](https://forums.digi.com/u/f_kai8025)\
**Post date:** [May 29, 2009, 1:17am UTC](https://forums.digi.com/t/open-port-error/7052/11 "2009-05-29T01:17:52Z")

</div>

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???

---

<div class="post-metadata">

**Author:** ![support.wizard](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@support.wizard](https://forums.digi.com/u/support.wizard)\
**Post date:** [October 6, 2009, 9:52pm UTC](https://forums.digi.com/t/open-port-error/7052/12 "2009-10-06T21:52:39Z")

</div>

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