Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » How to internet enable a serial device
Re: How to internet enable a serial device [message #32620 is a reply to message #32618] Sat, 28 May 2011 21:02 Go to previous messageGo to previous message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
Jerson

If you have your board tied to a computer with RS232 you have a comm port, baud rate, etc. then you have most of the work done.

For a Server/Client the "work" has been pretty much done for you.
It's basically the same for Python, Java, C++ and the Upp implementation.

In Upp it's the Socket
	Socket s;
	if(!ClientSocket(s, "127.0.0.1", 5024)) {


Socket s; // You have just created your own socket named s

if(!ClientSocket(s, "127.0.0.1", 5024)) { // this line checks to see if your socket can connect.
5024 is a port you designate and will be the same for Client and Server.

"127.0.0.1" is the address, in this case your computer.
When you want to connect over the internet this will be changed to an internet address.

This is the same for LAN cameras. The camera can be set up in India and you can see the image while in Australia or wherever and the Pan, Tilt and Zoom can be changed from wherever there is an internet connection.

Try the examples I mentioned for sockets in the reference assembly. Get that working with your board and your computer.
Then just change the address to whatever you get for your board for internet access, probably just your computer IP.
My Java Server is set up to receive multiple connections each in their own thread.

jerson wrote on Thu, 26 May 2011 23:43

What I am trying to do is connect the board via serial comm port to a PC that is connected to the internet so that the board can be controlled from any other pc on the internet.

If you intend to leave your computer on hooked to your board just click this link to get your computer address:
http://www.whatismyip.com/

You could also consider having whatever your board and what it controls at a remote site. Whatever ISP you use for that connection an IP address will be given. For that a considerably more expensive board is required but is often done since a computer at that site is not required.

It has been many years since I have done much of this over the internet except with LAN cameras which is through a router.

What are you planning to control with your board???

jibe
Typing on the command line in a dos box is OK but I prefer a GUI.
There is no difference as far as what is sent or received.
"... lot that use simple RS232 communication" that is just for connection to the board and has nothing to do with an internet connection.

[Updated on: Sat, 28 May 2011 23:45]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Control with fixed rate Height/Width
Next Topic: GridCtrl help needed
Goto Forum:
  


Current Time: Mon May 13 08:57:41 CEST 2024

Total time taken to generate the page: 0.01644 seconds