Message Boards Message Boards

Mathematica RDK does not connect to the Raspberry Pi

Posted 10 years ago

Hello dear Mathematica community,
I installed Mathematica 10 on my Mac a few days ago and wanted to connect it to my Raspberry Pi, but it failed. I also have the same problem as described in some other posts here.

From my Mac I can ssh to my RasPi and launch there Wolfram, and make it add 1+1. But I can't figure out how to get a connection to the RasPi from Mathematica on my Mac using the RDK. In the setup mask of the RDK (Configure Pi Connection) I entered Network machine of Pi: IP address of the WLAN connection of my RasPi (as said, this one works for connecting via ssh) Login of Pi: pi (Every time I will retry this first setup step, a new kernel appears in the Evaluation->Kernel Configuration Options menu, even if the IP is the same. Is this just a bug and has never been tested by Wolfram??) In my point of view there is not much that the user can do there wrong, it should work out of the box.

When I try to connect to my RasP and evaluate the Pi Test & Example notebook I am asked to enter my password for my pi login, I have to wait then quite a while, then I get the following two errors:

The child process 594 reports: sh: Private: command not found
The kernel Raspberry Pi failed to connect to the front end. (Error = MLECONNECT). 
    You should try running the kernel connection outside the front end.

When I enter

Options[FrontEnd,EvaluatorNames] 

on my local desktop I get

In[2]:=Options[FrontEnd, EvaluatorNames]
Out[2]= {EvaluatorNames -> {"Local" -> {"AutoStartOnLaunch" -> True}, 
  "Raspberry Pi" -> {"RemoteMachine" -> True, "TranslateReturns" -> True, 
  "AutoStartOnLaunch" -> False, "Executable" -> "/usr/bin/wolfram", 
  "HostName" -> "192.168.178.22", "RemoteLogin" -> "pi"}}}

I googled, and found out that others seem to have the problem too, but couldn't find anything that would solve my connection problem. I would be very happy if someone could help me with this issue.

Kind Regards Björn

POSTED BY: Björn Forster
8 Replies
Posted 10 years ago

I have the same setup and same problem trying to connect through the rdk dialog interface. One extra wrinkle: even though I know the correct IP address for my pi, I cannot ssh to it either. SSH server is installed and running on the pi, but can't ping it either. Stymied....

POSTED BY: Anthony Mancuso
Posted 10 years ago

I would like to report Remote Develop Kit status. My environment is Mathematica 10.0.2.0 on Mac Mavericks.

Can not connect with RDK     Raspberry Pi 2    10.0 for Linux ARM(32bit) (Febuary 3, 2015)
Can connect with RDK         Raspberry Pi      10.0 for Linux ARM(32bit) (August 4, 2014)

I hope the new RDK updates.

POSTED BY: Yoshihiro Sato
Posted 10 years ago

I too fail to connect to my RPi via the RDK, but with a different error.

Configuration: RPi 2 model B running Raspbian debian 7.8 Win 7 PC with Mathematica 10 Wolfram RDK installed with no errors Mathematica runs on RPi ok I can ssh from Win 7 PC to RPi with Cygwin providing the ssh client on PC I open the RDK from the Mathematica palettes menu and configure it with IP address of RPi and username=pi, but this information is never saved and shows up blank upon opening the configuration again. When I evaluate the test notebook, there is no dialog asking for the password. After a couple of seconds this error appears: SSH's connection for kernel 'Raspberry Pi' was unexpectedly terminated. Error code = 103.

I feel like I must be missing something simple. Any suggestions would be most welcome. Cliff

POSTED BY: Cliff Kotnik

I've tested the Remote Development Kit and it works great for my Raspberry Pi 2. It's easy to get the wrong IP address, so make sure that you are using the right one. To check this type in your RPi terminal:

sudo ifconfig

and take note of the "inet addr:" in wlan0 (while using a USB WiFi adapter).

The next step is to introduce the right password ("raspberry" by default):

password

The "Pi Test & Example Notebook" should look like this:

raspi kernel Connected

Finally, if the problem persists, go to Evaluation > Kernel Configuration Options... and check that you entered the right parameters, it should look like this:

Kernel Config

POSTED BY: Bernat Espigulé
Posted 10 years ago

Thanks very much for the suggestions. Let me clarify just a couple things.

On my Win 7 machine, my version of Mathematica is 10.0.2.0. I'm not aware of a newer version. I know the IP address I am using is correct as I separately login to the RPi with it via ssh. I am NEVER prompted to enter a password. Instead I get the error I posted earlier in a popup dialog after a pause of about 10 seconds. Again that is:

SSH's connection for kernel 'Raspberry Pi' was unexpectedly terminated. Error code = 103.

My kernel configuration options looks like the following. Kernel Configuration Options

The main difference I see is that mine has an additional advanced option for shell command.

I should also point out that I assume my actions on the Win 7 machine will launch mathematica on the RPi. If this is not the case, please let me know the options the "wolfram" command needs on the RPi.

Thanks again Cliff

POSTED BY: Cliff Kotnik

Cliff,

There is some indication that the wolframssh.jar file in Windows version 10 of mathematica is faulty. I have encountered a similar issue and fortunately have access to wolframssh.jar from version 9. The other suggestion, to use Cygwin's ssh instead of wolframssh.jar, apparently works, but I cannot vouch for it since I haven't personally tried it.

POSTED BY: BoB LeSuer

Bob, thank you for letting us know.

POSTED BY: Bernat Espigulé
Posted 10 years ago

Bob, Thanks for the info. Unfortunately, swapping out the Wolfram ssh with the Cygwin version appears to be getting a little deeper than my knowledge of Mathematic enables me to go. I'll just get by with the RPi notebook interface remoted to my Win 7 machine via X for awhile and revisit this when the next upgrade to Mathematica comes along.

POSTED BY: Cliff Kotnik
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract