Go Down

Topic: How to hide my source code. (Read 1 time) previous topic - next topic

jdforlife

Hi all, thank you for stopping by to help me out!! :)
I am creating a code that will be forever communicating with the user's computer through the serial monitor. So what I am doing now is that I simply double-click on the sketch, click upload, and click on the serial-monitor and use the code.
But the problem is, I want to hide my code but still use either the serial monitor, or something like that to interact with the Arduino mega 2560 ADK.

If you have such an idea on how to do this, please let me know. Thank you a lot in advance :)

dxw00d

Once the sketch is uploaded, there's no need to upload it again. Use something like PuTTY, instead of the Serial monitor, and you don't need to open the IDE.

jdforlife

so do I simply download PuTTY from (http://download.cnet.com/PuTTY/3000-7240_4-10808581.html) and install and use it?

dxw00d, could you please elaborate on using the PuTTY as my arduino is not with me right now and have to go to school to use it.

Can I simply double click the PuTTY icon and use it just like the serial monitor or do I have to do something special to get it working?
thank you.

AWOL

Putty is a terminal emulator, and your Arduino software may not work correctly with it, depending on how it is written.
The Serial Monitor doesn't send characters until you click on "send", but a terminal emulator sends them as the keys are pressed.
How your software recognises the end of character input may also need some attention, if your Serial Monitor is configured not to send a newline character.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

zoomkat

Quote
I want to hide my code but still use either the serial monitor, or something like that to interact with the Arduino mega 2560 ADK.


If you want to "hide" your source code, just compile and upload it to the arduino and it is then it is hidden. Somebody could possibly download the binary from the arduino, but i doubt they would be able to decompile it.
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

Grumpy_Mike

jdforlife - you are missing the point, as have been said:-

Quote
Once the sketch is uploaded, there's no need to upload it again.

Nick Gammon

Upload the code at home. Demo it at school. No-one can see your source code.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

cjdelphi

Is it not possible to read every byte from the flash memory? and store the data raw and dump/upload it to another atmega chip?

(not trying to put the OP off... curiosity) once you read every byte, you have an identical copy to upload to another board (minus the source code)?

WizenedEE


Is it not possible to read every byte from the flash memory? and store the data raw and dump/upload it to another atmega chip?

(not trying to put the OP off... curiosity) once you read every byte, you have an identical copy to upload to another board (minus the source code)?


See: DRM

michael_x

#9
Aug 14, 2012, 09:54 am Last Edit: Aug 14, 2012, 10:06 am by michael_x Reason: 1
Quote
See: DRM

I assume you talk about Digital Rights Management.
I bet there's no such library for Arduino available.
Does every atmega chip have a unique ID (serial number)? How else could you achieve identification?

I think that's rather a question for the Lock bits.

Not sure if this is OP's intention: Hiding Source Code is something different than Copy Protecting Binary

Nick Gammon


Is it not possible to read every byte from the flash memory? and store the data raw and dump/upload it to another atmega chip?


You can burn fuses lock bits to prevent that. But he asked about source code.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Nick Gammon


Does every atmega chip have a unique ID (serial number)?


No.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

jdforlife


You can burn fuses lock bits to prevent that. But he asked about source code.


And... how do I do that nick?... please explain as I would love to learn that :)

tuxduino

There's one of these "fuses", i.e. configuration bits, that can prevent reading the chip's program memory. It's called something like "read only" fuse I think :P

Here's a page about avrdude that talks about its ability to "burn" (i.e. set) fuses on the atmega328:

http://www.ladyada.net/learn/avr/avrdude.html

Also:
http://www.ladyada.net/learn/avr/fuses.html

HTH

Go Up