0

I have a GPS Device that provides me the flexibility data to a URI i specify. According to the device specs, it would be sending across data in a binary ascii format, what would be the best way to handle this data in a django url

Jerry
  • 23
  • 4
  • Do you have any more information on how the GPS data is sent across the wire? Does it make an HTTP POST? – ZachS Apr 24 '13 at 17:47
  • All it says that data would be sent in a binary ascii format on a given port and ip OR domain name with port – Jerry Apr 24 '13 at 19:25
  • If you install something like WireShark, you can tell your GPS device to send its data somewhere (even a dummy destination) and try to determine exactly what format it's coming in as. I'm guessing it's going to be a plain-old TCP or UDP connection, based on your description, with a custom protocol. – ZachS Apr 24 '13 at 20:22
  • Yes, it transmits on a TCP/IP with a custom protocol. I do have an option to configure it to a UDP transfer, but the manufacturer discourages that – Jerry Apr 25 '13 at 02:47

1 Answers1

0

Your GPS is sending data using TCP/IP not HTTP. Django handles HTTP requests.
To have your data in django, the solution is to write a proxy server that read the custom TCP/IP protocol and send HTTP POST requests that can be handled by a django app.

You can find example of simple TCP/IP server in python here: https://pymotw.com/2/socket/tcp.html

rphlo
  • 661
  • 6
  • 9