Connect from Eclipse to EV3 doesn't work

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

MetalJulien
New User
Posts: 2
Joined: Thu Jul 03, 2014 6:12 pm

Connect from Eclipse to EV3 doesn't work

Postby MetalJulien » Thu Jul 03, 2014 6:15 pm

Hi there

I just started with leJOS and wanted to connect my Eclipse to the EV3. The EV3 is connected to the same WIFI Router as my computer now is, both with a WIFI Dongle. The EV3 hqas the IP 10.0.1.24.
Now, I set the option "Connect to named brick" under Window > Preferences to that IP. When I try to run or debug,

Jar file has been created successfully
Using the EV3 menu for upload and to execute program
Creating the jar file or uploading the program failed
java.rmi.ConnectException: Connection refused to host: 10.0.1.24; nested exception is:
java.net.ConnectException: Connection timed out: connect
Caused by java.net.ConnectException: Connection timed out: connect
See Eclipse error log for detailed stack trace.


Please help me :/ Why can't I connect.

User avatar
gloomyandy
leJOS Team Member
Posts: 5334
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Connect from Eclipse to EV3 doesn't work

Postby gloomyandy » Thu Jul 03, 2014 7:43 pm

You will have problems with that address because by default the EV3 is setup to use the 10.0.1.* subnet for USB communication, this will be clashing with your WiFi sub-net. You have two choices.
* Change the address used by your WiFi system.
* Change the subnet used by the EV3 for USB.
Changing the EV3 address may need you to re-install the SD card. See the following thread:
viewtopic.php?f=18&t=6944&p=24998&hilit=change+ip+address#p24998

Andy

MetalJulien
New User
Posts: 2
Joined: Thu Jul 03, 2014 6:12 pm

Re: Connect from Eclipse to EV3 doesn't work

Postby MetalJulien » Thu Jul 03, 2014 9:40 pm

I exactly did that: I created a file with "192.168.1.2" in it. Now on my EV3, the first line says that IP, the second line still says 10.0.1.24. What am I doing wrong that it doesn't change?

User avatar
gloomyandy
leJOS Team Member
Posts: 5334
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Connect from Eclipse to EV3 doesn't work

Postby gloomyandy » Thu Jul 03, 2014 10:28 pm

That is correct you have changed the IP address for USB (the top line), the Ip address for WiFi (the second line) is controlled by your router. So you should now no longer have a clash. Are you saying that you can still not connect? If so then you need to check things like firewalls on your PC and your eclipse settings, can you ping your EV3? Can you ssh to it (using address 10.0.1.24 if that is the address of your EV3). What is the IP address of your PC?

Oh and why did you choose 192.168.1.2? Why not 192.168.1.1?

roger
Moderator
Posts: 381
Joined: Fri Jun 01, 2007 4:31 am
Location: Berkeley, CA

Re: Connect from Eclipse to EV3 doesn't work

Postby roger » Sat Jul 12, 2014 7:11 pm

I can connect from Eclipse to my brick by using Window->Preferences ->leJOS EV3 and select the box Use ssh and scp. If that is not checked, then the other selecting the box “Connect to the named brick “ and filling the WiFi address for name does not work, and gives the following
"Using the EV3 menu for upload and to execute program
Creating the jar file or uploading the program failed
java.lang.Exception: No EV3 Found: java.net.SocketTimeoutException: Receive timed out"
A confusing feature of the plugin is that a run configuration menu is also reachable by selecting either a project or a java file the following the links (right click) Run as -> Run Configuration. But this menu does not have the option to select ssh and scp.
Is anyone able to upload using the EV3 menu instead of ssh an scp?
Roger

roger
Moderator
Posts: 381
Joined: Fri Jun 01, 2007 4:31 am
Location: Berkeley, CA

Re: Connect from Eclipse to EV3 doesn't work

Postby roger » Sat Jul 12, 2014 7:14 pm

I can connect from Eclipse to my brick by using Window->Preferences ->leJOS EV3 and select the box "Use ssh and scp". If that is not checked, then the selecting the box “Connect to the named brick “ and filling the WiFi address for name does not work, and gives the following
"Using the EV3 menu for upload and to execute program
Creating the jar file or uploading the program failed
java.lang.Exception: No EV3 Found: java.net.SocketTimeoutException: Receive timed out"
A confusing feature of the plugin is that a run configuration menu is also reachable by selecting either a project or a java file the following the links (right click) Run as -> Run Configuration. But this menu does not have the option to select ssh and scp.
Is anyone able to upload using the EV3 menu instead of ssh an scp?
Roger

Nie201510
New User
Posts: 6
Joined: Sat Oct 31, 2015 6:34 pm
Location: U.S.A
Contact:

Re: Connect from Eclipse to EV3 doesn't work

Postby Nie201510 » Sat Oct 31, 2015 6:53 pm

I have a similar problem, do I have to have a usb wifi adapter in order to upload code?

error message

