# Problem contacting ESC

Source: https://forum.modalai.com/topic/2965/problem-contacting-esc
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2023-12-18 15:54:23 UTC by Riccardo Franceschini
Replies: 10 · Views: 2306

## Riccardo Franceschini · 2023-12-18 15:54:23 UTC

Hi we are trying to configure the flight deck voxl2 board with the sdk 1.1.1 recently flashed.

We are encountering problems detecting the ESC in particular while running 
```
voxl-esc
``` 
with the option 1 (scan), the output is the following

```
Found voxl-esc tools bin version: 1.4
VOXL Platform: M0054
Detected RB5 Flight, VOXL2 M0054 or M0104!
INFO: Scanning for ESC firmware: /dev/slpi-uart-2, baud: 2000000
terminate called after throwing an instance of 'qmi_error'
  what():  qmi_client_send_msg_sync() failed, (client_id=)0, result=0: qmi service error (-2)
/usr/bin/voxl-esc: line 133:  4321 Aborted                 python3 voxl-esc-scan.py
FAILED to ping ESCs
disabling bridge
bridge disabled
DONE
```
while running the option detect (2)

```
enabling bridge
bridge enabled
Received standard error event 2
Received standard error event 2
Couldn't configure flight_controller sensor
ERROR:   fc_sensor_initialize failed
ERROR:   Failed to initialize slpi
ERROR:   Encountered error while initializing bus 12
ERROR:   voxl_uart_flush: Bus '12' is not initialized
ERROR:   voxl_uart_read_bytes: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_read_bytes: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_read_bytes: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_read_bytes: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_read_bytes: Bus '12' is not initialized
ERROR:   voxl_uart_read_bytes: Bus '12' is not initialized
ERROR:   voxl_uart_read_bytes: Bus '12' is not initialized
ERROR:   voxl_uart_flush: Bus '12' is not initialized
ERROR:   voxl_uart_close: Bus '12' is not initialized
```

Do you have any idea of why we are encountering this error?

## Reply by ejohnson01 · 2023-12-18 18:14:53 UTC

I'm not 100% that this is your issue, but I think I have seen this when voxl-px4 is running in the background. Make sure to run `systemctl stop voxl-px4` before running `voxl-esc`

## Reply by smilon · 2023-12-18 18:36:32 UTC

I am facing a similar-natured issue after upgrading to SDK 1.1.2. While everything from voxl-esc tool works fine in my case (scan, spin). I am getting px4 warnings that arming is denied and failsafe triggered when I try to arm. Then when I run:
```
./voxl-esc-verify-params.py
./voxl-esc-scan.py
./voxl-esc-calibrate.py 

etc.
```
I get:
```
Detected Python version : 3.6.9 (default, Mar 10 2023, 16:46:00) 
[GCC 8.4.0]
Found voxl-esc tools bin version: 1.4
VOXL Platform: M0054
Detected RB5 Flight, VOXL2 M0054 or M0104!
INFO: Scanning for ESC firmware: /dev/slpi-uart-2, baud: 2000000
Sending library name request: libslpi_qrb5165_io.so
Received standard error event 2
Sending initialization request
Received standard error event 2
Couldn't configure flight_controller sensor
ERROR:   fc_sensor_initialize failed
ERROR:   Failed to initialize slpi
ERROR:   Encountered error while initializing bus 12
ERROR:   voxl_uart_flush: Bus '12' is not initialized
ERROR:   voxl_uart_read_bytes: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_read_bytes: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_read_bytes: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_read_bytes: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_write: Bus '12' is not initialized
ERROR:   voxl_uart_read_bytes: Bus '12' is not initialized
ERROR:   voxl_uart_read_bytes: Bus '12' is not initialized
ERROR:   voxl_uart_read_bytes: Bus '12' is not initialized
ERROR:   voxl_uart_read_bytes: Bus '12' is not initialized
ERROR:   voxl_uart_flush: Bus '12' is not initialized
ERROR:   voxl_uart_close: Bus '12' is not initialized
INFO: Scanning for ESC firmware: /dev/slpi-uart-2, baud: 250000
```

## Reply by Alex Kushleyev (ModalAI staff) · 2023-12-18 20:16:01 UTC

@Riccardo-Franceschini ,  can you please try to manually stop px4 before running any ESC scripts and let us know if the issue persists. If PX4 is running, it will interfere with proper operation of `voxl-esc` tools because they may be trying to use the same UART port.

```
systemctl stop voxl-px4
```

## Reply by Riccardo Franceschini · 2023-12-19 11:10:02 UTC (in reply to Alex Kushleyev)

Hi, the voxl-px4 was not affecting the problem. It seems to be solved by performing a new factory reset, as explained [here](https://forum.modalai.com/topic/2822/starling-v2-voxl-configure-mpa-fails-to-execute-voxl-esc-setup_starling_v2-and-voxl-elrs-scan/7). However, we have now lost the calibration files. How can those be retrieved? We encountered a similar problem on two boards with serials  M2100000J2R and M22000003EV.

## Reply by Alex Kushleyev (ModalAI staff) · 2023-12-19 16:04:44 UTC (in reply to Riccardo Franceschini)

@Riccardo-Franceschini , can you please clarify which calibration files you need?

## Reply by Riccardo Franceschini · 2023-12-20 11:10:56 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev sure are those :

```
Calibration File Status:
Missing /data/modalai/voxl-imu-server.cal 
Missing /data/modalai/opencv_tracking_intrinsics.yml 
Missing /data/modalai/opencv_stereo_front_intrinsics.yml 
Missing /data/modalai/opencv_stereo_front_extrinsics.yml 
Missing /data/modalai/opencv_stereo_rear_intrinsics.yml 
Missing /data/modalai/opencv_stereo_rear_extrinsics.yml 
Missing /data/px4/param/parameters_gyro.cal 
Missing /data/px4/param/parameters_acc.cal 
Missing /data/px4/param/parameters_level.cal 
Missing /data/px4/param/parameters_mag.ca
```

The camera ones and the IMU I can recover them by using the calibration tools but I haven't found a solution for the px4 ones

## Reply by Eric Katzfey (ModalAI staff) · 2023-12-20 15:45:06 UTC (in reply to Riccardo Franceschini)

@Riccardo-Franceschini Can you just do the PX4 sensor calibrations to get new files? They only take a couple of minutes.

## Reply by Riccardo Franceschini · 2023-12-21 10:10:47 UTC (in reply to Eric Katzfey)

@Eric-Katzfey 
Hi Eric, I tried using QGroundControl. The accelerometer and gyro have been successfully calibrated, but I encountered an error stating "no mags" when attempting to calibrate the compass and then nothing happen. Do you have any ideas about what could be causing this issue?

## Reply by Eric Katzfey (ModalAI staff) · 2023-12-21 16:03:06 UTC (in reply to Riccardo Franceschini)

@Riccardo-Franceschini Can you provide some more details about your system? For example, what kind of magnetometer do you have?

## Reply by Riccardo Franceschini · 2024-01-16 12:15:07 UTC (in reply to Eric Katzfey)

Hi @Eric-Katzfey eventually we managed to solve the problem by resetting to default the parameter of px4 and performing the calibration from qgc
