RadSense 1 - Troubleshooting errors when uploading firmware

When uploading new firmware, several things can happen that prevent the upload from completing successfully. This page will help you troubleshoot some of the most common errors.

exit status 2

When the upload seem to go fine, but it fails just as it tried to send it from the computer to the device, you can see an error like this:

A fatal error occurred: No serial data received.
Failed uploading: uploading error: exit status 2

This means that the device was not ready to receive the new firmware. This can happen if you upload faulty firmware or something that “hogs” the Serial port. Follow the steps below to solve the problem:

  1. Unscrew the four corner screws on the device. Leave the lower part of the plastic case, but remove the upper part so you can see the circuit board.
  2. Hold down the button marked “Reset”. You will feel a small click as you do so.
  3. Keep holding “Reset” while clicking the “Boot” button once. Release the Boot button first, then the Reset button.
  4. Upload new code

This sequence will stop code from running on the device and set it ready to receive new firmware. If the device does not restart once new code is uploaded, press the Reset button once or re-power the device.

Compilation error

If you mistype anything in your code, you’ll likely get a comnpilation error. The compiler will suggest reasonably sensible alternatives like this:

Compilation error: 'class State' has no member named 'ggetDeviceMode'; did you mean 'getDeviceMode'?

In this case, it’s just a typo and the suggestion is quite sensible, but it will usually require some experience to resolve programming errors. You will also get a similar error if you forget to add the libraries required by the code.

adc_oneshot: adc_oneshot_new_unit(87): adc unit not supported

This error is especially annyoing since it’s impossible for Arduino users to avoid this being printed to the Serial Monitor. It may also show as “adc2_get_raw(750): adc unit not supported” depending on the version of the ESP-IDF that is used. This error popped up after we produced v1.6 (the first version that went into sale). The problem is solved in future versions of the hardware. To remove the error, comment any lines of code that use pin defined as IN2_PIN.

analogValue2 = analogRead(IN2_PIN); // Change this line
// analogValue2 = analogRead(IN2_PIN); // into this

Commenting that line of code renders the potentiometer on Output 2 useless, but it does stop the error from showing. The problem is caused by a hardware bug that does not affect the device, but there is stupidly enough no other way to silence the error. The problem is Arduino specific. If you are using the PlatformIO IDE with VSCode, you can add this line to your platformio.ini file:

platform = espressif32@6.3.0

Using this version of the ESP-IDF will make the error disappear, but in the Arduino IDE, there is no option for this. The problem may be solved in the future and newer versions of the Arduino ESP32 integration.

Version 1.7 and newer versions of the hardware have been changed to solve the problem (using different pins). This is not likely to affect many users, but if this is a significant problem for you, we will replace the circuit board at no cost other than postage. Send the old circuit board via snail mail to Maketronics, Johan Svendsensvei 4B, 1410 Kolbotn, Norway and we’ll send you an updated PCB that solves the problem. Remember to enclose the PCB and the return address.

If you cannot solve the problem yourself

Ask for help at a forum for Arduino or ESP32 users. Be sure to post your code when you ask for help, since without it, nobody can really know what your problem is. Also provide a link back to this page, so anyone helping can learn about the device you’re using.

Scroll to Top