huawei-lte-api
huawei-lte-api copied to clipboard
Firmware upload API needs to be tested
FileManager.upload is not tested... for obvious reasons...
I have a B535-232 half briked (mismatch firmware - webui, no administrator web pages) and the last option to repair it is to use this library to try a firmware update. Can you write an examples to use the FileManager.upload? I will test it and I will give you feedback about result.
@wikibrikofix i was trying to upload tested FW to my router back then using API before i created this issue... i was unable to do so after like 30minutes of trying to get it working (there was some weird progress check system if i remember correctly) and i was pretty sure i was doing exactly the same stuff as web UI was doing... then i got annoyed with it and created this issue... (i had better things to do)...
Usage was something like this (my testing code is long time gone, i think there was some kind of pooling and stuff around):
with Connection('URL', username='admin', password='password') as connection:
client = Client(connection)
file_path = './my_fw.bin|zip' # absolute? relative? does it matter?
with open(file_path, 'rb') as f:
print(client.file_manager.upload(f, file_path))
And i can't help you right now to get it working since my "i can brick this router" router is on other side of city in my workshop :-)
@Salamek thanks for your help, I'm tryng to deploy some of the firmware I found on the web but they all throw an 100001 error. I think I have the same problem as you with the firmware system check, I'll let you know if I'm success. Thank you for your work!