commaai / commaai/qdl.js

Interrupting during an operation can get the device into a bad state

Open
#79 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
19
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Encountered while working on #78 - CTRL-C during a flash command

We get an error when trying to send the configure command, or even if we skip the configure and try other commands like `power` to reset.

Not sure if there's a way to recover (other than replugging, which works)

```
$ qdl.js erase system_a # NOTE: this was not using fast erase, so it was flashing the partition with zeroes
[qdl] QDL device detected
connected sahara
[qdl] Connected to Sahara
[sahara] Uploading loader...
[sahara] Firehose mode detected, uploading...
[sahara] Loader successfully uploaded in 60.146ms
[qdl] Firehose configured
Erasing system_a...
^C

$ qdl.js getstorageinfo
[qdl] QDL device detected

connected firehose
102 | // not reached handler yet
103 | data = await this.waitForData();
104 | response = this.xml.getResponse(data);
105 | }
106 | if (!("value" in response)) {
107 | throw new Error("No return value");
^
error: No return value
at (/home/cameron/comma/qdl.js/dist/firehose.js:107:19)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the CTRL-C interruption during the `erase` flash command, then inspect the Firehose response handling shown in `dist/firehose.js` around the `waitForData()` and `No return value` error. Verify that subsequent commands such as `getstorageinfo`, `configure`, or `power` work without replugging the device; the issue does not specify the intended recovery mechanism.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.