0
\$\begingroup\$

I was working with the Arduino IDE. I tried to find out from where a MCU can be locked so that nobody can make a clone from it. I found many answers describing something about lock bit. I realized that this lock bit can somehow stop users from cloning the chip. My first question is with which IDE or programmer I can change the lock bit? Second question : Can it be edited with a hex editor? If it is possible, what is the position/which number of bit should be changed? Third question: Is there any way to encrypt the code?

\$\endgroup\$
  • 1
    \$\begingroup\$ The lock bits are in a separately programmable flash area as the fuse bits are. They aren't part of the program file. It depends on your IDE where you can set them. \$\endgroup\$ – Janka Jun 20 at 22:31
  • \$\begingroup\$ But how do I set it?? With what? \$\endgroup\$ – Sohan Arafat Jun 20 at 22:32
  • \$\begingroup\$ Does the Arduino IDE has a menu for the fuse bits? The lock bits should be there, too. If not, you needed an ISP programmer and e.g. avrdude as the programming app on your PC. If you don't have an ISP programmer but two Arduinos, you can wire up one Arduino as an ISP programmer and use that one to program the other. \$\endgroup\$ – Janka Jun 20 at 22:41
  • \$\begingroup\$ Also, the lock bits can be defeated by undervoltaging the chip. Standard procedure for seasoned crackers. \$\endgroup\$ – Janka Jun 20 at 22:43
  • \$\begingroup\$ @Janka Do you have more information on that? It sounds interesting. \$\endgroup\$ – marcelm Jun 20 at 23:51
0
\$\begingroup\$

The lock bits can be used to prevent reading the code memory with standard programming tools. It only works up to a certain point, as a determined hacker with right tools can still extract and clone the firmware. So you can use the lock bits but don't expect that it will be 100% effective.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.