The TCP/IP Server For StrongARM Linux
Now that we had a means of acquiring meaningful data from the accelerometer, the next step was to setup a system to deliver this data to the Windows machine that the information was destined for. As we mentioned earlier, we had already decided that the most reliable connection we could establish between the two platforms was a TCP/IP connection. This meant that we had to essentially build a server on the StrongARM platform that could read the information from /dev/accel and deliver it a network node.
Fortunately, TCP/IP is well supported and documented on both the StrongARM and the CerfBoard itself. This made writing our server much easier than if we had to define all of these protocols ourselves. We chose the following sequence of events for our server's normal runtime operation:
This process seems to work fairly well. The only real drawback is that the client must know the IP address of the CerfBoard in order to initiate a data request. All that this really means is that one must run an ifconfig command on the StrongARM to ascertain this information.
For your convenience, the server code (simple.c) is posted here.