We analyze and implement a networked control system where the communication between the sensors, the controller, and the actuator takes place over a wireless LAN (802.11b) ad hoc system. The wireless LAN system introduces random delays and packet loss in the feedback loop. We present an extended version of the separation principle of Linear Quadratic Gaussian (LQG) control with both random delays and packet loss in the feedback loop. This paper is motivated by many of the implementation constraints encountered during the setup of an experimental NCS. We see from our experimental data that the optimal LQG controller that takes the delays and loss into account indeed performs better than traditional control methods.