Sending raw data over internet in TCP/IP packets

Status
Not open for further replies.

kekon

Full Member level 3
Joined
Sep 19, 2002
Messages
155
Helped
5
Reputation
10
Reaction score
3
Trophy points
1,298
Location
Poland, Białystok
Visit site
Activity points
1,493
I learn TCP/IP protocol thoroughly but i'm not sure of some aspects. I'd like to build a temperature measurement instrument (digital thermometer) capable of sending measurements results over the internet using TCP/IP protocol. The thermometer will be a simple electronic circuit with a microcontroller that will handle all TCP/IP protocol and will be connected to the router. The temperature measurements will be read from the server by my computer also connected to the router (there will be software written in VC++, Delphi or C Builder for instance) . However, i have some questions about it as i'm not sure if i get everything right.


1. I really don't want to use any of the protocols such as FTP, Telnet, HTTP etc. I want to send only raw data (it will be only several bytes that represent the value of the measured temperature. The computer will send a command byte "Show me temperature" and the thermometer will send an acknowledge together with the temperature values). Can i put these data bytes in the DATA field of TCP packet and receive them in my computer ? (let's assume that my computer and the thermometer are on the same home network)

2. The default gateway. By definition, it is an IP address to which data is sent when a receiving computer is not on the same network. There may be a case when the thermometer is on another network (or somewhere in the internet). ( lets's assume there are no problems with firewalls blocking data transfer and the routers are configured for port forwarding, etc.)
For example, my computer has an IP 192.168.1.100 and the thermometer has IP 192.168.4.100.
If the thermometer wants to send data to the 192.168.1.100 (my computer IP) does it have to put IP address 192.168.1.100 in the destination IP field in IP packet or does it have to put the default gateway IP there ?
 

1) TCP/IP is the fundamental communication between computer system in a network.
Of course you can send raw data using TCP/IP. It is the basic.
FTP, HTTP, etc.... are making use of TCP/IP to communicate.
FTP, HTTP is a higher level of protocol which uses TCP/IP to send information.
The two fundamental data communication in the Ethernet is TCP/IP and UDP

**broken link removed**

2) You will have to send it to a unique IP address across the network. This is usually by means of using a static address from the service provider. Static address can be expensive. There is also a dynamic IP address you can use, but everytime, this address will change when you are connected to the internet through your service provider. These are the IP address assigned by your service provider. You can imagine that the service provider is hosting a very large local area network for all her customer; just like your own local area network. I am not very experience in these but roughly understand how it works. Of course, there will be configuration that needs to be done.

Best Regards,
Siong Boon

NO SIGNATURE LINKS ALLOWED
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…