My 0xFF’d Autel Charger
I bought a known-broken 40 A EVSE on purpose. What looked like a cloud
configuration problem turned into a suspicious 0xFF ceiling
in its J1772 pilot path.
I recently picked up a used 40 A Autel MaxiCharger Home AC EVSE. I knew before buying it that something was wrong with it: despite being a 40 A charger, it would not charge much above 14–15 amps.
That was not a surprise after I got it home. It was the reason I bought it.
Why buy a broken charger?
I wanted an EVSE that I could use with a demand-response or CFR-style program without giving up meaningful local control of the charger.
These programs often provide a free or subsidized EVSE, which is attractive, but there is a tradeoff: once the charger is enrolled and managed by a third-party OCPP platform, the owner may have very little local control over what it does.
That matters in my installation.
If utility power fails and the house is operating from battery, I want my local energy-management system to be able to reduce or stop EV charging. The same is true whenever local load conditions matter more than whatever the remote OCPP platform happens to be requesting.
Normal operation
│
├── Third-party OCPP platform
│ controls charging policy
│
└── Local energy management
still has authority to curtail load
Power outage / battery operation
│
▼
Local controller
│
▼
Reduce or stop EV charging
Many managed EVSEs do not make that combination particularly easy. Autel, Tesla, and a small number of others are interesting because they retain enough local interfaces or control mechanisms that cloud management and local energy management can potentially coexist.
Then this particular MaxiCharger became available.
Its previous owner had already encountered the low-current problem and had been unable to get it resolved through the manufacturer’s support process. The charger was therefore being sold with a known fault.
The symptoms did not immediately sound like failed power hardware.
A charger that consistently delivers a lower-than-expected current can have any number of ordinary causes, but this one had already lived inside a fairly complicated stack of firmware, cloud management, OCPP configuration, and remote control.
That made it more interesting rather than less.
Networking, protocol debugging, embedded systems, and reverse engineering are all areas I spend an unreasonable amount of time working with, so buying somebody else’s broken cloud-connected EVSE seemed like a perfectly sensible project.
My goal was simple: determine whether the charger could be restored to its intended operating state and, in the process, understand enough of its control architecture to use it the way I wanted.
The symptom
The unit is an Autel MaxiCharger Home AC:
Model: W10-N14 Maximum current: 40 A
My test vehicle is a 2020 Canadian Volkswagen e-Golf. The same car will charge above 20 A from another EVSE, so the vehicle itself was an unlikely explanation.
On the Autel, however, charging settled at roughly:
3.2–3.4 kW ~14–15 A
despite the charger being configured for substantially more.
At first glance, that could still have been a vehicle issue, installation problem, current-limit setting, OCPP policy, EMS configuration, or any of several other perfectly ordinary causes.
Eventually, though, the charger gave me a much more interesting clue.
The J1772 pilot appears to saturate at a diagnostic PWM value of exactly
255.
If that field means what the measurements strongly suggest it means,
255 corresponds to a 25.5% control-pilot duty cycle — or about
15.3 A under the SAE J1772 current encoding.
Lower commanded currents work normally.
But when the requested current should require a value greater than 255,
the charger appears to stop at exactly 0xFF.
That became the thread I started pulling.
First stop: Modbus
The MaxiCharger has an internal RS-485 interface and can also expose a Modbus TCP server when configured for EMS operation.
The charger itself listens on TCP port 502.
I found that the firmware in this charger uses a newer Modbus register layout rather than the older addresses found in some documentation.
Among the useful registers are:
20000/20001 Charger power limit 20002/20003 Charger current limit 20004/20005 Fallback power 20006/20007 Fallback current 21000/21001 Connector power limit 21002/21003 Connector current limit 21004/21005 Connector fallback power 21006/21007 Connector fallback current
Current values use hundredths of an amp.
Initially, several limits corresponded to:
600 = 6.00 A
Changing them worked.
I could command 10 A and see charging current increase accordingly. That was important because it established that:
- the car responded correctly;
- the charger could change its J1772 pilot;
- Modbus was actually influencing the charging path.
Eventually, however, I had the relevant Modbus limits set well above the actual charging current and the charger was still stuck around 14–15 A.
So Modbus was not the final limiter. Disabling ESS — the default state on this unit — also removed the limits I had observed through Modbus.
OCPP was the next layer
The charger supports OCPP 1.6J.
I connected it to my own local OCPP server and started examining its configuration and Smart Charging behaviour.
Among other things, the charger reported support for:
Core FirmwareManagement LocalAuthListManagement Reservation SmartCharging RemoteTrigger
It also exposed settings including:
MaxChargeCurrentLimit OfflineChargeCurrent
and accepted OCPP charging profiles.
This let me perform a useful experiment.
Home Assistant became my OCPP test bench
For the OCPP side of the investigation I used the Home Assistant OCPP integration as my local central system rather than depending on a remote provider.
That gave me a convenient way to inspect the charger, install charging profiles, watch MeterValues, and repeat tests while keeping everything on my own network.
One thing I specifically wanted was OCPP 1.6
GetCompositeSchedule. Setting a charging profile tells the
charger what I want it to do; asking for the composite schedule lets the
charger report the effective schedule it has actually calculated after
applying its active charging constraints.
The Home Assistant integration could already create charging profiles, but
it did not expose GetCompositeSchedule as a Home Assistant
service. I implemented that service and submitted it upstream as
PR #2153.
The service accepts a connector ID, duration, and optional charging-rate unit and forwards the request to an OCPP 1.6 charge point. For this charger, the result gave me a clean way to verify the active current request.
Central system -> charger:
[2, "<message-id>", "GetCompositeSchedule",
{"connectorId":1,"duration":3600}]
Charger -> central system:
[3, "<message-id>",
{"status":"Accepted",
"connectorId":1,
"chargingSchedule":{
"duration":3600,
"chargingRateUnit":"A",
"chargingSchedulePeriod":[
{"startPeriod":0,"limit":10,"numberPhases":1}
],
"minChargingRate":0
}}]
This mattered because it separated two questions: did the charger accept the profile? and what current did the charger believe was actually in force?
Force the charger to 10 A
I installed a 10 A OCPP charging profile.
The charger accepted it.
More importantly, GetCompositeSchedule reported:
10 A
After the charging state was restarted, the car actually charged at about:
~9.3 A
So I pulled a diagnostic dump from the charger.
Inside it was this:
cpVolt:581 cpVoltN:-1160 pwm:166 gridVoltL1L2:23375 currL1L2:9346
Those values appear to mean approximately:
CP positive voltage: +5.81 V CP negative voltage: -11.60 V PWM: 166 Grid voltage: 233.75 V Current: 9.346 A
The CP voltage is consistent with J1772 State C: vehicle connected and requesting power.
But the interesting field is:
pwm:166
J1772 gives us the conversion
For currents up to 51 A, SAE J1772 represents available current using the control-pilot duty cycle:
Available current = duty cycle (%) × 0.6
So a 10 A pilot should be:
10 / 0.6 = 16.67%
The Autel diagnostic value:
166
makes perfect sense if it represents duty cycle in tenths of a percent:
166 = 16.6% 16.6 × 0.6 = 9.96 A
The car was drawing about:
9.35 A
Everything lined up almost perfectly.
At this point, I was reasonably confident that Autel’s diagnostic
pwm field represented J1772 duty cycle in 0.1% units.
That gave me a way to see what the charger was actually advertising to the vehicle.
Then I removed the 10 A profile
I cleared the OCPP charging profile.
The current immediately increased:
Before: ~9.3 A After: ~14.5 A
That was useful by itself because it proved the OCPP profile really had been controlling the pilot.
I then captured another diagnostic dump.
cpVolt:579 cpVoltN:-1158 pwm:255 gridVoltL1L2:23034 currL1L2:14634
Or, interpreted:
CP positive: +5.79 V CP negative: -11.58 V PWM: 255 Grid voltage: 230.34 V Current: 14.634 A
And that is where things got interesting.
255
If pwm is still tenths of a percent:
255 = 25.5%
J1772 therefore gives:
25.5 × 0.6 = 15.3 A
The vehicle was drawing:
14.634 A
That is exactly the sort of small difference I would expect between advertised maximum current and actual charger draw.
More importantly, 255 is a rather suspicious number.
255 decimal = 0xFF hexadecimal
It is the largest value representable by an unsigned 8-bit integer.
What higher currents would require
| Current | J1772 duty | Autel-style pwm |
|---|---|---|
| 6 A | 10.0% | 100 |
| 10 A | 16.7% | 167 |
| 14 A | 23.3% | 233 |
| 15 A | 25.0% | 250 |
| 15.2 A | 25.3% | 253 |
| 15.3 A | 25.5% | 255 |
| 16 A | 26.7% | 267 |
| 20 A | 33.3% | 333 |
| 24 A | 40.0% | 400 |
| 40 A | 66.7% | 667 |
The charger behaves correctly below the boundary.
At unrestricted current, it lands on:
255
exactly.
That is hard to dismiss as coincidence.
This does not necessarily mean uint8_t
One tempting conclusion would be:
uint8_t pwm;
But I don’t think the evidence supports saying that yet.
If a value of 267 were simply cast into an unsigned byte, it would wrap:
267 modulo 256 = 11
That isn’t what happens.
Instead, the value stops at:
255
That suggests saturation or clamping, rather than simple integer overflow.
Possibilities include:
- a one-byte field in an internal protocol;
- an explicit
min(value, 255)clamp; - an older firmware interface whose maximum encoded value is 255;
- a firmware mismatch between controllers;
- a compatibility layer translating a wider current value into an older one-byte representation;
- or some other configuration maximum expressed using the same field.
The evidence tells me where the symptom appears. It does not yet tell me which controller is responsible.
The charger actually has multiple controllers
Autel’s own application identifies two important firmware modules in this unit.
__UNI__OTA_ECC0101 Charge Control Module Version 1.38.00 __UNI__OTA_ECP0201 Power Control Module Version 1.22.00
The backend also reports:
maxCurrent: 40.0 switchCurrent: 400.0 maxCurrentSet: 24.0
So the system clearly knows this is a 40 A charger.
The switchCurrent value is especially interesting:
400
which looks very much like:
40.0 A × 10
Changing the physical current selector also changes the value displayed by the application, so at least the main control system sees the selector correctly.
This does not look like a charger that simply thinks it is a 16 A model.
Could the two firmware versions be incompatible?
Possibly.
I want to emphasize the word possibly.
The charger contains separate Charge Control and Power Control firmware.
A plausible failure mode would be something like:
newer controller
│
│ current encoded in a wider field
▼
older interface / controller
│
│ expects one-byte PWM × 0.1%
▼
0xFF maximum
│
▼
25.5% duty cycle
│
▼
15.3 A J1772 advertisement
That would be an unusually satisfying explanation.
It is also still only a hypothesis.
To prove it, I would need to determine whether the Charge Control Module
sends 255 to the Power Control Module, or whether the Power
Control Module receives a larger value and clamps it internally.
Fortunately, the hardware is fairly approachable
Public reverse-engineering work on the MaxiCharger has already identified much of the hardware. In particular, the Black Hat USA 2024 paper “Low Energy to High Energy: Hacking Nearby EV Chargers over Bluetooth” documents the platform and provides useful context for approaching the controller hardware.
The Power Control Module uses an STM32F407, and researchers have shown that its debug interfaces are accessible.
That gives several possible next steps:
- Capture its UART output.
- Read the Power Control firmware over SWD.
- Load the firmware into Ghidra.
- Find the diagnostic string containing
charge_monitor_log. - Follow references to the code that prints
pwm. - Determine the type and source of that value.
If the inter-controller bus can be identified, it would be even better to observe what happens while changing the requested current.
10 A request → 166 14 A request → 233 15 A request → 250 16 A request → ? 20 A request → ?
We already know what the final pilot does.
What I want to know is which side of the controller boundary first turns those larger values into 255.
The diagnostic interface was unexpectedly useful
OCPP’s GetDiagnostics command turned out to be extremely
valuable.
The charger accepts an HTTP URL and uploads its diagnostic log there using:
POST multipart/form-data
The multipart request contains:
id = localPrintf
and the diagnostic file itself.
One small implementation quirk:
http://server:8080
results in a malformed request from this firmware:
POST HTTP/1.1
while:
http://server:8080/
works correctly:
POST / HTTP/1.1
That cost me a little time.
First, I just listened with netcat
Before writing any tooling, I pointed the charger at a bare TCP listener:
$ nc -l 8082 POST / HTTP/1.1 Host: <receiver>:8082 Connection: keep-alive Content-Length: ... Content-Type: multipart/form-data; boundary=... Content-Disposition: form-data; name="id" localPrintf Content-Disposition: form-data; name="file"; filename="....log" Content-Type: application/x-gzip <diagnostic payload>
That was enough to answer the important questions. The charger was not
using some proprietary upload transport: it was sending an ordinary
multipart HTTP POST with an id field and a file upload.
Once I knew the shape of the request, I replaced nc with a
small Python receiver. It listens on 0.0.0.0:8082, reads the
request body according to Content-Length, extracts the
multipart boundary, records the id field, sanitizes the
uploaded filename with its basename only, saves the file under an
autel-diagnostics/ directory, and returns HTTP 200.
I eventually made the receiver deliberately tolerant of the malformed request line this firmware produces when the destination URL has no path. That way even:
POST HTTP/1.1
can still be captured for debugging, although using a trailing slash in the URL is the cleaner fix.
Once working, however, the diagnostic receiver exposed the internal charge-monitor values that led directly to the PWM discovery.
Then I went looking for firmware
At this point I wanted to answer two questions:
-
Are
ECC 1.38.00andECP 1.22.00actually a supported pair? - Can I reinstall known-good firmware?
Autel doesn’t make that particularly easy.
The Android application communicates with a cloud API and the charger itself has its own firmware-update API.
My charger is configured to use the Canadian Autel backend:
gateway-eneprodca.autel.com
The Android application identifies the exact firmware components as:
__UNI__OTA_ECC0101 __UNI__OTA_ECP0201
Public security research has documented Autel’s firmware update infrastructure, including endpoints such as:
/api/app-version-manager/version/upgrade/ota
and the application-facing:
/api/data-service/device/pile/version/upgrade/ota
The latter requires a normal authenticated Autel application session.
Reverse engineering the Android app
The current Autel Charge Android package is:
com.autel.charge
I pulled the installed APKs directly from my phone using ADB.
The application is protected and packed, but the architecture-specific APK still exposes a lot of useful information.
Among the strings are:
/api/data-service/device/pile/version/upgrade/ota /api/data-service/device/pile/firmware/syncByApp /api/data-service/device/pile/firmware/syncByApp/v2
and headers including:
Authorization X-Token X-Region X-Version X-Platform X-Model
So the app-side firmware API isn’t really mysterious.
The problem is authentication.
The logging system was another rabbit hole
Older research into the Autel application found that its logs could reveal
request headers, including the application’s X-Token.
I found an Autel log file on my phone:
autel_xlog_20260918.xlog
Unfortunately, newer versions of the app have improved this.
The current app loads:
libmarsxlog.so
from Tencent’s Mars logging framework.
The .xlog file I recovered is not plain compressed text.
It uses an encrypted Xlog record format.
I found what appears to be the Xlog public key in the application, but that does not help decode existing logs: the corresponding private key is intended to remain on Autel’s side.
Autel app
│
├── plaintext internal logs
│
└── Mars Xlog
│
├── compressed
└── encrypted with Autel public key
The app can encrypt support logs. The holder of the corresponding private key can decrypt them.
Logcat still leaked quite a bit
Android logcat, however, turned out to be surprisingly
informative.
The application logged messages received from its backend WebSocket, including the full device-detail object.
That exposed things such as:
firmwareEccVersion: 1.38.00 firmwareEcpVersion: 1.22.00 maxCurrent: 40.0 maxCurrentSet: 24.0 switchCurrent: 400.0 lowCurrentEnabled: true
along with the exact firmware identifiers.
I have intentionally omitted device credentials, account identifiers, tokens, and other private values.
The backend response also confirmed that the application itself regards the two modules as:
Charge Control Module Power Control Module
rather than treating the entire charger as one monolithic firmware image.
What about lowCurrentEnabled?
That field caught my attention:
lowCurrentEnabled: true
The app also contains an endpoint specifically for changing it:
/api/home-pile/user/charge/pile/updateLowCurrentEnabled
So it isn’t merely a descriptive label.
I have not established that this setting has anything to do with the 15.3 A limit.
In fact, the exact 255 PWM ceiling still looks much more like
an encoding or firmware-interface issue.
But it is another configuration layer worth understanding before declaring the firmware guilty.
There is some history here
According to the previous owner, the low-current problem appears to have begun while the charger was being managed through ChargeLab.
There is also a Reddit discussion that appears very likely to have been written by the original owner of this exact charger describing a similar problem after remote-management or firmware activity.
That is useful provenance.
It is not proof that ChargeLab or Autel pushed a bad firmware update.
Possible explanations still include:
- an interrupted firmware update;
- a partial update;
- mismatched ECC/ECP firmware;
- a hidden persistent configuration value;
- an unrelated firmware defect;
- or something else entirely.
I don’t want to turn correlation into causation.
What I can demonstrate independently is the behaviour of the charger now.
What I think I know
The charger is physically and configurationally a 40 A unit
The physical selector is recognized, and the cloud configuration reports:
maxCurrent = 40 A
The vehicle is not imposing the ~15 A limit
The same vehicle charges at higher current from another EVSE.
OCPP Smart Charging works
A 10 A profile produces approximately a 10 A J1772 pilot and about 9.3 A of actual charging current.
The diagnostic pwm value appears to be tenths of a percent
At 10 A:
pwm = 166 16.6% × 0.6 = 9.96 A
With higher limits removed, the PWM stops at exactly 255
pwm = 255 25.5% × 0.6 = 15.3 A
The actual vehicle current follows that pilot
~14.5–14.6 A
Values below the boundary work
That strongly suggests the problem is somewhere in the command path rather than a failed contactor, meter, cable, or vehicle charger.
What I don’t know yet
I have not proven:
- that the charger uses an 8-bit PWM variable;
- that the ECC firmware is faulty;
- that the ECP firmware is faulty;
- that ECC 1.38.00 and ECP 1.22.00 are incompatible;
- that ChargeLab caused the problem;
- that Autel caused the problem;
- or that reinstalling firmware will fix it.
The strongest conclusion I can make today is this:
Somewhere in or before the pilot-generation path, a value that should exceed 255 is instead saturating at exactly 255, resulting in a maximum J1772 advertisement of approximately 15.3 A.
That is a much narrower claim.
It is also something that should be straightforward for the manufacturer to investigate.
Why this is frustrating
The difficult part isn’t that a piece of electronics developed a fault.
Things break.
The frustrating part is that this is a cloud-connected device with multiple firmware components, remote management, authenticated firmware distribution, and no obvious owner-accessible recovery mechanism.
If the problem is simply a damaged or mismatched firmware image, the hardware may be perfectly capable of operating normally.
But restoring it requires either:
- cooperation from Autel;
- obtaining the appropriate firmware;
- reverse engineering the firmware update process;
- or going directly to the microcontrollers.
That is a strange situation for equipment that I legally own and that is otherwise electrically functional.
Canadian right-to-repair makes this especially interesting
On November 7, 2024, Canada’s Bill C-244 received Royal Assent and added section 41.121 to the Copyright Act. The provision creates an exception to the TPM anti-circumvention rule when circumvention is done solely for maintaining or repairing a product, including related diagnosis. The current statutory text is available from Justice Laws Website.
That doesn’t require Autel to provide source code, signing keys, firmware images, or service documentation.
But it does mean that reverse engineering the protection around my own charger for the purpose of repairing it is on considerably firmer legal ground than it once was.
That may become relevant if the manufacturer cannot or will not provide a recovery procedure.
What comes next
My next steps are likely to be:
1. Ask Autel to confirm whether ECC 1.38.00 + ECP 1.22.00 is a supported firmware combination. 2. Ask for a supported firmware reinstallation/recovery procedure. 3. Determine what "lowCurrentEnabled" actually controls. 4. Recover the firmware images if necessary. 5. Read the ECP STM32 firmware over SWD. 6. Locate the code responsible for the `pwm` diagnostic value. 7. Identify the ECC ↔ ECP communications interface. 8. Determine which side first clamps the value to 255.
If the Power Control firmware contains something resembling:
if (pwm > 255)
pwm = 255;
this investigation is going to become considerably shorter.
If not, the bus between the two controllers is probably the next place to look.
The interesting part
This started as:
Why is my 40 A charger only charging at 14 amps?
It turned into:
10 A request
│
▼
pwm = 166
│
▼
16.6%
│
▼
9.96 A advertised
│
▼
~9.3 A actual
versus:
high-current request
│
▼
pwm = 255
│
▼
25.5%
│
▼
15.3 A advertised
│
▼
~14.6 A actual
That is a remarkably clean failure signature.
I bought the charger because I suspected the fault was more interesting than a bad contactor or damaged cable.
So far, it has not disappointed.
Now I just need to find out which layer of the system is writing
0xFF.
References and project links
- Home Assistant OCPP integration
- PR #2153 — Add service GetCompositeSchedule
- Black Hat USA 2024 — Low Energy to High Energy: Hacking Nearby EV Chargers over Bluetooth
- Reddit discussion describing the same low-current failure history
- Canada Copyright Act, section 41.121 — diagnosis, maintenance and repair
This article documents the investigation and repair of a charger that I own. Measurements and observations refer to this particular device. Possible explanations involving firmware compatibility, remote management, ChargeLab, or Autel infrastructure are identified as hypotheses unless I have direct evidence establishing them.
Device credentials, account identifiers, authentication tokens, and other private values have been omitted.