Phone:(705) 671-2652
    Fax:(705) 671-6127
   Email: tom@ontrak.net
Home Products Programming Applications Custom Designs Ordering News
    
Trouble Shooting the ADR Sockets Example

 

I did all this coding and now it doesn't work!.

Here are some items that may help.

First, the sample project (that you received by email ) contains a ReadMe file that may help you.

Second, both the client and the server programs in the sample project provide command line help. In a command prompt window type:

ADRSockSrv -h

for help on using the server program or

ADRSockClient -h

for help on using the client program.

Third, the error code for socket calls is expanded in Microsoft's Winsock.h header file. All socket error codes are numbered relative to WSABASEERR (= 10000). For example if the error code is 10061 then look for WSABASEERR+61 in Winsock.h and find:

#define WSAECONNREFUSED         (WSABASEERR+61)

Then look up the documentation for the failing API call to find out what WSAECONNREFUSED means in the context of the call. I know this sounds obvious, but it wasn't obvious to me when I first used Windows sockets (I was looking for the wrong string in the wrong header file..... in Unix errno.h was all we needed). By the way, WSAECONNREFUSED, generally means that the connection was refused because ADRSockSrv is not running on the computer that we tried to connect with. Either start ADRSockSrv or fix the Hosts file to point at the correct IP address.

Fourth, check the other documentation on this web site to ensure that your serial port is configured OK and that the ADR card is connected and powered properly.

Note that Ontrak will not provide support for this tutorial as it is provided only as a guideline for experienced programmers who wish to implement TCP/IP control systems.

 
    
Contact Information
Address Telephone Electronic Mail
Ontrak Control Systems Inc.
764 Notre Dame Ave., Unit #1
Tel: (705) 671-2652 General Information Sales or Support
Sudbury,Ontario Fax:(705) 671-6127 tom@ontrak.net
CANADA P3A 2T2    
              
Next-Day shipping anywhere in Continental U.S. via Fed-Ex
Copyright © 2012 ONTRAK CONTROL SYSTEMS 764 Notre Dame Ave, Unit #1 , Sudbury, Ontario, CANADA P3A 2T2  
"Quality serial Data Acquisition Interfaces"           PH. (705) 671-2652 FAX (705) 671-6127