# Sony RXO over USB

Source: https://forum.modalai.com/topic/139/sony-rxo-over-usb
Category: ESCs, Sensors and Accessories (https://forum.modalai.com/category/15/escs-sensors-and-accessories)
Tags: microhard
Posted: 2021-02-23 00:47:01 UTC by Matt Goddard
Replies: 36 · Views: 11129

## Matt Goddard · 2021-02-23 00:47:01 UTC

Trying to stream Sony RXO to QGC over micro USB, Microhard sees it but no stream?

## Reply by modaltb (ModalAI staff) · 2021-02-23 16:56:45 UTC

Hi @Matt-Goddard ,

I hadn't seen that camera before, pretty slick!  I'm looking at [this](https://www.sony.com/electronics/cyber-shot-compact-cameras/dsc-rx0-dsc-rx0g/specifications) for reference.

I'm not positive if is supports a UVC interface (e.g. webcam)?  If so we can stream off that to QGC.  For example, [here](https://docs.modalai.com/uvc-streaming/)

It doesn't show mini-HDMI connector.  We have an HDMI input adapter that could be used possibly and then we can stream video off.  For example, [here](https://docs.modalai.com/hdmi-input-accessory-manual/)

## Reply by Matt Goddard · 2021-02-23 17:30:05 UTC (in reply to modaltb)

@modaltb Thanks for the response! So we can get it to trigger, and we have got it to work with Sonys webcam software separately!. It says it is streaming, but we can not receive video like it's sending empty data. Libg Photo 2 is reading the camera and recognizes it, but can't pull the video up in QGC or any other video source. It's just one of those things we have been spending a ton of time on scratching our heads, knowing there is something small we are missing haha! First time using VOXL and Modem..which I must say is absolutely amazing, we want to switch our fleet over to this system. 
![snap.jpg](https://forum.modalai.com/assets/uploads/files/1614101397540-snap.jpg)

## Reply by tom (ModalAI staff) · 2021-02-23 17:35:38 UTC (in reply to Matt Goddard)

Hi @Matt-Goddard, I understand that you are using QGC, are you able to get telemetry through to QGC? If so, are you doing that over WiFi or Microhard? 

It looks like you are successfully getting frames off of the camera, so I'm wondering if there is a networking issue.

## Reply by Matt Goddard · 2021-02-23 17:40:04 UTC

Yes, Tom we are getting full telem using the Microhard through QGC, also have used WiFi.  Yes, that was odd to me as well?

## Reply by tom (ModalAI staff) · 2021-02-23 17:45:31 UTC (in reply to Matt Goddard)

@Matt-Goddard Okay, so I assume you are using `voxl-vision-px4` to talk with QGC then. You will want to point `voxl-libgphoto2` to the IP address of your ground station on the Microhard network, which would be the same IP address that you are sending `voxl-vision-px4` to.

Right now it seems as though your `voxl-libgphoto2` is attempting to send video to QGC over WiFi, when in reality you are connected to QGC over Microhard.

So, instead of using `voxl-libgphoto2 192.168.1.215`, you will want to use the same IP address as you are for `voxl-vision-px4`, which you can find using `ifconfig` on your ground station or should be in `voxl-vision-px4`'s config file: `/etc/modalai/voxl-vision-px4.conf`. All Microhard IPs will be in the form `192.168.168.X`

## Reply by Matt Goddard · 2021-02-23 18:00:54 UTC

@tom This is something we have done already

![Screenshot 2021-02-23 125156.png](https://forum.modalai.com/assets/uploads/files/1614103220161-screenshot-2021-02-23-125156.png) 

![Screenshot 2021-02-23 125221.png](https://forum.modalai.com/assets/uploads/files/1614103228729-screenshot-2021-02-23-125221-resized.png) 

![image.png](https://forum.modalai.com/assets/uploads/files/1614103234066-image.png)

## Reply by tom (ModalAI staff) · 2021-02-23 18:31:32 UTC

Are you able to open the video stream with a different program like VLC or ffplay?

## Reply by Matt Goddard · 2021-02-23 18:32:46 UTC

We have tried VLC with both Linux and Windows, appears to load it with no video stream.

## Reply by Matt Goddard · 2021-02-23 18:37:19 UTC

@tom is the VOXL streamer apk required in order to use the gphoto2 to stream video?

## Reply by tom (ModalAI staff) · 2021-02-23 18:49:28 UTC (in reply to Matt Goddard)

@Matt-Goddard We have two different implementations for gphoto2 on VOXL. `voxl-libgphoto2` which is what you are using and we also have `voxl-gphoto2` which is a newer version that also uses `voxl-streamer`. I think I will have you try `voxl-gphoto2` now.

[Here](https://gitlab.com/voxl-public/modal-pipe-architecture/voxl-gphoto2) is the link to the build/install instructions for the newer gphoto2 implementation.

[Here](https://docs.modalai.com/voxl-gphoto2/) is a link to the documentation

You will need to use this in combination with [voxl-streamer](https://gitlab.com/voxl-public/utilities/voxl-streamer) and [here is some documentation](https://docs.modalai.com/voxl-streamer/) for getting that going.

## Reply by Matt Goddard · 2021-02-23 18:51:34 UTC

I will try this now and get back to you. Thanks!

## Reply by Matt Goddard · 2021-02-23 20:11:59 UTC

During the process, we managed to brick the board. Will not boot now..

## Reply by tom (ModalAI staff) · 2021-02-23 20:38:03 UTC (in reply to Matt Goddard)

@Matt-Goddard We have some documentation on unbricking [here](https://docs.modalai.com/unbrick-voxl/)

## Reply by Matt Goddard · 2021-02-23 20:55:07 UTC

Got it, we will order the part and unbrick lol. Thanks for the help!

## Reply by Aaron Bottke · 2021-03-03 21:26:38 UTC

The USB and Serial Debug board arrived today. I unbricked the board and installed gphoto2 and VOXL-streamer. The image below is an error I received after running the voxl-gphoto2 command.

![beac53fa-5f2c-47f7-a96a-faa02c4f1eb1-image.png](https://forum.modalai.com/assets/uploads/files/1614806736299-beac53fa-5f2c-47f7-a96a-faa02c4f1eb1-image.png) 

Please advise.

## Reply by Chad Sweet (ModalAI staff) · 2021-03-03 21:30:47 UTC

Have you tried gphoto2 using a Linux machine to make sure this device is supported?

## Reply by Chad Sweet (ModalAI staff) · 2021-03-03 21:33:24 UTC

@Matt-Goddard said in [Sony RXO over USB](/post/589):
> Sony RXO

The RX0 II is on the list, is that what you're using?
http://www.gphoto.org/proj/libgphoto2/support.php

## Reply by Aaron Bottke · 2021-03-03 21:42:40 UTC

Yes we are attempting to use the RX0. The image below shows that gphoto2 does detect it on an ubuntu machine.
![7ef3b019-c955-42e4-978b-d16825a4834b-image.png](https://forum.modalai.com/assets/uploads/files/1614807754754-7ef3b019-c955-42e4-978b-d16825a4834b-image.png)

## Reply by Eric Katzfey (ModalAI staff) · 2021-03-03 22:09:59 UTC (in reply to Aaron Bottke)

@Aaron-Bottke What happens when you run ```
gphoto2 --capture-preview```? Do you get an image?

## Reply by Eric Katzfey (ModalAI staff) · 2021-03-03 22:14:47 UTC (in reply to Aaron Bottke)

@Aaron-Bottke Also, can you try running voxl-gphoto2 with debugging information enabled and send us the ouput? For example: ```voxl-gphoto2 -d -v -g```

## Reply by Aaron Bottke · 2021-03-03 22:48:14 UTC

Results of gphoto2 --capture-preview on my host machine as follows.

![aa6c2695-dab0-411b-870f-8eba4001e34d-image.png](https://forum.modalai.com/assets/uploads/files/1614810105434-aa6c2695-dab0-411b-870f-8eba4001e34d-image.png)

On the VOXL running voxl-gphoto2 -d -v -g yields way to much for me to share here so I will split it up.

voxl-gphoto2 -d below.
![221be522-7609-4e93-80b9-fd50f17fd18f-image.png](https://forum.modalai.com/assets/uploads/files/1614810477129-221be522-7609-4e93-80b9-fd50f17fd18f-image.png) 

voxl-gphoto2 -v yields a lot of messages very quickly.
Output as follows.

![35a2b60a-25fc-4cbe-b9e2-b571115e8499-image.png](https://forum.modalai.com/assets/uploads/files/1614810604918-35a2b60a-25fc-4cbe-b9e2-b571115e8499-image.png)

voxl-gphoto2 -v yields too many messages for me to upload with a screenshot.
I don't see a way to submit a .txt file  but the most interesting part of the output that I see is this.

![3fafc1d2-4573-43b3-9b1e-88b9e43287c5-image.png](https://forum.modalai.com/assets/uploads/files/1614811687393-3fafc1d2-4573-43b3-9b1e-88b9e43287c5-image.png)

## Reply by Eric Katzfey (ModalAI staff) · 2021-03-04 01:23:28 UTC (in reply to Aaron Bottke)

@Aaron-Bottke Okay, thanks! That's very helpful information. It looks like the camera is producing images and voxl-gphoto2 is processing them correctly. So try voxl-streamer and see if you can stream the video. That error message seems to be coming from the gphoto2 library but doesn't seem to be hurting anything.

## Reply by Aaron Bottke · 2021-03-04 14:49:22 UTC

Unless I am missing something in the command this is the result from running voxl-streamer and voxl-gphoto2.
![2dd15cf3-2883-4a6b-a366-11b05879e1ff-image.png](https://forum.modalai.com/assets/uploads/files/1614869328749-2dd15cf3-2883-4a6b-a366-11b05879e1ff-image.png)

Thanks for all the help.

## Reply by Eric Katzfey (ModalAI staff) · 2021-03-04 17:24:15 UTC (in reply to Aaron Bottke)

@Aaron-Bottke Documentation on voxl-streamer is here: https://docs.modalai.com/voxl-streamer/

For gphoto2 you will want to look at the ```gphoto2-mpa``` configuration in ```/etc/modalai/voxl-streamer.conf```. You can use this configuration record by launching with ```voxl-streamer -c gphoto2-mpa```

## Reply by Aaron Bottke · 2021-03-08 14:54:34 UTC

That got it working!!! I really appreciate the help with this!!!
My telemetry quit working though so I have to play with that and get that up and running again.
Thanks!

## Reply by Aaron Bottke · 2021-03-08 19:37:58 UTC

@Eric-Katzfey 

The gphoto-2 seams to be breaking the voxl-vision-px4 system. Any command associated with the voxl-vision-px4 system causes the voxl to kick any adb connection then prevent any from connecting until a power cycle. I can't get both voxl-vision-px4 and gphoto2 installed and running on the same system.

Any thoughts?
Thanks,

## Reply by Eric Katzfey (ModalAI staff) · 2021-03-08 20:00:52 UTC (in reply to Aaron Bottke)

@Aaron-Bottke I'll take a look

## Reply by Eric Katzfey (ModalAI staff) · 2021-03-08 21:35:56 UTC (in reply to Aaron Bottke)

@Aaron-Bottke I did a fresh install of system image 3.2.0 without installing any additional packages (voxl-suite). After setting up WiFi to connect to the Internet I ran these steps on voxl (over adb):

* opkg update
* opkg install voxl-vision-px4
* voxl-configure-vision-px4 (Specifying no cameras)
* Verify QGC connection with telemetry
* opkg install voxl-gphoto2
* opkg install voxl-streamer
* voxl-gphoto2
* voxl-streamer -c gphoto2-mpa

I then see both telemetry and video in QGC.

## Reply by Aaron Bottke · 2021-03-08 22:55:03 UTC (in reply to Eric Katzfey)

@Eric-Katzfey
Not installing the voxl-suite at first and using opkg to install gphoto2 and voxl-streamer worked.
Before I was following the instructions and compiling my own ipk then loading them on using adb. I've got both a video stream and telemetry over the Microhard Modem!
Thanks,

## Reply by Aaron Bottke · 2021-03-08 22:57:13 UTC

Will at any point gphoto2's trigger features be ported over to the voxl-gphoto2? I want to be able to trigger a photo/video to be captured and stored on the RX0's SD in-order to achieve max resolution.

## Reply by Eric Katzfey (ModalAI staff) · 2021-03-08 23:25:28 UTC (in reply to Aaron Bottke)

@Aaron-Bottke Possibly. How did you want to trigger it?

## Reply by Aaron Bottke · 2021-03-09 15:08:30 UTC

@Eric-Katzfey 

Ultimately if I can use px4s trigger function to tell gphoto2 to trigger an image that would be idea. I should be able to use mavlink to tell when that command is given and then issue gphoto2 to issue the command. This will allow me to do high quality mapping missions with the system.

## Reply by Eric Katzfey (ModalAI staff) · 2021-03-09 17:28:28 UTC (in reply to Aaron Bottke)

@Aaron-Bottke Yes, that's seems like it would be a nice addition to voxl-gphoto2. We'll put it on our to-do list.

## Reply by restore · 2024-04-18 19:27:10 UTC (in reply to Eric Katzfey)

@Eric-Katzfey Was this ever done? I would like to do a similar thing and trigger an attached DSLR cameras using QGroundControl and gphoto2

## Reply by Eric Katzfey (ModalAI staff) · 2024-04-19 14:36:28 UTC (in reply to restore)

@restore No, unfortunately it has not.

## Reply by restore · 2024-04-19 16:34:46 UTC (in reply to Eric Katzfey)

@Eric-Katzfey okay - too bad. Is it still on the to-do list or no longer in the plans?
