Error occured during installation of Arduino - matlab

I have MATLAB R2013a and been trying to install the Simulink support package for Arduino hardware but I keep getting the following error:
"Error installing third party package Arduino software: Invalid zip file "C:\MATLAB\SupportPackages\R2013a\downloads\arduino-1.0-windows.zip"."
and then the installation stops.

There is already an answer by Shaima Al Hebsi on MATLAB Answers:
Install the Hardware support from the Add-ons button in Matlab and wait for the error. Once you get the error cancel and exit the installation.
Get Arduino 1.0 (the only version which made it work) from http://www.arduino.cc/en/Main/OldSoftwareReleases when you download it you will get it as a zip file having the same name which was shown in the error message arduino-1.0-windows.zip
Now go to the directory shown in the error message: C:\MATLAB\SupportPackages\R2013a\downloads\arduino-1.0-windows.zip
and replace the existing corrupted arduino-1.0-windows.zip with the new one downloaded recently
Disconnect internet connection and again go to Matlab add-ons and try again to install arduino hardware support package It should work this time.

Related

Matlab rtwintgt -setup install not working

I am currently trying to setup the windows real-time kernel in Matlab r2013b, but the command rtwintgt -setup is giving me an error. I have read the following link and confirmed that I do have admin access and my license includes Real-Time Windows Target. rtwintgt install
My error is as follows:
``
rtwintgt -setup
There is a different version of the Real-Time Windows Target kernel installed.
Do you want to update to the current version? [y] : y
> Error using rtwintgt>ErrorDialog (line 363) Installer error: "Failed
> to copy the kernel to Windows system folder. The process cannot access
> the file because it is being used by another process.".
>
> Error in rtwintgt>RunInstaller (line 280) ErrorDialog(prompt,
> message('rtwin:installer:installererror', errmsg));
>
> Error in rtwintgt>rtwt_setup (line 119) result = RunInstaller(prompt,
> 'install');
>
> Error in rtwintgt (line 68) retval = feval(subfn, prompt);
From the line, "The process cannot access the file because it is being used by another process," I can understand that there is another program interrupting the file retrieval, but I do not know what program. I have tried ending as many tasks as I could and have restarted my computer . Any help would be much appreciated, as I am trying to get this to work for a project.
I had the same problem and I managed to find a solution.
The errors were most likely caused by a previously installed/uninstalled version of MATLAB which is different from your currently installed version.
According to the MathWorks website, uninstalling the MATLAB environment does not uninstall the Simulink Desktop Real-Time kernel.
Open your MATLAB command window and type "rtwho".
If you see two different Real-Time versions, there lies the problem.
To solve the problem,
Uninstall the Real-Time kernel version associated with the previous/uninstalled MATLAB environment by typing "sldrtkernel -uninstall" in the command window. If it doesn't work in the MATLAB command window like I experienced, type it in the Windows Run Dialog.
If uninstalled successfully, you should see the message "The Simulink Desktop Real-Time kernel uninstalled successfully."
Go back to the MATLAB command window and install the kernel using the command "sldrtkernel -install".
You should get the message, "You are going to install the Simulink Desktop Real-Time kernel.
Do you want to proceed? [y] :"
Type "y" to continue the installation, and on successful completion, you should get the message, "The Simulink Desktop Real-Time kernel has been successfully installed."
This should solve the problem.
N/B: You can enter the "rtwho" command in the MATLAB command window afterwards to confirm that there is only one Real-Time version.
I hope this helps.
See this link for more:
https://www.mathworks.com/help/sldrt/ug/real-time-windows-target-kernel.html

Persistent error coming from libusb0

