1 of 1 people found this helpful
Thank you for contacting us. We want to try and reproduce your case. We researched and found more than one approach to send data to a Java server on the Edison. Could you please let us know what steps have you taken so far to configure the Edison, which image you’re using, and which guide you’re following, if any?
We’ll be waiting for your response.
Thank you for responding .
I'm Using Edison with Arduino Expansion Board
I followed all the steps in here to set up the board : IoT - Get Started with the Intel® Edison Development Board on Windows* 64-bit | Intel® Software
I only knew this way to send data to a java server so I tried it and I got this error , I wasn't following any guide .... I did some online research on how to send data from a c++ client to a java server . Since I did not get any examples of Edison sending data to a java client , I had to stick with that .
Thank you for all the help you are providing .
And please specify the other ways to send data to a java server .
Thanks for your reply. We’ve already tried to compile the code for the Edison and running the code for the server. The C++ code compiled properly, but the code of the server threw some errors. We’re wondering if these codes are sample codes or if you wrote the code. If you’re using sample codes, please share the links to the sample code used. Are you able to run the Java code, how did you compile the C++ code? We’re asking to make sure we’re replicating the issue in a similar way to yours.
In regards to the other links we found that thought you might be using, these are two other options to consider. One of them uses the XDK and the other the Arduino IDE. These guides are not “how to send data from a C++ client to a Java server” but rather an alternative to configure a Web Server to be used by the Edison.
The links are the following:
I wrote the java code myself and it compiles and runs perfectly on my system . (I compiled the java code using the windows command prompt )
The c++ code was compiled in Intel System Studio IOT Edition . The compilation is successful and the program runs up to the point where " if (connect(sockfd,(struct sockaddr *)&serv_addr,sizeof(serv_addr)) < 0)" and then the error pops up saying connection refused.
Hey ! I bought a router and connected both the edison board and my pc to it and ran the same code (of course changed the ip address) and it worked !!!!
I think my college wifi was blocking it or something like that.
Rest , the code works and i do not have a problem executing it !
Thanks a lot for your effort .
It was great having you help me . Thank you !
You’re welcome, it’s great to hear you’ve solved this problem and thank you for sharing your solution with the community.
Don’t hesitate to contact us again if help is needed.