TCP IP for Remote Sensing - thomaspingel/advanced_remote_sensing GitHub Wiki

TCP/IP or Internet Protocol forms the basis on which devices on the Internet (and other networks) talk to one another. Many devices we use (lidar, various cameras, RTK/PPK GNSS/GPS) use TCP/IP to communicate because it is a simple and standard way to exchange data. Please watch Dr. Pingel's lecture on TCP/IP for Remote Sensing for a full explanation.

Key Details

  • Each computer on a network uses an IP address to communicate that is unique to it. Sometimes these are public addresses (as when you connect at the university) but more often they are private (as in your home router). An IPv4 address is four numbers (0-255) separated by a period (e.g., 192.168.10.100).
  • IP addresses can be private or public. Private addresses are generally in the 192.168.x.x range, or in the 10.x.x.x range.
  • IP addresses are generally allocated by a DHCP server when you connect, but you can configure a static address. It still must be unique on your network, or the router won't know where traffic should go (just as if two addresses on the same street shared the same house number). If you are working on a private network, perhaps not even using a router at all, but directly connecting a sensor with a computer, then you can generally easily avoid this since you've only got two machines to work with (e.g., sensor is at 192.168.100.201 and computer is set to have an IP address of 192.168.100.202).
  • A subnet mask is a series of numbers that says how "far up the tree" your IP address can see / will respond to. 255.255.255.0 is common, which means you would be able to see anything on the 192.168.10.x subnet (for instance). 255.255.0.0 would let you see anything on 192.168.x.x. Netmasks can also be specified using CIDR (Classless Inter-Domain Routing) notation, where 255.255.255.0 is "/24" because the first 24 bits of the subnet mask are set to "1."
  • Each interface (e.g., Ethernet card or Wi-Fi card) or device has its own MAC address that is also used to ID it on the system. This is sometimes known as a physical address. The are 12-character hexadecimal numbers where each block of two is separated by a colon or dash. An example is FD:6D:43:3B:F0:E8.
  • Services like HTTP, FTP, or SSH are used to for web-traffic, file transfer, or remote access. They have a default port (80, 21, 22) associated with them, but these can be anything from 0 to 65,535. A Velodyne VLP-16A "Puck" lidar, for instance, broadcasts its data (by default) on port 2368, and its telemetry on port 8309.
  • "Ping" is commonly used to test a connection to a remote machine (e.g., "ping google.com" or "ping 8.8.8.8").
  • Ethernet and Wi-Fi are both common ways to talk to sensors. Ethernet is somewhat simper and more secure, but requires a physical cable. Wi-Fi has many standards (e.g., 802.11b, 802.11g, 802.11n, etc.) that operate on different frequencies (typically 2.4 or 5 GHz). This can make interoperability a problem if sensors/computers/phone hotspots are using different frequencies. It's often best to put things in "maximum compatibility mode".
  • Data can be transmitted via TCP (Transmission Control Protocol) or UDP (User Datagram Protocol). TCP is more reliable as it ensures the receiver is listening, will re-transmit if data is lost, and will do error-checking, but as a result it is slower. UDP is faster and better for "multicast" type data transfer where speed is most important and absolute data integrity less of a concern (e.g., video or voice communication).
  • Names (e.g., google.com) are translated to IP address via a Domain Name System (DNS) server. ISPs typically have their own that exchange information with other DNSes on the Internet. Google runs one at 8.8.8.8.
  • Sensors are often configured via TCP/IP interface and data is often exchanged this way (or logged to something like an SD card or onboard memory). This might be done via a webserver started by the instrument itself (very common) or even SFTP/SSH access. In many cases, software (e.g., Ouster Studio or LidarView) is used to decode the incoming data stream. Manufacturers will often publish details of the data packet structure as well (e.g., Chapter 9 of the Velodyne VLP-16 user manual).