Binary path is C:\Users\*******\workspace\EV3\Project.jar
Main type name is pack.Project
Bin directory is C:\Users\\*******\workspace\EV3\bin
Jar file has been created successfully
Using scp for upload and ssh to execute program
Uploading to ev3lejos ...
EV3ScpUpload: Failed to upload or run jar file: com.jcraft.jsch.JSchException: java.net.UnknownHostException: ev3lejos
Starting EV3ScpUpload failed with exit status 1
leJOS EV3 plugin launch complete

lawrie
leJOS Team Member
Posts: 965
Joined: Mon Feb 05, 2007 1:27 pm

Re: Connect from Eclipse to EV3 doesn't work

Postby lawrie » Mon Nov 02, 2015 5:49 pm

You don't need Wifi - you can use USB or Bluetooth to upload your program.

At the current release, you have to use the IP address, not the name of your EV3 in the leJOS EV3 preferences. the IP address is shown on the menu screen and is usually 10.0.1.1 for USB.

The next release of the Eclipse plugin will let you use the name of your brick.

Joe86851
New User
Posts: 3
Joined: Mon Nov 02, 2015 6:46 pm

Re: Connect from Eclipse to EV3 doesn't work

Postby Joe86851 » Mon Nov 02, 2015 7:14 pm

I have the similar problem. I connected my EV3 through USB cable. When I submitted the program, I got following error message:
==============================================================
Bin directory is C:\Users\living room\workspace\Maximum EV3\bin
Jar file has been created successfully
Using the EV3 menu for upload and to execute program
Creating the jar file or uploading the program failed
java.lang.Exception: No EV3 Found: java.net.SocketTimeoutException: Receive timed out
See Eclipse error log for detailed stack trace.
==================================================================

The EV3 control center also cannot find my EV3. However, if I input 10.0.1.1 in the NAME, and hit the CONNECT, the connection seemed established, but still no EV3 displayed. I can see the sample programs on the EV3 and run them. But even having this kind of "connection", I still cannot upload and run my program.

User avatar
gloomyandy
leJOS Team Member
Posts: 5334
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Connect from Eclipse to EV3 doesn't work

Postby gloomyandy » Mon Nov 02, 2015 8:23 pm

What do you mean "no EV3 displayed"? What are you expecting and what happens? It sounds like the ev3control program is connecting fine. I assume you are also using the leJOS Eclipse plugin to build your programs, make sure you have configured this using the IP address of your EV3.
leJOS news https://lejosnews.wordpress.com/

Joe86851
New User
Posts: 3
Joined: Mon Nov 02, 2015 6:46 pm

Re: Connect from Eclipse to EV3 doesn't work

Postby Joe86851 » Mon Nov 02, 2015 10:59 pm

"no EV3 displayed" means the upper left area is blank, that is supposed to display the name, ip address, and connection status of EV3.
I don't know how to post picture here. Please see the link for the screenshot.
https://goo.gl/photos/yC2SoHpcuHa3mg4J7

User avatar
gloomyandy
leJOS Team Member
Posts: 5334
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Connect from Eclipse to EV3 doesn't work

Postby gloomyandy » Tue Nov 03, 2015 8:31 am

If the control centre is displaying the sample files on the EV3 this means that it is connected and working correctly. I think the list box is only populated by a search operation, so in this case since you used an IP address nothing is displayed there. Have you tried configuring the leJOS Eclipse plugin with the IP address of your EV3? If you do so then I think you should be able to upload your programs.
leJOS news https://lejosnews.wordpress.com/

Joe86851
New User
Posts: 3
Joined: Mon Nov 02, 2015 6:46 pm

Re: Connect from Eclipse to EV3 doesn't work

Postby Joe86851 » Tue Nov 03, 2015 10:41 pm

I just tried using IP address to connect EV3, and got the following error message:
===========================================================
Jar file has been created successfully
Using the EV3 menu for upload and to execute program
Creating the jar file or uploading the program failed
java.rmi.ConnectException: Connection refused to host: 10.0.1.1; nested exception is:
java.net.ConnectException: Connection timed out: connect
Caused by java.net.ConnectException: Connection timed out: connect
See Eclipse error log for detailed stack trace.
==============================================================

User avatar
gloomyandy
leJOS Team Member
Posts: 5334
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Connect from Eclipse to EV3 doesn't work

Postby gloomyandy » Wed Nov 04, 2015 12:05 am

That is very strange because the Eclipse Plugin and the control centre use the same mechanism to connect. You may want to try disabling any firewall you have running on your PC.
leJOS news https://lejosnews.wordpress.com/

pczekalski
New User
Posts: 7
Joined: Sun Jan 11, 2009 10:26 am
Location: Gliwice, Poland
Contact:

Re: Connect from Eclipse to EV3 doesn't work

Postby pczekalski » Wed Apr 13, 2016 11:22 am

Try temporarily disable Firewall. I found it helpful in similar situation. Somehow Control center was recognized as supported (safe) application but while compiling under Eclipse it didn't work at all.

Hope it helps,

P.
----------------
Ph.D. Eng. Piotr Czekalski
Silesian University of Technology
Gliwice, Poland


Return to “EV3 Software”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 0 guests