0

I am using Android studio 2 and java, and i am writing an app that i need to be connected with a piece of hardware through wifi (parrot ar drone 2) and also "trigger" some events (takeoff land etc) through 3g network. I have made a simple app using parrot sdk that do some simple things to my drone successfully . I am facing now the challenge that these simple things i want to be driven through my server (i am thinking of websockets). So my problem is : If my device is connected through wifi to the drone, how could i also connect to the internet in order to get "triggered" to run some commands?

I was thinking that would be great if o could connect my android device to the drone and with some way be connected to internet. After some research i have found that may be this functionality be available to android 6 BUT i have not found any example yet. Generally i trying to find a solution (software or hardware).

I appreciate a lot any kind of help or suggestion about my problem.

Thx in advance

kostas ch.
  • 1,960
  • 1
  • 17
  • 30

2 Answers2

0

I don't think it is possible to connect to 2 W-Lan hotspots simultaneously with just one chip. Where did you find that information?

Overholt
  • 867
  • 1
  • 10
  • 23
  • I will try to find the link from browser history and add it to the post. – kostas ch. Jun 19 '16 at 14:04
  • http://forums.androidcentral.com/samsung-galaxy-note-4/510443-both-4g-wifi-running-same-time.html or http://android.stackexchange.com/questions/29769/how-do-i-connect-to-a-wifi-ap-and-3g-network-simultaneously – kostas ch. Jun 19 '16 at 14:14
0

You can set up your Android device as a WiFi hotspot and have your drone connect to the internet via that.

At the same time your app can connect to the drone, assuming your drone has some sort of local server like connection your app connects to.

You can check this in practice quickly by setting up a Wifi hotspot, connecting your drone and then using a ping utility on the phone to make sure you can ping the drone successfully.

If you want to connect from a remote server to the drone then you are dependent on your network allowing inbound connections, which is often not the case. A common workaround is to use some form of mobile push notifications to send a message to your app asking it to contact a server on the internet, which will then tell it what action you want to perform on the drone. In others words:

  • send message to server on the internet somewhere to tell drone to take off
  • your server triggers a push notification to the app on the phone
  • the app contacts the server and asks 'what is the message for me'
  • the server responds to the app with the 'tell drone to take off' message
  • the app messages the drone to tell it to take off
Mick
  • 24,231
  • 1
  • 54
  • 120