We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi people, I have a hardware ( no arduino ) sending data to my IP, to a port, and I have to read it with processing. I made in the pass the same with arduino and it was ok, but now, I have another hardware. the hardware send like: IP PORT data
Answers
well, it was working now it doesnt
But you dont tell what hardware it is
You dont show code
So we can only guess
is the ip and port in the new hardware right? Do you have a led or so to make sure, the program on the new hardware runs at all?
Hi Chrisir , thks for reply.. I have a running project that I am reading data from Arduino + GPS . I am reading in the serial port with the example function of proceesing. This code is working fine for me,.... BUT. now, I have another hardware, a xexunGPS that it is sending data via SIMCARD to a IP, and one PORT.
and now, I need to read this new data to check them vs Arduino+GPS.
then, my problem is that I don´t know how to configure processing to read this new port, example "20462" my hardware send data like : IP 20462 "data_string_to_read_with_processing"
you want to read 2 sources and compare them?
next:
join them :
duplicate the relevant lines like
etc. etc.
hi again and thks to community
I get write and read in a port in localhost. 127.0.0.1
but I dont´get in other ip ( one of my server )
java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source) at processing.net.Client.<init>(Unknown Source) at read_dport.setup(read_port.java:31) at processing.core.PApplet.handleDraw(PApplet.java:2361) at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:240) at processing.core.PApplet.run(PApplet.java:2256) at java.lang.Thread.run(Unknown Source)
hi friends... I continue with this problem. in local mode , this code works fine
but in a server on internet only changing the IP, does not work I don´t understand. In the server, I have the port opened, and the firewall too. only change this line, with the IP server:
myClient = new Client(this, "xxx.xxx.xxx.xxx", 5204);
I have exported the script, like javascript, and like java too. anyway works.. any ideas...
http://forum.Processing.org/two/discussions/tagged/port-forwarding
thks for reply. I have checked that links , but I have not solved my issue.
my server is a external hardware sending data. in this case, a GPS it sends data via sim card to my VPS. It sends, -IP - PORT - DATA-
and in the server , I have that code running. This code reads the data of the GPS into "dataIn" . but it does not working.
The computer is a VPS in internet, with the port opened, and the firewall´s rules opened as well.
hi GoToLoop. thks for reply. 1.- yes, my VPS has the firewall rules opened for that port like this :
iptables -A INPUT -p tcp -m tcp --dport 50240 -j ACCEPT
2.- for expample : I have this script working in my house computer, this working fine, I write in a port, and I read it with the same script... then I upload it to my VPS server on internet, and it does not work.
:) I am reading all your links . all of them. thks for advices :) I am not a professional admin for servers either because of that I don´t sure if I need to make "port forwarding".
In that script I am writing in a port, and I am reading from in. The script is running in a server .... If I need port-forwarding, I don´t understat what ? and why ? maybe, like you see, I am mixing things. I ´m not sure.
thks for reply ...
Server, is a VPS, that I have with the compnay myhosting.com . You can check that code it does not work. and if you uses it in home ,all is ok ...
Do you have your Processing code currently running there as a server?
You just need to know some port which is configured to port-forwarding to the LAN IP running the server app.
yes. I have uploaded this code to the forum processing guys !! , for you :)
the port that I am using is one port that I have opened via iptables. and in the firewall rules is ok. Do you think that I need anything more ? How ?
How many times do I have to repeat myself that w/o port-forwarding there ain't no server?
Haven't I already told you that opening firewall ports got nothing to do w/ the former?
Read my replies since the beginning paying attention...
P.S.: That link simply redirects me to Java's download page!
hi GoToLoop. thks for you patince :) I am c++ programmer, and I have not idea about sys admin. I am going to read more about it. I am lost in my CentOS server :) thks for all.