When I use Arduino uno board to program ATMega328P for some project, is my programed code inside tne IC protectef from coping or not?
Thank,
Nesa
When I use Arduino uno board to program ATMega328P for some project, is my programed code inside tne IC protectef from coping or not?
Thank,
Nesa
First of all your C program code is never uploaded to the Arduino. All that goes to the Arduino is a series of numbers that are the machine code. It is difficult almost to the point of impossible to recreate the C program code from those numbers.
Normally it is possible to download the machine code from an Arduino and it would be possible to upload the same amchine code to another identical Arduino.
There are FUSE bytes in the Atmega microprocessor that can be set to prevent the machine code from being downloaded.
Of course the best protection is to publish the source code in the spirit of Open Source software.
...R
Do I have possibility in Arduino IDE somehow to protect code not being copied? I know that there are FUSE bytes in the Atmega microprocessor that can be set to prevent the machine code from being downloaded, using some other programators, but in Arduino IDE I did not find any kind of protection...
I am doing some project for custumer and I am afraid that this code can be copied ...
perakojot73:
I am doing some project for custumer and I am afraid that this code can be copied ...
I suspect that what you are afraid of is them copying the code without paying for each copy.
As has been noted, you must use command line tools to make the copying more difficult.
Whatever you do to lock the code, a smart customer can undo, to unlock the code.
SO AT THE END,
I can not protect downloaded code in AT328P (using Arduino IDE) not to being copied!?!?!? I know there are people with skills to "brake" protected code from AT328P, using some programs and methodes. I mean if I program uC there is no some protection which I can use in Arduino uno to protect it from "regular" user not to be copied somehow.
Use āupload using programmerā which will erase the bootloader.
The (manually) reprogram the lock bits, as per the data sheet, to protect the code from being read by a programmer.
After that, I think you have to go to some lengths to read the avr - there are people who claim they can do it, but they charge a moderately significant amount to do so...
perakojot73:
I mean if I program uC there is no some protection which I can use in Arduino uno to protect it from "regular" user not to be copied somehow.
You need to think clearly about the type of person you want to protect yourself from. And the value to you and to the other person of the thing you want to protect
The ordinary "(wo)man in the street" will not have a clue how to download machine code from an Atmega 328 - s/he won't even know what machine code is.
I know that it can be done, but right now I don't know how to do it. Of course I know I could learn how to do it.
If the price of your product is (say) £10 per copy then it would not be worth spending much time trying to hack it. On the other hand if you can get away with charging £2,000 then things might be different. But most expensive software is expensive because of the after-sales support that is provided. And that can't be hacked.
Of course there is always the sort of person whose idea of mental exercise is to see if he (usually a he, I suspect) can break your protection system regardless of how long it takes or whether there is any financial payback for him. You have to estimate the likelihood that your product gets noticed by such a person.
What sort of product are you trying to protect?
...R
SMS beehive weight.... in our country they sell it for 250eur, but i would like to sell for less money 120euros
You are worried about a competitor buying or stealing one of your devices and then making their own? The code is already protected against that kind of copying.
The only "hole" in the protection is that it is possible to make an EXACT COPY. If your device prints "perakojot software" to the screen they can't replace that with their own name.
You have a bigger problem however. Most Arduino libraries come with license restrictions. Some even say that you cannot charge money if you are using that code. So you must find the license on every piece of code you are using, no matter how deep it is in the stack of libraries and utilities. Then check if your usage of that code complies with that license.
If one of those licenses says you can't do what you are doing then you must re-write your software so that you don't use that licensed code.
but i would like to sell for less money 120euros
How much of that is for the hardware and how much for the software? If you are selling 5 euros of hardware and 115 euros of software, then copy protection makes sense. If you are selling 115 euros of hardware and 5 euros of software, then copy protection doesn't.
If someone buys one of your products for 120 euros, and needs to spend 115 euros to get the same hardware, in a kit form, then spend a day assembling the kit, and wants to save 5 euros on the software, by stealing a copy, there isn't much you can do to stop that that won't cost you more per product.
there are some ways to protect your code, without using FUSE bytes. For example :
If you believe that : "if a clone appears I will certainly will be notified", then write at the EEPROM your personal data AND some "constants". From the personal data you can prove it is your code and (if the hacker erases the EEPROM) at the beginning of your code "read" the specific constants. If they dont exist, block execution of code.
or
you can make a non detectable "short ciurcuit" between two adjagent digital pins (under the connector). Use one as "INPUT_PULLUP" and the other as "OUTPUT", "LOW". digitalRead the input. If "HIGH" (the arduino doesnt have the short circuit), block execution of code.
or
put a "timer", and at i.e. 45 days block execution of code. You will be called for service. You will know the originals...
demkat1:
put a "timer", and at i.e. 45 days block execution of code. You will be called for service. You will know the originals...
When I was working a software supplier applied a scheme like that - but not for copy protection - I think it may have been when the annual renewal was due. There was zero risk of the product being copied.
When trap triggered and the supplier was found out it was blacklisted from competing for new contracts for a considerable time.
...R
i strongly assert what demkat1 suggested in the first paragraph, since your system is SMS based , you can set some constants in the eeprom, that when the ATmega reboots, the value is read and compared, say if ( read.value == 57 ) { enter main_loop(); }
and you are the only one who knows the value(57) to be sent by you only over SMS at the very first moment when the client uses it
I use this trick for most of my GSM based systems on the market
if someone tries to extract your code into their systems, they will never know what to be done to get the system activated,
Brattain Member
My hardware is 30 euros and software is 90-120euros
perakojot73:
Brattain Member
If you are referring to me then my name is Robin2.
...R
Hi there
Been looking at some discussions related to this question and this one is the latest one.
I just want to ask if there is a way using avrdude or a external programmer to also read the contents of the EEPROM. Or when you read the flash and extract it to a .hex file the contents of the EEPROM go as well.
I“m looking to the approach of storing a serial number in the EEPROM that the setup will compare. And if it is not the same block the loop function.
Of course, if there is a way to "backup" the content of the EEPROM to a .hex file so it can also be flashed again in a new microchip this does not make sense.
I“m building a custom rig that consist of only 3 units. So it will be a "limited run" and I don“t want that some chinese manufacturer copy the idea and start mass producing it.
Best regards and thanks in advance for any reply
If you can read the firmware, you can upload a program that reads EEPROM. Then all you'd have to do, is reinstall the firmware that you read in the first step. You could then clone it to any identical processor.
So basically once the firmware is backed up in a .hex file the person only needs to upload a sketch to read the EEPROM and spit it“s contents over serial monitor with the register number it is stored and then reconstruct it?
Sounds more simple than expected :o
Thanks for the response
Just blow the fuse. As in the earlier posts in the thread you resurrected said.