Why does MATLAB connections to Raspbian 8 Jessie fail?

1 view (last 30 days)
Hi,
I recently started looking into using MATLAB with the Raspberry Pi 3B. To my honest disappointment there is no package install available to enable this, only the version of Raspbian 7 Wheezy that has been modified by Mathworks and formatted onto a SD card by the MATLAB targetupdater program. Here the problem begins. I have a working raspi with the newest software and several days of configuration settings, scripts and programs on it. Now it seems I cannot use it with MATLAB. With another SD card I can easily install a fresh setup which works fine, but the thing is I wan't to use both MATLAB and all the other python/C stuff simultaneously. And I don't want to do all the other headless/wifi/vnc etc configurations more than necessary.
I have tried a few things in order to test how and what goes wrong:
  1. Connect to my existing raspi which runs Raspbian 8 Jessie. Got an error telling me to install stuff in the /opt/userland directory. Followed the instructions and seemingly got the MATLAB support set up on the next connection. A /opt/MATLAB directory showed up and the messages from MATLAB looked promising. So it should be possible to install this as a package after all?? However, now the issue is something with the support package code. See error below.
  2. Installed a fresh version of the MATLAB-modified Raspbian 7 Wheezy on a SD card with the targetupdater, got a connection up and tested both the camera and ADC through MATLAB. Everything fine. Then upgraded the distro overnight to Raspbian 8 Jessie with apt-get update and apt-get upgrade. When trying to connect from MATLAB again, the exact same error occurs. See error below.
>> rpi = raspi('xxx.xxx.x.xx','pi','password');
Index exceeds matrix dimensions.
Error in raspi/getLEDConfiguration (line 684)
trigger = ret{1};
Error in raspi/getAvailablePeripherals (line 897)
obj.LED.(id).Trigger = getLEDConfiguration(obj,name);
Error in raspi (line 202)
getAvailablePeripherals(obj);
Now, to me this seems like a simple code issue, which should in principle be easy to fix. Is it? And is there a quick fix that I can do myself here? If not, I see no other option than to use a fresh install of the MATLAB-modified distro, never do any upgrades, and add everything (again) on top of that.
A few additional questions for the Mathworks team working with raspi support at the end:
  1. Why can't I find the instructions for installing the MATLAB support from the raspi terminal anywhere? It was beautifully revealed in the MATLAB command line when the MATLAB server wasn't found upon a connection attempt. I believe there are more people than me who have been working with their raspi for a while before suddenly wanting to use it with MATLAB without giving up all the previous work on it.
  2. Why isn't the MATLAB support package following the updated versions of Raspbian?
  3. Can you make a package/git/download installer for terminal setup, please?
Thanks in advance for any help!
Kristoffer
Edit: I realized now that the version installed by MATLAB targetupdater is actually a Raspbian 8 Jessie too! Please forgive me, it said on the different sites I've been visiting that it was a modified Wheezy, but those where probably not updated. Anyway, after upgrading all installed packages, the link cannot be established. Behaves according to above error message.

Answers (1)

Jay Mehta
Jay Mehta on 26 Feb 2018
I am having the same issue. If you figured it out and can post a solution I will really appreciate it.
Thanks
  1 Comment
Kristoffer Kjærnes
Kristoffer Kjærnes on 27 Feb 2018
Hello Jay,
No, I discarded the whole thing. Too badly supported unfortunately, and way too slow for the purpose I wanted. However, you might be able to set up things yourself manually using TCP/IP or UDP packages over network to MATLAB on a remote machine. Look for it in the MATLAB docs.
- Kristoffer

Sign in to comment.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!