android - Real-time wireless sensor data transfer. WiFi or Bluetooth? TCP or UDP? -


in project, have been using bluetooth module (panasonic pan1321) transfer real-time data sensors android tablet @ approx 200hz (this rate @ data packets transferred). considering use wifi instead. understanding has longer range , more robust. plus many wireless systems out there use easier integrate system existing setups. intend use bluegiga wf121 wifi node. module offers tcp or udp communication. have no knowledge of tcp or udp. appreciate if has answers following questions:

  • is worthwhile shift bluetooth wifi?
  • will able point-to-point data transfer between wifi module , android tablet (just bluetooth module)?
  • on wifi can achieve data transfer rate of upto 500hz data packet size of approx 80 120 bytes? 500hz more enough real-time feedback in project 200hz suffice. having lower data transfer rate possible increase memory requirement embedded system , can bottle-neck.
  • there time-stamp included in data packet timing of packets not important order of packets more important. packet loss not important long can upto 500 data packets per second (max. 60000 bytes/sec). not sure if wifi.
  • should start development tcp or udp?
  • i want use wifi on android tablet communicate wifi module sensors , use 3g/4g on tablet internet connectivity. possible do?

looking forward answers/discussion. cheers

question 1: worthwhile? sorry, have decide 1 once understand trade-offs (including development time)

question 2: point-to-point? yes

question 3: transfer @ 500 hz? 500 msg per second * 200 bytes per message(allowing protocol overhead) * 8 bits per byte = 0.8 ghz. it's theoretically possible on 1ghz channel. assumes perfect senders & receivers, might not quite well. if can wifi @ 10ghz should fine. general rule udp faster tcp due less protocol overhead.

question 4: reliability. tcp guarantees delivery in order have find message boundaries yourself. udp best-effort protocol both delivery , ordering of messages, packet boundaries match message boundaries simplifying receiving code. it's possible build reliability on top of udp, reinventing tcp. possible reorder udp packets and/or skip out-of-order ones appears lost if show in wrong order.

question 4: tcp or udp. i'd udp (edited)

question 5: wifi tablet, 3g/4g internet? not sure on one. if use ip addressing , don't configure dns server wifi might able force internet traffic onto phone network, that's aguess.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -