# Turn off lockdown in HIL?

**URL:** <https://discuss.px4.io/t/turn-off-lockdown-in-hil/4600>\
**Category:** PX4 Autopilot\
**Created:** [October 5, 2017, 4:08am UTC](https://discuss.px4.io/t/turn-off-lockdown-in-hil/4600 "2017-10-05T04:08:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![zfurman](https://discuss.px4.io/letter_avatar_proxy/v4/letter/z/6bbea6/32.png) [@zfurman](https://discuss.px4.io/u/zfurman)\
**Post date:** [November 26, 2017, 11:36pm UTC](https://discuss.px4.io/t/turn-off-lockdown-in-hil/4600/2 "2017-11-26T23:36:36Z")

</div>

Thought I’d reply since I figured out the issue. In HIL, the simulated servo driver, `pwm_out_sim`, is started alongside the physical servo driver, `px4fmu`. This causes the device name `pwm_output0` (the primary servo channel) to be registered by the simulated driver instead of the physical one. Under normal, non-HIL use, the device name `pwm_output0` is occupied by the physical driver. Under HIL, the physical driver is still started, but it’s registered under `pwm_output1`, which means it misses all messages, including primary servo commands.

To fix this, I [edited the init script (rcS)](https://github.com/zfurman56/Firmware/commit/92018bbd4742a1138646d6a0ff18f3d20ecaf031) to not start `pwm_out_sim` in HIL. Of course, for this to work, you must also set `armed->lockdown = false`, or [comment out lines](https://github.com/zfurman56/Firmware/commit/ded1b109570a9d725b795bdc92066fef213188e1) that say `armed->lockdown = true`.

It’s a little irritating that this wasn’t documented - setting lockdown to false is not enough to disable lockdown, you have to disable `pwm_out_sim`. And the physical driver didn’t throw any warnings, messages, etc. to indicate that it in fact was not registered under the primary servo device name. It took me over a month to figure this out.

Anyway, hope this helps someone.

---

_[View the full topic](https://discuss.px4.io/t/turn-off-lockdown-in-hil/4600)._
