Recommendations for a safe Arduino IDE

Kindly post recommendations of a safe Arduino IDE or safe method that works well with Arduino.

Our definition of software virus is "not requested code execution" so a virus in our definition includes functions such as windows store, windows update etc, all this is always removed on our computers. A windows computer is never safe but with our changes safe enough for email etc. I will switch to Linux if I find a relaible non-terminal Linux.

Our problem with arduino original IDE is all the open ports in external firewalls, Arduino needs ports opened such as ArduinoIDE, arduinoidecli, some java application but the big problem is that Arduino IDE hides something behind a svchost or similar and that is just to dangerous so updating libraries programatically safely in arduino portable IDE is not possible.

If a manual method for attaching libraries to the IDE could be developed I would appreciate that. Downloading and sniffing library files manually to a serverarea and then install from that local repository is no problem compared to what a auto download will cause.

We have tested eclipse IDE with a sloeber addon but same problem, when installing missing libraries manually in the sloeber library folder the IDE gives up.

Our worry is not computers getting hijacked or copied by a drugdealer or thief, our worry is a governmental actor downloading child porn or incriminating material on a unit via ports opened for other purposes. Organized crime has changed and these new criminals are well resourced compared to just hackers.

That method already exists. You do not have to install libraries using the IDE Library Manager

In order for the IDE to use a library that has been installed manually all that is required is that the library files are located in a folder in the IDE sketchbook libraries folder. By convention that folder has the same name as the main .h library file but that is not a requirement

Alternatively library files can be placed in the same folder as the sketch but that limits their use to that sketch

Note, however, that board specific libraries may be installed with extra boards and these libraries will be located in other locations

1 Like

I have been doing the IDE on Linux for many years and it works great other then the java crashes. At times with a mistook in the code it will send lots of java error messages and quits. I simply close it and launch it again, it picks up the same sketch. This is a small price to pay for a relative reliable system. Linux can be locked down very tight making it extremely hard for somebody to hack it. There is a reason it is used to host many web sites.

1 Like

I'm not 100% sure this would be what you are looking for but you can download the arduino IDE Legacy version from the microsoft store. The UI is a little less friendly but besides that it works well and has a built in library manager.
The link is attached below:

1 Like

@UKHeliBob : Yes, thank you, that is the method I tried but when copying the library.h file into the local arduino IDE library folder I get error message of "library not found" and a reference to the C drive/user account where the windows is installed. Sooo..perhaps adding libraries manually dont work on portable installs as it seems like the IDE wants to copy #included libary files into a "windows user area" ? As long as Arduino decides to open up my computer to rest of internet world I have to install Arduino portable IDE to a containerized virtual drive immediately deleted upon any indication or hickup. If Arduino considers my safety I can use Arduino in a safer manner but all the open anonymous ports is just not possible.

@gilshultz : Thank you for recommendation. I have not been able finding a reliable Linux, only windows copies without own development. I have tested ubuntus/xubuntus since 6.02, mint, peppermint, arch, fedora, mx, debian and some more but all these gets corrupted after a week or two so its just too much time invested in running linux, I get no time left for the work I am supposed to do by investing so much time in the tool (linux) for getting my work done. I appreciate if you have a recommendation of a linux and methods how to run that distro in a time efficient manner(less than 4hours in terminal per week(10% of my worktime/week)), preferably inmutable (toram) with opensnitch installed. A good indicator of bad software is that the developers hides behind github to avoid sharing users experience so I never waste time testing distros from gh nowmore. I would love to hear more of your linux knowledge but here might not be correct place according to forum rules ?

@cyber_hacker_134 : Thank you for recommendation. Microsoft store, update, remote help, xbox etc is removed immediately on all new computers for safety reasons. Is the IDE legacy version avaiable somewhere else ? Iam allowed installing portable/offline "yellers" (softwares yelling openly on internet) in a virtual containerized area.

**edit// : Is it perhaps the "legacy version" Im currently running with the portable/offline containerized install to a own drive ? //edit

What form does your #include take ?

Is it

#include <library.h>

or

#include "library.h"

The latter will first look for library files in the sketch directory before looking in other library locations

1 Like

whoops, thank you for valuable information, I didnt know of that difference.

