# Pre-arm check failed

Source: https://forum.modalai.com/topic/955/pre-arm-check-failed
Category: Development Drones (https://forum.modalai.com/category/44/development-drones)
Tags: m500
Posted: 2022-05-22 06:47:15 UTC by yu zhang
Replies: 6 · Views: 2882

## yu zhang · 2022-05-22 06:47:15 UTC

Hi team, 
I got a weird issue. The drone was stuck at pre-arm check, and couldn’t be able to arm again. Before this, I have no issue with the pre-arm check. Actually, I tried to modify a couple of parameters that are related to flight speed and SDlog profile. Then, the pre-arm check seems to be failed. 

I tried to reset the parameters to default, but the pre-arm check still failed. I uploaded 3 logs to the px4 view showing from boot to shutdown, but I couldn’t figure it out what happened. So, can you please help me to double-check if anything is wrong? 
1. GPS enabled: https://review.px4.io/plot_app?log=9b04b3c9-3a7b-4720-b806-3ac3b152f32a 
2. VIO enabled: https://review.px4.io/plot_app?log=5426a714-c588-4f0a-9122-b510f12a06b6 
3. GPS enabled and trying to take-off: https://review.px4.io/plot_app?log=da3bea81-5f2b-47b1-aa74-c198acb54a08

I am using ``` 1.11.3-0.2.3``` and QGC 4.1.4 on MacBook pro 2021.

![Screen Shot 2022-05-22 at 3.43.44 PM.png](https://forum.modalai.com/assets/uploads/files/1653202025616-screen-shot-2022-05-22-at-3.43.44-pm.png)

## Reply by Guest · 2022-05-23 17:11:38 UTC

Hi, 

It looks like the issue is that the kill switch is engaged on your radio.

## Reply by yu zhang · 2022-05-24 01:24:34 UTC (in reply to Guest)

@Alex-Gardner Thanks for the reminder. I was confused about the kill switch this time, and I thought I should already open it :sweat_smile: . 

After checking, I will get "Arming denied press safety switch first" if I open it. Actually, I thought it was kill switch engaged. So, I am wondering where I should press the safety switch? I didn't get this notice before.

## Reply by yu zhang · 2022-05-24 01:59:39 UTC (in reply to Guest)

@Alex-Gardner I thought the "SWITCH" button on the GPS module was the safety switch, but it didn't work after pressing it (no response for all time). So, what's the actual usage of this button?

After checking, I found people were trying to set the ``` CBRK_IO_SAFETY ``` to be 22027 to release the safety switch instead of pressing any buttons. It does work for me! But, I am confused what's the risk of setting this parameter? 

Honestly, I never set it before, I am wondering why do I have to set it to release the safety switch this time? I am thinking about what parameters I changed to trigger the safety switch locked?

## Reply by yu zhang · 2022-05-24 02:16:16 UTC (in reply to Guest)

@Alex-Gardner From the PX4 link: 
https://docs.px4.io/v1.12/en/advanced_config/prearm_arm_disarm.html

It claims the default safety check should be: ```COM_PREARM_MODE=1 (safety switch)``` and ```CBRK_IO_SAFETY=0 (I/O safety circuit breaker disabled)```. It says ```CBRK_IO_SAFETY=0``` meaning IO safety disabled, but why the parameter profile page shows that ```CBRK_IO_SAFETY=22027``` will disable IO safety? I am quite confused about it :sweat_smile:.
https://docs.px4.io/v1.12/en/advanced_config/parameter_reference.html

## Reply by modaltb (ModalAI staff) · 2022-05-24 19:59:45 UTC

Hi @yu-zhang ,

Short answer: we don't use that button/switch, and 22027 disables the FW from requiring it (as far as I know).

As we use a 6-pin JST connector for our GPS connector, and don't route the actual switch/button line from the mast down to the board, there's no way for that to actual work with the 6-pin version.

Our firmware by default sets that 22027 value to make it so we don't need to press the button (since the wire doesn't actually route, you'd need the 10 pin GSP to do that...).

If someone needs to use this feature, the pin is exposed here instead: https://docs.modalai.com/voxl-flight-datasheet-connectors/#j1011---i2c2-safety-button-input

## Reply by yu zhang · 2022-05-25 01:52:24 UTC (in reply to modaltb)

@modaltb I see. It's good to know the story ;)

If 22027 is the default one, it will be all right. 

To be honest, I didn't touch the ```CBRK_IO_SAFETY``` before, and it's a bit weird why it was automatically modified for some reason. 

Actually, I was trying to refresh a re-compiled ``` 1.11.3-0.2.3``` with my modification (increasing GPS log rate). So, I guess it might reset the value to 0 by PX4 default. 

Anyways, thanks so much!
