# Ardusub initial setup

**URL:** <https://discuss.bluerobotics.com/t/ardusub-initial-setup/272>\
**Category:** ArduSub\
**Created:** [April 8, 2016, 9:17am UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272 "2016-04-08T09:17:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![vegards](https://avatars.discourse-cdn.com/v4/letter/v/a88e57/32.png) [@vegards](https://discuss.bluerobotics.com/u/vegards)\
**Post date:** [April 8, 2016, 9:17am UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/1 "2016-04-08T09:17:29Z")

</div>

Hi guys, i am trying to use the ardusub with the pixhawk.  
When i try to run sudo ./rov-setup.sh in the companion directory it doesent run.  
I checked the directory and i couldent find the .sh file, i found a ./setup.sh file and tried to run that but that didnt work either.

Has anyone done this step and be willing to help me out a bit? i tried connecting the pixhawk direcley to the computer and i calibrated it but it still gives me an error because i havent connected a radio controller.

Any input is appreciated, thanks in advance 🙂

---

<div class="post-metadata">

**Author:** ![rjehangir](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/rjehangir/32/671_2.png) [@rjehangir](https://discuss.bluerobotics.com/u/rjehangir)\
**Post date:** [April 8, 2016, 10:48am UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/2 "2016-04-08T10:48:55Z")

</div>

Hi Vergard,

The companion scripts are still a work in progress! We just started adding those a few weeks ago.

For now, please copy and paste the commands from setup.sh to the terminal and run them one by one. Please check to make sure everything completes successfully.

Regarding the radio, you can “calibrate” the radio using the joystick once you set up the joystick. That will cause the radio error message to go away.

Best,

Rusty

---

<div class="post-metadata">

**Author:** ![vegards](https://avatars.discourse-cdn.com/v4/letter/v/a88e57/32.png) [@vegards](https://discuss.bluerobotics.com/u/vegards)\
**Post date:** [April 8, 2016, 10:49pm UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/3 "2016-04-08T22:49:40Z")

</div>

Thank you very much rusty!  
I tried compiling again from scratch using the ardusub bluerov and when i tried compiling the software i got this error (see picture) is there any solution for this or should i just wait untill there are new fixes in the github?

Apparently the get\_safe\_depth is missing?

&nbsp;

Again thank you in advance for any help 🙂

 ![](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/1X/4aefc4239ffd345e5fbbc52b3fc7dfa98c91bb35.png)

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [April 9, 2016, 2:05am UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/4 "2016-04-09T02:05:41Z")

</div>

The directory must be named ‘ArduSub’, you have ‘ardusub’. Rename it, and try compiling again.  
-Jacob

---

<div class="post-metadata">

**Author:** ![vegards](https://avatars.discourse-cdn.com/v4/letter/v/a88e57/32.png) [@vegards](https://discuss.bluerobotics.com/u/vegards)\
**Post date:** [April 10, 2016, 12:51am UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/5 "2016-04-10T00:51:20Z")

</div>

Thanks Jacob, that worked!  
Everything worked as it should, but now i have problems with getting the mavproxy to work, i can run the mavproxy command on the raspberry, but the qgroundcontrol wont connect. I tried setting the udp port in preferences and using the IP for the Raspberry pi but it still doesen’t connect to the pixhawk.  
I attached the output from when i ran the \<strong class=“final-path”\>start\_mavproxy\_telem\_splitter.sh

I don’t really expect you guys to help as i assume you have better things to do, but thank you very much!

 ![](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/1X/5760feffb64997892d22ac383aaf6fc285d58e88.png)

---

<div class="post-metadata">

**Author:** ![rjehangir](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/rjehangir/32/671_2.png) [@rjehangir](https://discuss.bluerobotics.com/u/rjehangir)\
**Post date:** [April 10, 2016, 7:28am UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/6 "2016-04-10T07:28:12Z")

</div>

Hi Vegard,

Let me explain the current command in `start_mavproxy_telem_splitter.sh` and hopefully that will help.

```auto

mavproxy.py --master /dev/ttyACM0,115200 \
            --master /dev/ttyAMA0,57600 \
            --out udpin:localhost:9000 \
            --out udpbcast:169.254.255.255:14550

```

The first two lines try to open the serial port on ttyACM0 (USB) and ttyAMA0 (direct serial). You might want to remove whichever one you aren’t using, but it appears that you are connecting correctly.

The third line listens for incoming mavlink messages on the Raspberry Pi’s port 9000.

The last line broadcasts the outgoing mavlink messages on port 14550. The IP address is 169.254.255.255, which will broadcast to all computers with IP addresses in the form of 169.254.xxx.xxx. You must make sure that your host computer (laptop) has an IP address that works with that. Otherwise you can change it in the script.

Best,

Rusty

---

<div class="post-metadata">

**Author:** ![vegards](https://avatars.discourse-cdn.com/v4/letter/v/a88e57/32.png) [@vegards](https://discuss.bluerobotics.com/u/vegards)\
**Post date:** [April 11, 2016, 2:02am UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/7 "2016-04-11T02:02:38Z")

</div>

Yes, great i edited the lines a little, and now i worked!  
Thank you guys very much! Not only do you make great products but you also take the time to help newbies like me 🙂

Soon its time for some pool testing 😃

---

<div class="post-metadata">

**Author:** ![jonathan-santrovitsc](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@jonathan-santrovitsc](https://discuss.bluerobotics.com/u/jonathan-santrovitsc)\
**Post date:** [July 8, 2016, 2:09am UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/8 "2016-07-08T02:09:13Z")

</div>

Rusty,

&nbsp;

To setup the resolution of the camera of the Raspberry pi, I need to change something on the “start\_mavproxy\_telem\_splitter.sh”? I open this file on the raspberian and see some resolution to low (640x480).

Can you explain how the right mod’s to work with full HD? I know that have some latency, but I prefer quality image.

&nbsp;

Jonathan

---

<div class="post-metadata">

**Author:** ![rjehangir](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/rjehangir/32/671_2.png) [@rjehangir](https://discuss.bluerobotics.com/u/rjehangir)\
**Post date:** [July 8, 2016, 6:59am UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/9 "2016-07-08T06:59:27Z")

</div>

Hi Jonathan,

Can you tell me where you see that line? Make sure you’re using our fork of the “companion” repository here: [GitHub - bluerobotics/companion: Companion computer startup scripts and examples](https://github.com/bluerobotics/companion)

The section with 640x480 is commented out so it uses the lower section, which specifies a “mode” instead of resolution. This is the proper mode for HD video.

Let me know if that helps.

-Rusty

---

<div class="post-metadata">

**Author:** ![jonathan-santrovitsc](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@jonathan-santrovitsc](https://discuss.bluerobotics.com/u/jonathan-santrovitsc)\
**Post date:** [July 8, 2016, 3:51pm UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/10 "2016-07-08T15:51:13Z")

</div>

Hi Guys,

I try to put to work the comunication of the RPi, Pixhawk and the QGround for 2 days, but without success. I make all on the Ardusub web page, I setup a fix ip on RPi, and nothing make connect with QGround. I can use Putty over the ip 169.254.2.2 and use the terminal of RPi for do everything’s. My be some Good Guy can send all steps to do this to work? The pixhawk are ok, because I test with the usb cable and work ok.

&nbsp;

Jonathan

---

<div class="post-metadata">

**Author:** ![rjehangir](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/rjehangir/32/671_2.png) [@rjehangir](https://discuss.bluerobotics.com/u/rjehangir)\
**Post date:** [July 8, 2016, 3:57pm UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/11 "2016-07-08T15:57:27Z")

</div>

Hi Jonathan,

Okay - sorry you’re having trouble! This is all pretty new still but we’re trying to make things easier. What does the printout look like when you run “start\_mavproxy\_telem\_splitter.sh” or “start\_video.sh”?

We very recently put together better instructions for the Raspberry Pi setup: [http://ardusub.com/raspi-setup/](http://ardusub.com/raspi-setup/)

This might help as well.

-Rusty

---

<div class="post-metadata">

**Author:** ![jonathan-santrovitsc](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@jonathan-santrovitsc](https://discuss.bluerobotics.com/u/jonathan-santrovitsc)\
**Post date:** [July 8, 2016, 7:45pm UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/12 "2016-07-08T19:45:36Z")

</div>

Rusty,

Now I believe that are all ok with the Companion. But I receive this mensage when tra connect by the UDP.

&nbsp;

Jonathan

![](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/1X/208b90d13e3eaaeb34b9ca27960b3ba167fffa25.png)

---

<div class="post-metadata">

**Author:** ![rjehangir](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/rjehangir/32/671_2.png) [@rjehangir](https://discuss.bluerobotics.com/u/rjehangir)\
**Post date:** [July 9, 2016, 2:04am UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/13 "2016-07-09T02:04:27Z")

</div>

Jonathan,

Okay. Can you tell me what version of mavproxy you are using on the Pi? You can find that out by typing

`mavproxy.py --version`

on the Raspberry Pi terminal.

-Rusty

---

<div class="post-metadata">

**Author:** ![jonathan-santrovitsc](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@jonathan-santrovitsc](https://discuss.bluerobotics.com/u/jonathan-santrovitsc)\
**Post date:** [July 9, 2016, 7:17am UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/14 "2016-07-09T07:17:14Z")

</div>

Rusty,

Attached

![](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/1X/69fadb8efc390cc694256fa7994d41778366fc06.png)

---

<div class="post-metadata">

**Author:** ![jonathan-santrovitsc](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@jonathan-santrovitsc](https://discuss.bluerobotics.com/u/jonathan-santrovitsc)\
**Post date:** [July 9, 2016, 10:08am UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/15 "2016-07-09T10:08:06Z")

</div>

Rusty,

I try the “sudo screen -r mavproxy” to check if work, put I think is not (attached nr1). I try connect a bluetooth module on the Telemetry port 1 of the Pixhawk to check if I can connect over them, but no connect to. I believe is some wrong with the serial port on the firmware of pixhawk. I can communicate with the RPi over the network by Putty. If I use the command “`sudo screen -r video”, the terminal show the files work (attached nr2).`

I know that make many questions, but I have all boards e parts of the ROV in hands and can’t use!

Jonathan Santrovitsch

&nbsp;

![](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/1X/dc06c38ec10d4051f3aa301710d915ad2d1afc27.png)

 ![](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/1X/98438825111f52e679385053e7223ea95d3d80bf.png)

---

<div class="post-metadata">

**Author:** ![rjehangir](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/rjehangir/32/671_2.png) [@rjehangir](https://discuss.bluerobotics.com/u/rjehangir)\
**Post date:** [July 11, 2016, 11:35am UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/16 "2016-07-11T11:35:27Z")

</div>

Hi Jonathan,

Okay. It seems that something is causing the mavproxy process to end early. That’s why there is no screen available for it. Can you try running the the mavproxy command directly through putty?

```
    ./start_mavproxy_telem_splitter.sh

```

Can you also tell me how you have everything connected? You’re using the USB from the Pi to the Pixhawk, correct?

-Rusty

---

<div class="post-metadata">

**Author:** ![jonathan-santrovitsc](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@jonathan-santrovitsc](https://discuss.bluerobotics.com/u/jonathan-santrovitsc)\
**Post date:** [July 11, 2016, 4:22pm UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/17 "2016-07-11T16:22:06Z")

</div>

Rusty,

Finally I can connect to Pixhawk to QGround. I connect the USB of Raspberry to usb of Pixhawk. My mystake is to try to connect the raspberry over the serial port to telem1 of pixhawk. Just now I don’t have video of the camera. I need just these last help! You have more an rabbit in top hat!!!

You Are The Best!

Jonathan

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [July 11, 2016, 4:38pm UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/18 "2016-07-11T16:38:35Z")

</div>

You can have raspberry pi connected to telem 1 if SERIAL1\_PROTOCOL parameter on pixhawk is set to mavlink, and you specify the port for mavproxy to listen to /dev/ttyAMA0 (rpi2 UART) instead of /dev/ttyACM0 (pixhawk identification when connected via usb).

The change would need to be made here:  
[https://github.com/bluerobotics/companion/blob/master/RPI2/Raspbian/start\_mavproxy\_telem\_splitter.sh#L6](https://github.com/bluerobotics/companion/blob/master/RPI2/Raspbian/start_mavproxy_telem_splitter.sh#L6)

You would also need to make sure that the SERIAL1\_BAUD parameter was set appropriately to match.

Also, to get video working, you need to make sure that the host ip matches the ip address of your laptop or computer communicating with the pi:  
[https://github.com/bluerobotics/companion/blob/master/RPI2/Raspbian/start\_video.sh#L37](https://github.com/bluerobotics/companion/blob/master/RPI2/Raspbian/start_video.sh#L37)

-Jacob

---

<div class="post-metadata">

**Author:** ![jonathan-santrovitsc](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@jonathan-santrovitsc](https://discuss.bluerobotics.com/u/jonathan-santrovitsc)\
**Post date:** [July 13, 2016, 1:58pm UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/19 "2016-07-13T13:58:18Z")

</div>

Jacob,

attached is the setup of my “start\_video.sh” file, also IP config of my PC, udp setup Qground and a a print screen of Putty with the comand “sudo screen -r video”.

The pixhawk connect to the Qground and work perfect. just no video on Qground. I don’t know were is my mystake, because I check my times all steps, follow all of ardusub website.

Jonathan

 ![](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/1X/957fac2451b3c1afba67a5883ada3b8b699b91bd.png)  

![](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/1X/60a843768c6aa41e650b1ca669f74864f370fa75.png)

![](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/1X/44ef361d4988fb91b3ad1838a6519b181fbe5fb6.png)

 ![](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/1X/58247f018ea85e9f8c1932e2262020c4033d157f.png)

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [July 14, 2016, 2:02am UTC](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272/20 "2016-07-14T02:02:38Z")

</div>

In QGC IP needs to match computer QGC is on, and IP that is specified in start\_video.sh. Change to 192.168.2.1.

-Jacob

[Next page](https://discuss.bluerobotics.com/t/ardusub-initial-setup/272.md?page=2)
