GP2X Reading Gp2x Serial Number


kevin

Still Fresh
Joined
Mar 19, 2006
Messages
17
Location
Netherlands
Website
Visit site
hi fellow developers!

i am looking for a way to retrieve the serial number of the gp2x. it should be stored in the rom somewhere.

anyone having a clue where to find the s/n?

thanks!

kevin
 
theoddbot posted on Mar 20 2006 at 01:04 AM said:
It's living in an eeprom on the i2c bus. I will write something to trace GPH's access to the bus and see what I can figure out what's going on exactly.

great, would be awesome! thanks in advance!
 
Last edited by a moderator:
Why do you think GPH have already said that they will not support anyone or any project that uses the i2c interface? They also seemed to get a bit upset when theoddbot put i2c support in his kernels (they'd removed it from the publically available kernel sources).

Still, even with a writable serial number, you can still lock stuff to SD cards, it just means that downloads are not as secure.
 
Hi Squidge,

Squidge posted on Mar 22 2006 at 09:02 PM said:
Why do you think GPH have already said that they will not support anyone or any project that uses the i2c interface? They also seemed to get a bit upset when theoddbot put i2c support in his kernels (they'd removed it from the publically available kernel sources).

Does this also include reading? Just reading the serial number can be really useful too.

Thanks,

Kevin.
 
Last edited by a moderator:
I suppose it does, but we all know the menu is always going to do it, so I see no harm in just reading. Be prepared for the fact they may change things around in a later version of the firmware though, as only the menu and drm-stuff needs to read it, and as of yet, there is no drm, so there is no need for backwards compatibility yet.
 
Squidge posted on Mar 22 2006 at 10:12 PM said:
I suppose it does, but we all know the menu is always going to do it, so I see no harm in just reading. Be prepared for the fact they may change things around in a later version of the firmware though, as only the menu and drm-stuff needs to read it, and as of yet, there is no drm, so there is no need for backwards compatibility yet.

Good thinking. Then I guess we need a way of reading the current firmware version too :)

Regards,

Kevin.
 
Last edited by a moderator:
So what would be the best way of finding the Serial Number, accessing this eeprom (any ideas how to do this?) or disassembling the gp2x menu thingie?

I would appreciate any help :)

Regards,

Kevin.
 
Squidge posted on Mar 25 2006 at 03:58 PM said:
use the /dev/i2c device?

Hi Squidge at

Can I just "open()" the /dev/i2c device and read it like /dev/mem ?
I am new to this kind of stuff, so sorry for asking the obvious :unsure:

Regards,

Kevin.
 
Last edited by a moderator:
Theoddbot,

Thanks again for your code. I noticed one issue though: when I include <linux/i2c.h> I get a lot of strange compile errors. When I leave this one out, everything compiles fine.

*Edit*
And one more thing: I notice a few RDWR flags, does this mean the code actually writes to the I2C bus? Is this necessary for just reading?


Kevin.
 
You have to write the address (2 bytes) that you want to start reading from, it doesn't actually write to the eeprom.

Compiles fine without i2c.h ? Strange, but ok.
 
Back
Top