How can i enter a WPS (Wifi protected Setup) Pin on a router programatically using Android SDK??
In addition can i get the responses that the router sends?
Thanks
Samsung has added this as a feature to some of their phones, but it is not a default feature of Android. That being said, I doubt that there is going to be a simple way of implementing this. Chances are you are going to have to learn about how the WPS protocol works and implement it yourself from scratch. This will involve broadcasting the correct signals over the WIFI, and performing the secure handshake with the router. I don't know much about how this works, you'll have to look up the WPS protocol.
There is a good chance that your app will require root access as you will need to alter WIFI network entries on the phone, and perhaps even add support for storing this information.
Related
I'm in the design phase of an Android application that will require a connection to multiple wifi networks, and I'm wondering if anyone can provide advice and/or code snippets regarding the best way to go about this. The app will have a connection to one wifi network that has internet access, and another wifi network with no internet access that will be used to share data accross the devices (raspberry pis) on it.
Can I be connected to both networks simultaneously? If so, how do I specify which network to use when making a request? I've been reading the Android 5.0 documentation which indicates its possible, but I'm a little confused on how to implement it.
If its not possible, this post from 2011 says that the WiFi Direct standard could be another solution. WiFi Direct is now supported on Android, but I can't find many examples of how to use it to achieve my goal.
Any advice is much appreciated!
As far as I know, you can have only one connection to the Access point, meaning that you can indeed make the device connected to the access point which offers you the internet connection, but then you can not connect to other networks.
Anyway, I would suppose that in your use case that is not the problem, actually I don't see any problems there. At least, if you simply have the connection and then have the Raspberry Pi's connected to you, i.e. you simply create a access point in your Android device, and all devices connect to it.
I am working on one project in which two android devices which are in different network need to transfer some data. Both device will have internet connection. It will be either Wifi or GSM provider.
Consider the following cases:
If one Android device has GSM network and
another device in some other place which has Wifi network
If one Android device has GSM network and another device has GSM network
How to transfer data in such cases?
I don't want to use server in between.
Please let me know how do I solve this issue. Any clue or any links which will help me. So far I didn't find any such things. Please help me...
Short Answer: You're going to have to use a server.
Long Answer: You could use bluetooth if the location is close enough or maybe Wifi Direct although I haven't personally used the latter. Although, ultimately a server will be the best option. If you don't know a lot about backend development I could recommend parse.com as a good service that makes creating backends very easy and has fairly high usage limits before you have to pay.
Unless a device has been configured with an external IP address, which is very unlikely (impossible?) on a cellular network, there won't be a way to directly contact it from an external device. Even on WiFi, most devices will never have an externally defined address.
If you had administrative control over a directly connected and externally addressed router, you could port-forward traffic to a single device, but that's likely not the solution you're after.
A much easier approach is to use one of the services that let you define a back-end w/o a lot of setup or costs. The most popular one is probably Parse.
is ist possible to make a connection to a "master" (not internet) over a browser using bluetooth? I want to make a service possibility to a device without creating an App (or just a invisible "driver" App if necessary).
Since you've tagged it as bluetooth-lowenergy I'm going to assume you're trying to do something with that... And in that case, I don't think there's any direct way for a browser to access a low-energy device. You'd have to develop some sort of application that would act as a translator between the low-energy interface and something the browser would understand like a web server.
Bluetooth and WiFi are very similar radio technologies (even using the same frequencies), but WiFi can transport TCP/IP/HTTP to support internet browsing, while I'm not aware of Bluetooth (LE or normal) being able to do that.
In Android SDK the Wireless P2P (WiFi Direct) API is provided.
I am developing an application that would require for the app to connect to other devices on the fly that have the same application and share information among them (text data). In order to do so I require that the devices could connect automatically between each other. I was wondering if there is a way to do it if you have root permissions on your device. And another thing is if it is possible to work around by creating some kind of automate response of clicking the OK button on the dialog of the user request.
Best regards.
It can be done with the help of some classloader patching framework, like Xposed or Substrate. See my answer here for detailes.
I try to create an ad-hoc network between many Android devices, but I can't find documentation to do that.
I thought Wifi direct could work for what I want, but is it possible to have multiple connection on one device ? I saw that we could do a device acting like an access point and communicate with many devices, but can we communicate from one client device to two access point devices ?
I have for example 3 devices: A -> B -> C
The "A" device need to communicate with "C" device but he's too far away, so I want to have ad-hoc wifi direct connection between A&B and ad-hoc wifi direct connection between B&C, so A can communicate with C. It should also work with more than 3 devices.
Thanks !
Here is the link to the Wifi Direct Demo http://developer.android.com/resources/samples/WiFiDirectDemo/index.html
I have been working on establishing ad hoc communication over Android phones for a month. I am trying to create an app that could work without having 3G or access point. Main idea is to let the clients to be able transfer voice or data in a close range.
There are some guys implemented a basic system regarding almost the same topic. It basically works with Wi-Fi access point. So you need an access point in order to establish the connection. Although this is not what I am looking for, it might be helpful for others. You might need to contact them for more details.
https://sites.google.com/site/androidwalkietalkie/home
Android does not have support for ad-hoc WiFi at this time -- sorry!
Update (2019): Android has supported WiFi Direct for a while, and this answer has not been updated.
Your scenario would work. A would be able to connect with C as long as B (the group owner) is within range of both A and C.
See Android's developer documentation for more info:
https://developer.android.com/guide/topics/connectivity/wifip2p
At this time only Galaxy S 2 support Wi-Fi Direct
The wifi direct supports concurrent hosting and client capabilities on single interface. Which means, the device will act as an AP, allowing other devices to connect to it as clients, And also connect to another AP as a client. And can share internet connection by driving the internet traffic between the interfaces.
However, current implementations of wifi direct on android are specific to the phone and not part of andorid sdk. So there is not much clarity if they support concurrency. This capability is not limited by hardware.
Ad hoc wifi is disabled in Android. You need to ask Google why they have chosen to do so. If you have access to a device that allow you to install custom Android images, you will be able to patch Android to support it. Or you can root your device and reenable ad hoc Wifi, there are plenty of solutions on the web on how to enable ad hoc on rooted Android devices. This is a software issue, the hardware on every Android device that I know of has support for ad hoc Wifi.
The Serval Project, based in part on WiFi Tether, is the only place I've found this functionality. It's still alpha phase, but seems to be the forerunner in the field. The wiki is much more useful than the main project page linked above, with installation instructions and a bit of documentation.
Serval may or may not be right for your needs, but I felt it should be pointed out that ad-hoc networking is not impossible on Android. It might be better to wait until Google gets around to implementing it as standard API, though (if you believe they ever will :) ).
Well You might be interested in looking at AllJoyn. It is qualcoms SDK for android OS which includes wi-fi peer-to-peer implementations by creating adhoc connections. This is same as Wi-Fi Direct.