Developers guide
Chapter 13: Remote Sockets
Troubleshooting A Remote Sockets Connection
Psion Teklogix Mobile Devices SDK Developers Guide 81
it. Also, as mentioned above, there is no guarantee a Psion Teklogix computer that closes and 
then re-opens a socket will be reassigned the same terminal number by the network controller.
• Remote socket calls will not always generate errors in the same way as Windows 
Socket 2 calls.
Due to the nature of the underlying protocol, socket calls (send, for example) will not imme-
diately return errors to the application. If a socket call generates an error, it will usually be the 
next call (or some future call) that actually reports the error to the application. This behaviour 
should not have any obvious consequences, unless the application makes other assumptions; 
e.g., that the successful completion of a send call guarantees delivery of a packet to the 
partner device (host). However, this behaviour is present in TCP/IP, if in a less obvious way. 
Applications needing to guarantee arrival of a message must wait for an acknowledgement 
from the host in order to confirm successful delivery of the data.
• Available Bandwidth.
As with any wireless device, the amount of bandwidth available to it will generally be lower 
than that available to a wired device due to the overhead of the radio protocols, possible inter-
ference, etc. Applications should restrict the amount of data sent to the Psion Teklogix 
computer (especially over narrowband and similar restricted-bandwidth media) to prevent 
poor response times.
• Binding to an IP address/port.
The bind function on the Psion Teklogix computer behaves in a slightly unusual fashion due 
to the nature of remote sockets. The bind call causes the controller, rather than the 
Psion Teklogix computer, to bind a particular IP address and port. As a result, every 
Psion Teklogix computer making a bind call must specify either: (a) a unique port number, or 
(b) a unique IP address for the bind. Failure to do so will result in one Psion Teklogix compu-
ter either failing to successfully bind a port, or failing to successfully correct / accept 
connections. Psion Teklogix computer IP addresses cannot be assigned via bootp or DHCP as 
the Psion Teklogix computers with narrowband radios may not have MAC addresses.
• Number of remote sockets available is limited.
The following restrictions apply to the number of remote sockets that may be in use:
- A maximum of seven remote sockets can be open for the same Psion Teklogix computer.
- The maximum number of remote sockets that can be open on the network controller is 
defined in the controller configuration. See “Configuring A Psion Teklogix Network Con-
troller (9400/9500)” on page 80.
• Address matching on the network controller.
When a Psion Teklogix computer sends a socket bind request with a non-zero IP address as a 
parameter, the network controller attempts to create and use that IP address as an alias IP 
address. This is an alternate IP address that the controller will send/receive packets from, in 
addition to its own native IP address. To create the alias the controller chooses an interface 
with maximum number of matches between alias IP address and the interface IP addresses. It 
makes binary comparison of the addresses. Any match with fewer than 16 identical bits is 
ignored, as it would be hard for a host to route to such an alias. 
 Here is an example of address matching:
10.128.0.154 = 0x0a80009a = 00001010 10000000 00000000 10011010
10.128.78.19 = 0x0a804e13 = 00001010 10000000 01001110 00010011
 |__________________| 
 |
 17 (bit) matches