I tested both (first used #include "Wifi.h", then after your advice <Wifi.h>), think I got same compilation error message on both alternatives. I admit Im confused to why the IDE is bouncing around between the install of arduino libraries at A:\ and the windows C:\ and is unable to resort to the local wifi.h library at the end. This install worked with the ESP32 libraries, this is the first time I test with arduino uno r4 library. I start to suspect I somehow have a windows registrered install of Arduino somewhere in the C:. At first I was able choosing Arduino uno R4 board but somewhere that was changed to only being able selecting board Arduino uno wifi, Im not able telling how that was changed but perhaps it did resort to the wifi.h library anyhow ?

Error message :
´´´´
FQBN: arduino:avr:unowifi
Using board 'unowifi' from platform in folder: C:\Users\MyName\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\MyName\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

loading library from a:_TempName\Arduino\libraries\openocd-0.11.0-arduino2-static-i686-w64-mingw32: invalid library: no header files found
Detecting libraries used...
C:\Users\MyName\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO_WIFI_DEV_ED -DARDUINO_ARCH_AVR -DESP_CH_UART -DESP_CH_UART_BR=19200 -IC:\Users\MyName\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\MyName\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\MyName\AppData\Local\Temp\arduino\sketches\C92415903CBCEED55912692CD61B4734\sketch\R4WifiServerAnalog.ino.cpp -o nul
Alternatives for WiFi.h: [WiFi]
ResolveLibrary(WiFi.h)
-> candidates: [WiFi]
C:\Users\MyName\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO_WIFI_DEV_ED -DARDUINO_ARCH_AVR -DESP_CH_UART -DESP_CH_UART_BR=19200 -IC:\Users\MyName\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\MyName\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ia:_TempName\Arduino\libraries\WiFi C:\Users\MyName\AppData\Local\Temp\arduino\sketches\C92415903CBCEED55912692CD61B4734\sketch\R4WifiServerAnalog.ino.cpp -o nul
In file included from A:_TempName\Arduino\R4WifiServerAnalog\R4WifiServerAnalog.ino:15:0:
a:_TempName\Arduino\libraries\WiFi/WiFi.h:5:10: fatal error: vector: No such file or directory
#include
^~~~~~~~
compilation terminated.

Alternatives for vector: []
ResolveLibrary(vector)
-> candidates: []
Using library WiFi in folder: A:_TempName\Arduino\libraries\WiFi (legacy)
exit status 1

Compilation error: exit status 1
´´´´

Ok, had a look. I have arduino IDE 2.2.1 installed in windows. I normally dont have admin rights installing there but apparentely I do. My apologies for this confusion.

Experimenting.
Downloaded and installed Arduino legacy IDE according to recommendation in post #4. The legacy IDE did not create a libraries folder so I created manually a libraries folder in same folder as the legacy Arduino IDE.exe bin and copied the complete old library to same. If I understood post #2 here this should have generated some success but no, IDE still cant find Wifi.h at compiling.

Im out of ideas for the moment.

You didn't

When you install libraries they must be placed in a folder the libraries folder of your sketchbook folder or in the same folder as the sketch .ino file but you say

That is not the right place unless your sketchbook folder is in an odd location

1 Like

In the legacy IDE there is a way to universally install libraries so you don’t have to download it for each sketch.
In the top bar do sketch-> include library->manage libraries-> then a window should appear with a long list of libraries and a search bar allowing you to install libraries and search for them.

1 Like

I currently have Linux mint running on several machines. Version 18 through 22. They normally run 24 7 without problems except when the power fails. I just press the power button and they come up just fine. I have a version 20 that has been up for more then two years without a problem. I experienced a similar problem in about 2017, it turned out after a lot of time and effort it was the mother board. It would work for a few hours to a few days then wouold start messing up, nothing consistent.

1 Like

@UKHeliBob : Thank you for clarification. My installation is as follows :

  • Sketchbook folder is A:_Arduino.
  • Arduino legacy IDE was installed at A:_Arduino.
  • Library folder resides in A:_Arduino\libraries and copied manually by me to A:_Arduino\arduino-ide_2.3.5_Windows_64bit as legacy IDE didnt seem to create an own libraries folder.
  • As far as I can see legacy IDE finds correct sketchbook, I can see my ESP32 projects but I have not found a way to verify search path for library folder from inside IDE.

....so...where do I copy libraries folder to ?

@cyber_hacker_134 : Thank you. Recieved a interesting error message when adding the zip library from inside IDE:

"Error: 13 INTERNAL: Library install failed: moving extracted archive to destination dir: library not valid"

Im starting to suspect I have a problem with the board package / library ? I will have a look to check if I installed the uno R4 board package correctly. This will take me some time to read up how to verify board package. At first connect board was recognised as uno R4 but second time connected board was identified as "arduino wifi", this was so odd I still remember that.
I got some homework to do.

@gilshultz : My apologies for offtopic here. Are you running mint with external firewall or just as ubuntu install with inbuilt firewall (gfw ?) and active automatic updates? For different reasons there is some problem trusting software so a extra firewall is always added (opensnitch has proven good for tracking/blocking spam parts of softwares in linux such as debian based) and auto aupdate always blocked. Any update is downloaded manually and sniffed before install. I think our approach to autoupdate/safety is causing us most of our headache here but on the other hand we've never had any incidents.

Lets close this topic. It is unsolved and I have not been able coming close to a solution with a easy method. When there is time im testing eclipse IDE and platform IO IDE but no progress to report. The arduino boards are put in the bottom drawer and we decided to proceed with the esp32 boards.

Thank you all that invested your time responding.

Which IDE are you using with the ESP32 boards ?

One thing you can consider, if you use the version 1.x IDE, is creating a "portable" installation on a "reference" computer, installing all of the desirable libraries, and then shutting off the various auto-update features and simply copying the "portable" installation to the user computers. Then you can shut off internet access from windows administration or in your routers, and things should be "pretty safe."

The ability to find and install new libraries and board packages is a significant feature of the Arduino IDE, but it's hard to make that sort of thing "safe." (A "board" package downloads executables that it then executes. That's theoretically AWFUL. But also very useful!)

1 Like