Super Noob here: How does a host program (CC) look like to connect to Websocket?


#1

Hello,

I am completely new at this of connecting mobile apps to the companion computer. I am implementing the app in android studio based on the example for mobile apps, I am at a loss trying to image how the host program looks like. Do I just connect the phone to the wifi on companion computer and then the code running in it just receives the data? What happens when they lose connection? can I for example have the drone or system go to the last GPS position sent by the mobile app? finally can they just reconnect when they are in range again?

I know those are a lot of general doubts but I want to make sure I can procced with a simple design. Any help will be appreciated!

Thanks,
Juan


#2

Let me try to respond to few of your queries:

Do I just connect the phone to the wifi on companion computer and then the code running in it just receives the data?
Yes.

What happens when they lose connection?
Unfortunately, we do not have any built-in failsafe for this.

can I for example have the drone or system go to the last GPS position sent by the mobile app?
Yeah sure. You can add an onboard module which detect loss of connection with mobile app, and takes failsafe action.

finally can they just reconnect when they are in range again?
Yes.

Hopefully, I was able to answer most of your concerns. Feel free to get back to me if you have more queries.


#3

Thank you for your fast answer, I have been missing in action in the last couple of days but will come back soon to try things out.