-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding support for /dev/i2c on linux? #19
Comments
Your description of the erase->write->exit process is correct. Someone wrote tools for /dev/i2c here: https://github.com/noolex/lenovo_battery_repair Multi interface support would be good to have but I won't be able to work on it any time soon unfortunately. |
Ah, that's nice, that bat_hack script even does the math. :) I guess we can call this issue resolved then. |
Responding more to the title of the issue than the actual discussion - it so happens that I made a tool which uses /dev/i2c. The tool: |
that looks like a lot of work, really nice! |
First of all: thank you so much for all that useful information! :)
I was wondering if somebody has already adapted the tools to work with /dev/i2c on linux?
This is probably not a good idea, but messing with batteries is not a good idea in the first place i guess?
And apart from that, somewhere in a forum i saw a post suggesting that one could use a modified video cable to talk to i2c devices, and i was able to replicate some of the functionality of smbusb with i2c-tools and the vga port, including entering boot rom mode, checking the boot rom version (also 3.1 on my chip) and reading blocks with i2ctransfer.
But before i try to write and brick the chip i thought it would be a good moment to ask some dumb questions...
would it e.g. be possible to just edit/rewrite single blocks? (or actually 2 blocks if i understood that right?)
or in other words, is it necessary to dump, erase and rewrite everything?
the erase part is necessary as far as i understood?
I tried to understand the code of the flashing process without too much success so far.
if i get that right, a word write of 0x83DE to 0x12 would erase everything?
and then it does block writes?
and then, what does the
SMBSendByte(0x16,CMD_EXECUTE_FLASH);
do? is that just to exit the boot rom mode?
sorry for all the stupid questions...
The text was updated successfully, but these errors were encountered: