JSON Syntax Error in Simulink Arduino with Flatpak Enabled

17 views (last 30 days)
On NixOS (glnxa64), when I have Flatpak enabled, I will receive an error from the following:
  1. Install Simulink Support Package for Arduino Hardware add-on
  2. Start Hardware Setup wizard in said add-on
  3. Get to the stage where the wizard prompts me to Connect an Arduino Board and is detecting boards
  4. Receive error
JSON syntax error at line 1, column 1 (character 1): expected 'false' but found 'flatpak'
OR (after getting past Hardware Setup)
  1. Click Monitor & Tune in Simulink
  2. Receive error
Error:The following error was encountered during evaluation of the external mode callback 'getExtModeData': codertarget.arduinobase.internal.getExternalModeMexArgs('Serial')
JSON syntax error at line 1, column 1 (character 1): expected 'false' but found 'flatpak'.
There seem to be no additional log created for this error. The only way I've found to work around this error is to remove Flatpak from my system, and re-enable it when I'm done with Simulink.

Answers (1)

Saurabh
Saurabh on 10 Oct 2024
This issue appears to be related to Flatpak's security measures, which is preventing Simulink from accessing the COM port for device detection, leading to the build error. To address this, try using the flatpak override command with the
--device=DEVICE option.
For more information refer to this doc:
I hope this was helpful.

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!