Hi,
I am trying to update the service command using the SimpleLink API/AT Wifi Commands. I don't want to reprogram the whole wifi module, so I'm using the AT+fileWrite command. I have two questions.
First - I know that the service pack needs to be closed with its signature, but what I'm doing doesn't seem to be working. This is the command that, based on the "SimpleLink Wi-Fi AT Command User's Guide", I am sending:
AT+fileClose=340588583,,3d115b452f22c81ebf830863fce98d53e63db662
Which has the format:
AT+fileClose=[fileHandle],[NULL],[SHA1 signature]
When I send this, I get a '-5' error, which doesn't appear in the "SimpleLink CC31xx/CC32xx Host Driver" error.h list. From what I can tell looking at the wifi module source code, '-5' might refer to the STRMPL_ERROR_WRONG_SIZE error. I tried sending it a shorter signature of made-up characters, and I received an "OK" response back. From that, I think that the signature that I've included is too long, but I'm not sure how to format it. My understanding is that SHA-1 is generally formatted with 40-symbol hex values. How should I be formatting it?
My second question is how do I know that the service pack write was successful? When I send a short, nonsense signature in fileClose, it responds with "OK", even though it shouldn't have been a successful write with a bad signature. Is there a way to do a service pack version check?