I made a device using an arduino to communicate with a computer. the question is whether the arduino can be set lockbit so that it cannot be read via Serial/Prog but can be written back via Serial with the aim of upgrading the frimware. from the application I made
Which arduino?
Arduino Nano or Uno,
I'm building an eeprom programmer tool, and I need to lock the device to avoid cloning the device.
but the problem is that I need to repair the device if it has a problem or upgrade the device and need to write the code again via Serial, can the arduino do that? Write the code again or update the software and can not be read back via serial or AVR programmer
Thanks
"Cloning" the EEPROM or the programmer?
cloning Programmer.
I made a programmer tool to read and write EEPROM, and my tool can only be used in software made only, so software and Frimware are connected, and asked how to make the programmer tool that I made with arduino can be written to replace new code but cannot be read via Serial or ISP.
Is it set from the lock bit?
What are the settings so that it can be like what I want?
Read deeply here from page 276 onwards, and come back with pertinent questions:
Do you think the code you wrote is so clever and unique that any competent code couldn't recreate it from scratch without cloning?
If you mean any ICSP programmer by "AVR programmer", then the only way you can do that is to disable BOTH writing and reading. So the only way to do an update is to first erase the entire IC including the bootloader
No bro
maybe you think my programmer device is just an ordinary program that can be made by everyone using Arduino.
but actually I made it like that for the added security of the software I made.
so that the software does not work if it is not connected to the original device.
the device programmer is not special at all, that's why I ask like this
It's not about whether the device program is special or not.
Can the lock bit be set to turn off the read function only and not turn off the write function?
Not if you want to prevent access via an ICSP programmer
If I upload code from the Serial Port, can the code that has been uploaded be read back through the serial port too?
Yes
How to make the code that has been uploaded via USB serial cannot be read again but still be able to upload new code to Arduino?
Sorry if there are too many questions, I'm not an expert in Arduino and its security.
LOL. My first and remaining reaction is "get over yourself".
That you are here on a forum orientated to beginners, hobbyists, and their ilk belies any claim to mastery. If you truly had the expertise you boast of, you wouldn't be asking us for help.
a7
I am an expert in programming and not an expert in microcontroller.
I'm asking here because I don't understand microcontroller, that's why I'm asking here, if I'm an expert I won't ask anyone ![]()
Read via USB serial or ICSP programmer?
via USB Serial,
if the upload code can be via USB Serial, can the read code program also be via USB Serial? if so, how to turn it off so that it cannot be read via USB Serial.
You need to set BLB01 to a 1 and BLB02 to a 0, leave the other bits unprogrammed. See the datasheet, section 28
You should download Avrdudess. It will enable you to set all the fuse and lock bits and test whether reading has been disabled. However be careful, if you set the bits wrong you could prevent programming and will need to do a chip erase using an ICSP programmer.
okay thanks for your help