Exact match. Not showing close matches.
'[OT] How serial device to internet via networked P'
|Corrected bracket mistag.
I am a list lurker and this is my first post here. Please forgive me & correct
me if I am doing something wrong.
What I am seeking to know is if how to connect my serial communicating device
(microcontroller based) to the internet via a PC in between. I am seeking a
Windows specific solution if there is one. I do not mind writing my own
application on the PC to do the intermediate stuff, but, I do not know what that
stuff should be.
I found this link http://www.kmitl.ac.th/%7Ekswichit/Ajay4/index.html which
explains precisely what I am trying to do. However, the PC part is not clear to
me. How can some device connected on a serial port of my pc go onto the
internet? Via telnet? ssh? ppp? slip?
If you know any links that I can read up, I am eager to learn. Even if there is
something here on the list, please be so kind as to point it out as I am new
with the usage of this list.
Thanks very much.
I'm no expert but have dabbled a little, hope the following will be of some help...
In the link you gave, the purpose of "Home Automation Software" that runs on the PC will be to create a redirection so that sending/receiving data to/from a particular IP address:port number will access your physical COM port. The IP address will be that of your PC. Another example of software that (I believe) can do this is Virtual Serial Ports Emulator http://www.eterlogic.com/Products.VSPE.html (I've had experience using it, but not in the way you require).
For example, let's say the local IP address of you PC 192.168.1.2, and your PIC serial device is connected to the PC's RS232 serial port COM2.
You run redirection software on the PC, let's say it is configured to redirect IP port 8888 to COM2.
>From this PC you can now Telnet into your serial device using the address 192.168.1.2:8888 (or maybe just the port number 8888, I can't remember). You can send and receive data in the Telnet window just like you would do on a simple terminal emulator such as Hypertrminal etc. What's more, you can now Telnet into your serial device from any other PC on your LAN using the address 192.168.1.2:8888.
Why use port 8888? Well that's what they use in the example in the link you gave. There are 65536 ports, many of which have established uses, eg: 80 = HTTP, 21 = FTP. Basically you can use whatever you like as long as it doesn't conflict with any other port in use on your LAN. http://en.wikipedia.org/wiki/TCP_and_UDP_port_numbers
OK, so your serial port device can now be accessed over your LAN. Now, how to make your device accessable over the Internet? You need to make some changes in your modem/router. When connected to the Internet your router will have a WAN IP address (for example 22.214.171.124). What needs to be setup is a rule that will redirect external (Internet side) accesses to a certain port number (let's use 8888 again) to a particular PC on the LAN side of the router and a particular port number, eg:
8888 ==> 192.168.1.2:8888
This kind of rule is variously described in different types of modem/routers as Port Forwarding, Virtual Server, etc. In other words you are creating a "hole in your firewall" that will directs Internet traffic to the local redirection running on your PC, which in turn directs traffic to your serial device.
So, if a user on the Internet want's to acces your serial device they need to know your WAN IP adress number and which port to use, then they wil be able to Telnet into it . eg. 126.96.36.199:8888.
The tricky part then is that your WAN IP address most likely changes each time your modem/router connects. Some ISP's will offer a fixed IP address option, so that's one solution. Another option is to use a Dynamic DNS service which will give you a host name (so you don't have to use IP address number) . Here a couple of popular/good ones that offer a free service...
Each has good tech info on how to set it up. Either your modem/router has support for particular DDNS providers in which case you configure it with hostname/user name/password, or you run a DDNS client application on one of the PC's on your LAN.
Then you will be able to Telnet into your serial device from anywhere on the Interweb by using a URL, eg:
-- Brent Brown, Electronic Design Solutions
16 English Street, St Andrews,
Hamilton 3200, New Zealand
Ph: +64 7 849 0069
Fax: +64 7 849 0071
Cell: +64 27 433 4069
Thanks Brent. You have explained the concept in very lucid terms. It's clear now.
More... (looser matching)
- Last day of these posts
- In 2011
, 2012 only
- New search...