connect to Wifi device and Internet at the same time - android

I use smartphone directly connect to AR.Drone (a Wi-Fi quadricopter) use adhoc mode.
The AR.Drone can sent me images captured form the build-in camera.
I want to sync those image to the Internet immediately when AR.Drone sent me the images,
but my Wifi already connect to the AR.Drone.
Is there anyway(maybe use computer) to connect to the AR.Drone and upload images at same time?

One possibility might be to use your phone's tethering/hotspot mode, if it has one. Then you can use a wpa_supplicant program that's been cross-compiled for ARM and run it on the drone to connect to that wifi network.
https://github.com/daraosn/ardrone-wpa2 is a very easy-to-use project that will let your drone connect to an existing wifi network instead of creating its own. You clone it from github, turn on the drone, connect your laptop to the drone's wifi network and run script/install. Then turn on the phone's hotspot, and from your laptop run script/connect "<essid>" -p "<password>" -a <address> -d <droneip> to tell the drone to connect to that network.
Hopefully at that point the phone will have internet connectivity at the same time that it's connected to the drone over wifi.

Related

Android Things - How do I connect to my Raspberry Pi when I don't know the IP address

I have successfully managed to install the Android Things Dev Preview onto my Raspberry Pi.
I have a problem though. When I first started installing my own applications I was able to connect to the Raspberry Pi through Ethernet, because it displayed the IP address on the TV when I booted up the Raspberry Pi.
Now because I have the Raspberry Pi already running an application, when I boot it up, it is automatically booting into my application without showing the initial screen with the IP address (and I forgot my IP address 🤔).
Is there an easy way to get the IP address of the Raspberry Pi, or connect to it when I don't know the IP address? Even a command to get a list of all available ADB devices on the network would help.
It would be great if when connected to a certain Wi-Fi, you could run something like:
adb network devices
Which could give a list of ADB devices on the network you are on.
The Raspberry PI Automatically broadcasts Android.local and should resolve to the IP address assigned to your Pi on port 5555.
Running the following:
adb connect Android.local
The command above is effectively the same as running:
adb connect <ip-address>:5555
Note: This will only work if your host platform supports multicast DNS service discovery.
This information was found in the documentation here by step 7 https://developer.android.com/things/hardware/raspberrypi.html
You can scan your network for points with ports 5555/5554 open, for example,
nmap -p 5555,5554 192.168.0.2-100
will scan in range 2-100 for any IP addresses with those ports open.
Or you can check in your router which devices are connected
On OS X you can scan for all devices that publish itself as Android.local
dns-sd -Q Android.local
I believe you need Bonjour on Windows/Linux to get something similar, but I'm still not familiar with them.
After figuring out the correct IP for the desired device you can connect as usual:
adb connect <ip-address>:5555
If multicast DNS is not supported on host platform and you have access to your router, you can simply log into it and view the list of connected devices.
You will be able to view all the devices no matter if mDNS is available or if there are any ports opened on the device (or if you don't know which port is opened).
The easiest way how to get to the initial screen with IP address from your application is to connect a USB keyboard to your Raspberry Pi then pressing escape key once :)
I had the very same problem recently and the easiest way in my opinion is that to just install a simple app on your phone (in my case Fing) that shows all the connected devices to your local connection including th RPI with their ip address. So then you are good to go!

Can't use adb when connected to VPN

My PC and Android TV device are in the same net section,so I can use adb connect the debugging device.Also ,I use adb devices command,it shows device on work.But when My PC and device use the same vpn based on the previous internet,I try to ping the device IP,it worked,then I use adb connect the device,it shows connect,but when input adb devices command , it shows device offline. I'm sure the error can't be caused by adb version,for it can work when disconnect the vpn.who can help me? I'm very appreciate for that.
If your PC and device are on the same LOCAL network, all you need to do is find the local IP address of the device (something like: 192.168.xx.xx). Then type:
adb disconnect
adb connect 192.168.xx.xx.
It'll connect again. Works for me.
The only time it does not work is when the device is the one providing the LOCAL network, e.g., your phone's mobile Hotspot. Using a VPN like this does not work directly. Whenever you use a VPN and try using ADB for a mobile hotspot (and the hotspot device is the one you're trying to connect to), you'll realize that the device goes offline.
This is because when you enter "adb connect <REMOTE_HOST>", your PC tries to route your device IP (REMOTE_HOST) via the VPN network, which will not be accessible since your ISP does not allow inbound connections to your device.
An alternative option, which I use for my device (Phone), is to use a wired connection to my PC via a USB cable. It might work for the Android TV if the proximity b/w TV and your laptop is not a problem.
Another alternative (supposing you're trying to connect a phone/Android TV) is to use another phone or router to create a hotspot. Then connect both your PC and phone/Android TV to the hotspot. Find the phone/Android TV IP address 192.168.xx.xx and enter:
adb connect 192.168.xx.xx.

ADB over bluetooth?

Is it possible to connect to ADB over bluetooth?
I am trying to test 3G data download, but want to have ability to connect to ADB without using USB. Using WiFi (local only) and 3G, as understand, will not work because Android will still use WiFi for downloads (even that WiFi is local only, no outside exit).
How can I set up connection to ADB over bluetooth to send ADB commands for Android device to execute?
I have seen people post that they have been able to do it just like with WiFi using Bluetooth tethering. You'll need to find your IP address.

Sharing Files Between Windows and Android over WiFi

Is there a way ( protocol ?) to share & exchange files between pc with Windows os and a mobile phone with Android os over WiFi ?
For an Ad Hoc Android to PC connection (Per the source below):
Connect your computer with virtual hotspot created by Android device.
Install any FTP Server app on Android device. It'll NOT give you IP of device for sure.
In your computer, find IP of Default Gateway of Wi-Fi network of Step 1 (In Windows, you can use ipconfig cmd command). Its the IP of your device.
Use any FTP Client software on computer. Use ftp://IP:Port (Port is generally configurable in FTP server app). Enter username & password configured in FTP Server app. Done!
Then they said "After some testing with different settings I got it to work flawlessly, thank you very much. For anyone else looking to do this: I used Android Wifi Tether to start the network using Softap mode, connected to it with the computer, started an FTP server (some server apps might need you to enable 3G mode, even though 3G data isn't actually used, you can turn data connections off if you're paranoid."
Source
For Internet Based Connections:
You may simply want to transfer the files to a hosted server with push notifications to "pull" down the files to the various devices.
Scope this out: http://www.eckstreme.net/
The coder of that app may be willing to help you get off to a better start, email him.
Here are the steps:
Connect your pc and android device to the same Wifi Network. This can be an ad-hoc network created on the android device or your home/work wifi network.
To create an ad-hoc network on your device go to Settings->More (under wireless networks)->Tethering & portable hotspot and tick the portable wifi hostspot option.
Install a FTP server app like https://play.google.com/store/apps/details?id=com.medhaapps.wififtpserver from android marketplace.
Start the app on the device and connect to the URL provided by the app from PC.
Transfer files to/from device from/to PC

Can phone use host network when debugging on device via Eclipse/ADB?

I have a Android phone connected with host computer with USB cable. ADB runs well and I can debug application on phone. The only problem is that the App requires special network setup which I can reach on host but not mobile. Is there a way to let the device send all network operations through ADB and Host network?
What you're looking for is known as reverse tethering. See https://android.stackexchange.com/questions/2298/how-to-set-up-reverse-tethering-over-usb for a solution.
Have you tried sharing your internet connection on your laptop, and connect your phone through it?. Make sure you disable data connection on your phone to assure you are connected through WiFi

Categories

Resources