# How to start the micrortps\_client on a pixhawk4?

**URL:** <https://discuss.px4.io/t/how-to-start-the-micrortps-client-on-a-pixhawk4/28353>\
**Category:** ROS 1 / ROS 2\
**Created:** [July 19, 2022, 9:36am UTC](https://discuss.px4.io/t/how-to-start-the-micrortps-client-on-a-pixhawk4/28353 "2022-07-19T09:36:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![florian.pix](https://discuss.px4.io/letter_avatar_proxy/v4/letter/f/d6d6ee/32.png) [@florian.pix](https://discuss.px4.io/u/florian.pix)\
**Post date:** [July 19, 2022, 9:36am UTC](https://discuss.px4.io/t/how-to-start-the-micrortps-client-on-a-pixhawk4/28353/1 "2022-07-19T09:36:32Z")

</div>

I already ran a microRTPS agent and client with SITL and it worked flawlessly.  
But now I want to try it with the real hardware i.e. a pixhawk4.

I ran `make px4_fmu-v5_rtps upload` and then try to run `micrortps_client start` in the nsh but as soon as I press enter I get this [hardfault](https://paste.ofcode.org/34p23xpTvGeqCNe6nBt4Mkk).

The section in the documentation about how to set this up with real hardware is currently [wip](https://docs.px4.io/v1.12/en/middleware/micrortps.html#setting-up-the-bridge-with-real-hardware) but maybe someone here already did it.

I saw the other [post on this forum](https://discuss.px4.io/t/building-px4-ros2-bridge-on-hardware-pixhawk-4/24266/2) and followed it but I still get the hardfault.

---

<div class="post-metadata">

**Author:** ![florian.pix](https://discuss.px4.io/letter_avatar_proxy/v4/letter/f/d6d6ee/32.png) [@florian.pix](https://discuss.px4.io/u/florian.pix)\
**Post date:** [July 22, 2022, 11:24am UTC](https://discuss.px4.io/t/how-to-start-the-micrortps-client-on-a-pixhawk4/28353/2 "2022-07-22T11:24:38Z")

</div>

I found an [issue](https://github.com/PX4/PX4-Autopilot/issues/19482) about this.

A workaround is to disable this parameter `CONFIG_MODULES_MICRODDS_CLIENT=n`  
or switch to the last stable version, at the time of writing this reply it is v1.13.0.

---

<div class="post-metadata">

**Author:** ![nsimon](https://discuss.px4.io/user_avatar/discuss.px4.io/nsimon/32/8784_2.png) [@nsimon](https://discuss.px4.io/u/nsimon)\
**Post date:** [July 22, 2022, 8:01pm UTC](https://discuss.px4.io/t/how-to-start-the-micrortps-client-on-a-pixhawk4/28353/3 "2022-07-22T20:01:57Z")

</div>

Hi @florian.pix, I am also unable to start the `micrortps_client` per my [previous post](https://discuss.px4.io/t/building-px4-ros2-bridge-on-hardware-pixhawk-4/24266).

After accessing the pixhawk’s `nsh>` through `mavlink_shell.py` from my companion computer, I get the following error when trying to start the `micrortps_client`:

```auto
nsh> micrortps_client status
INFO [micrortps_client] Not running
nsh> micrortps_client start -t UART
INFO [micrortps_client] UART transport: device: /dev/ttyACM0; baudradevice reports readiness to read but returned no data (device disconnected or multiple access on port?)

```

This error is originating from `.local/lib/python3.8/site-packages/serial/serialposix.py`

This error occurs every time I try to start the `micrortps_client` - whether through the mavlink shell or QGC console. The Pixhawk disconnects from QGC and plays the [error tune](https://docs.px4.io/v1.9.0/en/getting_started/tunes.html). The connection between the Pixhawk 4 and the companion computer (a Raspberry Pi running Ubuntu 20.04) is a usb cable into the side port.

I just saw your posted solution; not sure if it applies here but I will try that and report back.

---

<div class="post-metadata">

**Author:** ![florian.pix](https://discuss.px4.io/letter_avatar_proxy/v4/letter/f/d6d6ee/32.png) [@florian.pix](https://discuss.px4.io/u/florian.pix)\
**Post date:** [July 26, 2022, 10:09am UTC](https://discuss.px4.io/t/how-to-start-the-micrortps-client-on-a-pixhawk4/28353/4 "2022-07-26T10:09:13Z")

</div>

If you aren’t using the stable version it might be that mavlink (QGC also uses mavlink) interferes with the microRTPS. You can check this by using the FMU debug port with a FTDI cable and [using the nsh shell directly](https://docs.px4.io/v1.12/en/debug/system_console.html) instead. But in general I would suggest using v1.13.0.

---

<div class="post-metadata">

**Author:** ![nsimon](https://discuss.px4.io/user_avatar/discuss.px4.io/nsimon/32/8784_2.png) [@nsimon](https://discuss.px4.io/u/nsimon)\
**Post date:** [August 2, 2022, 11:51pm UTC](https://discuss.px4.io/t/how-to-start-the-micrortps-client-on-a-pixhawk4/28353/5 "2022-08-02T23:51:32Z")

</div>

I can confirm this worked for me. Thanks very much for the help!
