To update the firmware for the M4, you must have a working datakey and seeing an error code is never a good sign. I’d guess that your datakey has an issue with its cable or with the connection on the gauge. You can inspect both connectors for debris or bent pins. I wouldn’t suggest using a friends datakey as you might damage it. Call AiM support.
There are many help videos on You Tube. This first link below goes over the firmware update (which you have all ready figured out) and second goes over connecting the GPS05 module to an M4.
LAD Specialties customer / tony kart / rotax / kt100