Update to 2019a and now Mega2560 tries updating code on board, then "Internal error: The initialization of the server code is incorrect: error pops up. Uno does work

17 views (last 30 days)
We updated our installation from 2018a to 2019a. The installation went fine, but after installing the MATLAB Support Package for Arduino Hardware and Simulink Support Package for Arduino Hardware I tried running the following, which has always worked and shown the board information:
a=arduino('com5', 'mega2560')
The board tries "Updating server code on board Mega2560 (COM5). This may take a few minutes."
then throws error:
Internal error: The initialization of the server code is incorrect.
I've tried each of the following, but with the same results:
a=arduino
a=arduino('com5', 'mega2560')
a = arduino('COM4','mega2560', 'TraceOn', true);
Note: I've tried two different Mega2560's with the same result. Doing this with an Uno works just fine.
Any help appreciated, as this is for upcoming classes and needs to be solved.
  1 Comment
Steven Pogo
Steven Pogo on 31 Jul 2020
si tienes la version de matlab 2019a presenta este problema con arduino MEGA 2560, lo que yo hice fue cambiar a un arduino uno y funciono de manera normal...... espero te sirva.

Sign in to comment.

Answers (1)

Jonathan Oviawe
Jonathan Oviawe on 18 Nov 2019
You may have switched the USB port you've orginally used to a different one (e.g. did all the arduino stuff on port 1 then switched to port 2 after unplugging everything then replugging it). We plugged our arduino into port 1 initally then plugged it into port 2 when we got back to the project. We switiched it back to port 1 then it worked fine. (Port 1 being the initial port used and port 2 being any port that's not the initial port).

Community Treasure Hunt

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

Start Hunting!