• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 526
  • Last Modified:

Code to read and write to EPROM

Hi,

Can someone help me with a snippet or code that will allow us to read and write data to an EPROM in either C or C++

Biren
0
birenshukla
Asked:
birenshukla
3 Solutions
 
BrianGEFF719Commented:
What type of EEPROM?


Brian
0
 
birenshuklaAuthor Commented:
EEPROM is Atmel 24C family.

Basically, we are going to use hte i square C protocol to program the EEPROM. It is a hardware device that attaches to a computer's USB that serves as a license key.
0
 
Jaime OlivaresSoftware ArchitectCommented:
Appears to be you are trying to crack a license dongle.
Besides this, code to read the EPROM will be useless because it is protected by USB logic, you will need to learn how to "talk" to the device through the USB driver. That's not a trivial task if you are not the device's designer.
0
Simple Misconfiguration =Network Vulnerability

In this technical webinar, AlgoSec will present several examples of common misconfigurations; including a basic device change, business application connectivity changes, and data center migrations. Learn best practices to protect your business from attack.

 
birenshuklaAuthor Commented:
We are designing the device. We are the manufacturer. I just want to know how to achieve this task of being able to read and write to the EEPROM on the device(which is USB) when the software wants to check to see if the client has the license hardware or not.
0
 
Jaime OlivaresSoftware ArchitectCommented:
well, in that case you have to choose a microcontroller to manage the memory, have you did it?
The secuence is:
You have to build a device with a USB enabled microcontroller or a standard microcontroller with an USB controller device, plus memory.
Write the software (or firmware) for the microcontroller.
Write the specific USB driver for windows
Write the code portion to talk to the device through the driver.

0
 
cryptosidCommented:
Hi,

Check O-Reilly publications..

http://www.oreilly.com/catalog/embsys/index.html

They have book on Embedded systems programming..Also.. check this.

http://www.linuxjournal.com/article/7289
http://www.linuxjournal.com/article/7920



Might give you some idea.


Regards,
Siddhesh
0
 
Dariusz DziaraProgrammerCommented:
"Write the software (or firmware) for the microcontroller."
1. Likely there will be support for I2C protocol in microcontroler (simple instructions like I2CSTART, I2CSTOP, I2CWRITEBYTE, I2CREADBYTE)
2. You wil have to handle USB endpoint to exchange data with windows driver

"Write the specific USB driver for windows"
Probabely there will be some generic windows driver for microcontroler (read data, write data). This will spare you writing your own dirver.
0
 
Jaime OlivaresSoftware ArchitectCommented:
If you really want to spare LOTS of time, I suggest you to buy this book:
USB Complete
By Jan Axelson
http://www.lvr.com/usbc.htm

I have the book, it has the basics to design both sides of USB (PC and device).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now