Hardlock

Hello everybody,
I have one question.
Is it possible to make a hardlock or dongle for arduino mini pro board?
For example, if I want to change parameters in device I need to insert a hardlock first.
Hardlock needs to be assign to particular device.

Thank you in advance!

Sure, you can use the Lock bits. Then a high voltage programmer is required to reprogram the board, and the contents are not obtainable thru standard electrical means.

VladimirKojic:
For example, if I want to change parameters in device I need to insert a hardlock first.

Do you mean that user with a special device could plug it in and thereby get access to options within a program that are unavailable without the device?

Or are you just looking for a method to prevent someone from uploading a different program to the Arduino - which, I think, is what @CrossRoads was referring to?

...R

First option. I want to prevent other users to use some features if they dont have a dongle.
For example: I have a machine that works in one speed. If I want to change the speed of machine I need to insert a dongle.

You can connect a "dongle" which is just a bit of I2C memory, have the promini read it and react accordingly.

Ok, thanks. I am not so good in this but I understand that it is possible. I assume that I can clone a dongle if I want to have more then one.

http://arduinobasics.blogspot.com.au/2015/05/ch376s-usb-readwrite-module.html

You could have a text file on the USB that contained a password. Set a global boolean variable like adminMode and set it to true when a USB is plugged in with that text file on it.

If i doo that, it would be easy to copy the USB? If so, the user can copy it and that is what I want to prevent.

Not USB, just a simple I2C memory part. SCL, SDA, Power, Gnd, maybe one pin to let the promini know something has been plugged in.

Anything that an arduino could read will be able to be copied

Then make the dongle another 'arduino' that only responds to your promini.
Set the Lock bits so it only be copied by delidding thru chemical means etc.
If the promini and the dongle don't handshake correctly, then no updates happen.

"I assume that I can clone a dongle if I want to have more then one."
"If so, the user can copy it and that is what I want to prevent."

Resolve the conflict in requirements.
With another processor, you, "the creator", can program more of them. With Lock bits, a "user" cannot readily copy it.

I dont want to allow the user to clone the dongle but I want to have an option as administrator to clone the dongle if user destroy his dongle.

I am trying to make a handshake between two arduino boards but the question is how can I make condition that if the reading of alphanumeric string of 16 characters corespond?

If slave arduino contain same string as master arduino then the master arduino allow some action.

Can anybody help me?

Have a look at the strcmp() function.

You have told us nothing about how one Arduino sends the data to the other.

...R

Thank you Robin. I think that that function is helpfull.

I was trying to make like this:

void setup() {

Serial.begin(9600);
while (!Serial) {

}

establishContact();
}

void establishContact() {
while (Serial.available() <= 0) {
Serial.print("12345ABCDE123456");
}
}

But as I told, I am not good in this serial comunications.

VladimirKojic:
I was trying to make like this:

I did not know whether you were using Serial or something else.

Have a look at the 3rd example in Serial Input Basics for a simple reliable way to receive data. Make the sending part match that system.

...R

How clever the users trying copy the dongle are? Do you expect them to reverse engineering it, intercepting data etc. or is copying USB/SD card top of their abilities?

I expect the worst. :slight_smile:

VladimirKojic:
I expect the worst. :slight_smile:

Then they will disassemble the machine when you are not looking and replace the Arduino with another one which will accept their dongle and not yours :wink:

There are dedicated chips including encrypted memory and secure communication. You may try to look at those. But I think some sort of handshaking on two Arduino-like should suffice. Possibly some small ATTiny in the dongles?