Connection issue - Bridge library's Process with arduino mega + yun shield

Hardware involved :

  • Arduino Mega 2560 Rev3
  • Genuino Yun Shield

Dear community,

I have a problem that I can't solve after a lot of research. :confused:

I connected my arduino mega with my genuino yun shield (respecting all the procedure). I can upload sketches, everything works fine.

A problem arises when I try to use the Bridge library's Process class to curl data from a web server and get information on the Linux processor (eg : https://www.arduino.cc/en/Tutorial/Process).

When I upload the sketch on the board, I receive the error message below. The red light "user" lights up.

com.jcraft.jsch.JSchException: Session.connect: java.net.SocketException: Connection reset
	at com.jcraft.jsch.Session.connect(Session.java:557)
	at processing.app.NetworkMonitor.open(NetworkMonitor.java:73)
	at processing.app.AbstractMonitor.resume(AbstractMonitor.java:110)
	at processing.app.Editor.resumeOrCloseSerialMonitor(Editor.java:2231)
	at processing.app.Editor.access$2400(Editor.java:77)
	at processing.app.Editor$DefaultExportHandler.run(Editor.java:2204)
	at java.lang.Thread.run(Thread.java:745)
Session.connect: java.net.SocketException: Connection reset
com.jcraft.jsch.JSchException: session is down
	at com.jcraft.jsch.Channel.sendChannelOpen(Channel.java:667)
	at com.jcraft.jsch.Channel.connect(Channel.java:151)
	at com.jcraft.jsch.Channel.connect(Channel.java:145)
	at processing.app.NetworkMonitor.tryConnect(NetworkMonitor.java:98)
	at processing.app.NetworkMonitor.access$100(NetworkMonitor.java:25)
	at processing.app.NetworkMonitor$3.run(NetworkMonitor.java:139)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

And when I try to print something on the console, I receive this message :

Connection impossible: new attempt (1).... 
Connection impossible: new attempt (2).... 
Connection impossible: new attempt (3).... 
Connection impossible: new attempt (4).... 
Unable to connect: does the sketch use the bridge?

What should I do ? Is there another way to retrieve information on a web server (txt, php, json)?

Many thanks in advance for your help ! :art:
tonton17