Go Down

Topic: inputting parameters via popup in the IDE (Read 177 times) previous topic - next topic

dmars1972

Sorry, first post and all...

I was sure I saw a sketch quite a while ago that caused a popup to come up during compile that asked for a password.

So, basically, after you hit 'upload', it would pop up a text entry box, let you type something in, then use what you typed in as the value for some variable, compiled into the binary.  Then it would continue compiling and upload.

Maybe it wasn't an Arduino I was playing with at the time, it was a REALLY long time ago.

Is there some way to do this?  I ask because I want to use an encryption key for some data I save to EEPROM and I've got that working.  The problem is the key I use is hardcoded and out there on github, so...  not really all that secure.  :)

Can anyone assist, either by telling me how to get the IDE to do that, or some better way to generate and store an encryption key so it's specific to the device somehow?

pert

I was sure I saw a sketch quite a while ago that caused a popup to come up during compile that asked for a password.

So, basically, after you hit 'upload', it would pop up a text entry box, let you type something in, then use what you typed in as the value for some variable, compiled into the binary.  Then it would continue compiling and upload.
There's no built-in functionality of the Arduino IDE to allow you to do this. You could probably create a custom tool add-on but it would be a fairly complex project.

What's much easier and common is to provide a run-time interface. The most simple would be to allow the key to be input via the Arduino IDE's Serial Monitor. If your project has a network interface then you could serve a web page that allows you to enter the key via your browser. Or you could have a hardware interface of a keypad and display on the actual device.

The problem is the key I use is hardcoded and out there on github, so...  not really all that secure.  :)
If you put the filename in the .gitignore file then it will not be added to the repository. You could also do this via the .git/info/exclude file but in this case I think it makes more sense to use .gitignore since likely anyone cloning the repository would also want their copy of that file to be ignored and .git/info/exclude only affects your local copy of the repository.

dmars1972

Thanks for the input, I appreciate it.

Go Up