I am making a commercial product in transportation field and my product contains two arduinos (mega and uno) in my design box with few other components. Is there any way to make my code safe from outsiders because my box would be installed on the road and anybody can take my code??
Anyone with knowledge of the devices in the box (that should be locked), and the right hardware, can get the hex file that is uploaded. What they can do with the hex file is very limited. Converting the hex file to code is like converting an omelet to eggs.
The problem is even though my box would be locked but my competitors are strong enough to open that box and check the components. The only thing which i wants to safe is my code. Is there anything which evaporates the code so that even the developer cant get back the code again once its uploaded on the arduino.
Is there anything which evaporates the code so that even the developer cant get back the code again once its uploaded on the arduino.
You could look at the bootloader that loads a sketch from an SD card. Have just one useless sketch on the SD card. Set it up so that opening the box triggers the bootloader to load the new sketch.
Personally, I think you are worrying about nothing. Look up the AVRDUDE commands needed to extract a hex file from the Arduino. Take a look at the hex file. See if you can do anything with it.
Using a bootloader is incompatible with using the lock bits to protect the code. You can protect your code from being read if you upload it appropriately using an ISP programmer, but you have to get rid of the arduino bootloader to do so.
(This protects your binary against "moderate" effort. I hear that there are still "overseas entities" that will provide the code given a "protected" chip and some "moderate" amount of money. ($100<x<$10000 ?)) (Or maybe they just take your money...)
westfw:
I hear that there are still "overseas entities" that will provide the code given a "protected" chip and some "moderate" amount of money. ($100<x<$10000 ?)) (Or maybe they just take your money...)
Could be an interesting business - how would the customer know if the "code" wasn't just something dreamed up in a pub