title: Real-time wireless sensor data transfer. WiFi or Bluetooth? TCP or UDP?
body: <p>In a project, I have been using a Bluetooth module (Panasonic PAN1321) to transfer real-time data from some sensors to an Android tablet at approx 200Hz (this is the rate at which data packets are transferred). Now I am considering to use WiFi instead. My understanding is that it has longer range and is more robust. Plus many wireless systems out there use it so it will be easier to integrate my system with the existing setups. I intend to use  Bluegiga WF121 as my WiFi node. This module offers TCP or UDP communication. I have no knowledge of TCP or UDP. I would really appreciate if someone has answers to the following questions:</p>
  
  <ul>
  <li>Is it worthwhile to shift from Bluetooth to Wifi?</li>
  <li>Will I be able to do point-to-point data transfer between my WiFi module and an Android tablet (just like my bluetooth module)?</li>
  <li>On WiFi can I achieve a data transfer rate of upto 500Hz with a data packet size of approx 80 to 120 bytes? 500Hz is more than enough for real-time feedback in my project but 200Hz will also suffice. Having even lower data transfer rate is possible but this will increase memory requirement for my embedded system and that can be a bottle-neck.</li>
  <li>There is a time-stamp included in the data packet so timing of packets is not important however order of packets is more important. Packet loss is also not important as long as I can get upto 500 data packets per second (max. 60000 bytes/sec). I am not sure if it will be too much for the WiFi.</li>
  <li>Should I start development with TCP or UDP?</li>
  <li>I want to use WiFi on my Android tablet only to communicate with the WiFi module for the sensors and use 3G/4G on the tablet for internet connectivity. Is this possible to do?</li>
  </ul>
  
  <p>Looking forward to your answers/discussion. Cheers</p>