I'm using a Python application that accesses a USB device (pipsta printer) and executes a routine. It's running fine outside the container, but when it comes to the container it returns a error like this:
(File "usr/local/lib/python2.7/dist-packages/usb/backend/libusb0.py", line 386, in _check:
raise USBError(errmsg, ret)
USB.core.USBError: [Errno None] couldn't opendir(): No such a file or directory)
In my dockerfile, I've included all the packages relevant to Python and USB, and I also moved the relevant files to /etc/udev/rules.d and restarted udev.
Make sure you:
followed every step from assembly instruction and https://bitbucket.org/ablesystems/pipsta/wiki/Pipsta%20First-Time%20Setup
printer is connected to the power
printer is connected via usb to raspberry
printer's led doesn't blink (should be green constantly)
proper usb library is installed (or try to install different version of the usb library). What version are you using? python: print(usb.__version__) , it works fine for me with version 1.0.0rc1
is printer visible to the os? command: ls /dev/ap1400
I know this is an old question (I've only just encountered it). The following is a paraphrasing of the FAQ. The following steps should help diagnose the problem.
Download the latest set of Pipsta examples..
Extract the contents of the zip file.
Change directory to where the files were extracted
Change directory to the Examples folder.
Using a terminal run the command python verify_pipsta_install.py. This will try and help diagnose problems.
The following will should fix the python usb library error.
If your Pipsta printer firmware is V9.2.03 please upgrade the firmware to V9.2.08 using the fpu (both can be found in the downloads section of bit bucket.
Install the latest version of the Pipsta examples (download from bitbucket).
Copy the new pipsta/Examples/system_scripts/ to /etc/udev/rules.d/60-ablesystems-pyusb.rules
Restart the Raspberry Pi
If the printer still fails to be discovered then -
The following workaround may work.
1. Unplug the printer from the USB port
1. Enter the command sudo lsusb
1. Reconnect the printer
1. Enter the command sudo lsusb
If the printer has been detected by the Linux environment then either /dev/ap1400 or /dev/pipsta should exist in the filesystem.
NOTE The Pipsta now has Debian packages to help with installation. I have a link limit on my account but search for pipsta-printer-utilities-1.1.1-Linux.deb and pipsta-cups-driver-0.3.0-armhf.deb for more information.

Matlab supportpackageinstaller not presemt

I have just installed a fresh copy of elementary OS freya in my lappy and after that did an installation of matlab R2012b. First I tried using the image acquisition commands but they didn't work as the library was not there. To install I typed
supportpackageinstaller
but it gave an error
Undefined function or variable 'supportPackageInstaller'.
This is the first time I am installing matlab on linux so I don't know how to solve the problem.
copied from: http://www.mathworks.com/matlabcentral/answers/88896-how-to-install-add-on
the supportPackageInstaller is a new feature in R2013b and doesn't exist in older releases than R2013b. Which version are you using? If its not 13b you need to look up the support package on the File Exchange. Only for example Simulink Support Package for Arduino Mega 2560 Hardware (R2012a)
refer to another:
http://148.204.81.206/simulink/ug/start-support-package-installer.html#
Start Support Package Installer
You can use Support Package Installer to install support for specific third-party hardware and software products.
Support Package Installer guides you through the process of downloading and installing a support package.
To start Support Package Installer, use one of the following methods:
In a MATLABĀ® Command Window, enter targetinstaller.
In a model, select Tools > Run on Target Hardware > Install/Update Support Package.
Double-click a *.mlpkginstall file.
On the MATLAB tool strip, click Add-Ons and select Get Hardware Support Packages.

How to implement LIBSVM Matlab interface?

I am having problem with implementing LibSVM to MATLAB. I downloaded LibSVM package, libsvm-3.14 to my Windows 7 PC and tried to implement it, but I got this message:
"No supported SDK or compiler was found on this computer. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2011a/win64.html
If make.m fails, please check README about detailed instructions."
The problem is yet not solved even after downloading the folder from this website: http://www.csie.ntu.edu.tw/~cjlin/libsvm/#matlab Is there another site where I could download that?
I am using libsvm from the site you mentioned - no problems.
Sounds like you don't have the Windows SDK installed.
You can install it from the link at http://www.mathworks.com.au/support/compilers/R2011a/win64.html
Another possibility is that you don't have mex setup.
You can check using mex.getCompilerConfigurations()
If not run: mex -setup
You might also need to install a c++ compiler - there is a link to get VC2010 expressed om the web page above.

Error: Invalid MEX file, the specified module could not be found

I have compiled Mex file successfully on my laptop. But when I am running it, it says Invalid mex file 'c:\newfolder\filename.mexw32' The specified module could not be found.
System specification:
OS: windows 7
MATLAB 2010a
Microsoft Visual Studio 2008.
The same mex file is compiled and run successfully on my PC under XP SP3.
This MathWorks support link suggests two possible reasons to your problem:
You do not have all of the necessary libraries that the MEX-function is dependent upon.
You are running a MEX-file on a different version of MATLAB than it was compiled on.
Either way, to locate the source of this error it says that you need to list all dependent library files and verify their existence in the system you're trying to run the MEX file on, and also recommends the Dependecy Walker as the tool to to do that.
Do you you the mex file on another system than the one it is created on?
If so, then you need to install the Microsoft Visual C++ Redistributable on that machine.
I had this problem also when upgrading from Matlab2010a/VS2008 to Matlab2013a/VS2010.
All my environment variables were sent correctly.
A reboot fixed problems with OpenCV dlls not being found, I assume that it was still trying to link to the OpenCV dlls for VS2008 (even though I had changed the path). However still my mex file could not find libmex.dll.
When I installed Matlab2013a, I did not uninstall the old version (in case I wanted to go back).
However that was the cause of my problem.
Once I uninstalled the old version of Matlab and rebooted again, the problem was gone.
I had a similar problem. I was only linking against 1 'lib' so I simply copied that lib into the same folder as the mexw64 and it worked.
I have not poked around for the correct place to tell MATLAB to add the lib's real location to whatever path it's looking at.