Testing the Device Driver

Jump to: navigation, search
<< Adding a Device Driver
Integrating Treck >>



If you wrote your own device driver (or modified ours), you are now ready to begin testing on the network. You will need some tools to do this correctly if you do not already have them. Your most important tool when testing a device driver is a network analyzer. There are many to choose from. The cost ranges from a few hundred dollars to tens of thousands of dollars. If you are in a hurry and are on a tight budget, we suggest that you visit the following web site. http://www.klos.com/

At Klos Technologies, they have both Ethernet and PPP analyzers that run on a PC under DOS for a few hundred dollars.

When testing your device driver, your analyzer is your best friend (next to the support engineer at Treck Inc).

Things to test for:

  • Make sure that you are sending packets. If you are not, then make sure that your driver's send routine is being called. Set a break point with your debugger and step through your drivers send routine.
  • Make sure receive processing is happening correctly by making sure that the incoming IP application data arrives at the socket.
  • Try UDP before trying TCP. It is a simpler test and helps isolate problems.

If you are having problems:

  • Ensure the IP address and Netmask are set correctly.
  • Make sure your hardware is operating correctly.
  • Make sure your hardware address is correct and valid.
  • Make sure that tfTimerUpdate()/tfTimerUpdateIsr() and tfTimerExecute() are being called.
  • Make sure your loopback test still runs.
  • Make sure that you have interpreted the device user's manual correctly.
  • Trying sending packets by directly calling your driver's send routine.
  • Make sure that you are passing the correct parameters to the Treck functions.
  • Look for compiler warnings in your code.
  • Make sure that you actually check the return codes of the Treck functions that you call to ensure that an error did not occur.
  • Watch out for padding by the compiler. Treck data structures are already padded and aligned on 32 bit boundaries.

Please see Appendix B: RTOS Notes for detailed driver testing and debugging information.


<< Adding a Device Driver
Integrating Treck >>