Giter VIP home page Giter VIP logo

wifiwizard's People

Contributors

anulman avatar brugnara avatar checoxshall avatar crapthings avatar hoerresb avatar leecrossley avatar nuk avatar parsonsmatt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wifiwizard's Issues

Maintainership Transfer

I don't have the spare time to continue maintaining this plugin. If anyone wants to take over as the full-time maintainer, let me know and I can work on transferring the important stuff to you.

Wifi scan result issue in ios

Hi,

I need to use wifi scan functionality in ios,

Is there any plugin or work around,

Please help regarding this,

Thanks and Regards,
Murali

Issue

I have an issue : Uncaught ReferenceError: WifiWizard is not defined. I have already installed the plugin.xml file

enable wifi hotspot

Hi, I'm wondering how to enable the wifi hotspot for a user that has my app installed. Can it be done with this plugin?
(I'm new to this)
Thanks

Is it possible to get the BSSID for the current network too?

More documentation about iOS

"Currently, iOS only has limited functionality. Most functionality is only available on Android."

Can you spell out what does work on iOS? Even if it just gets a list of network SSID's that would be useful for our purposes (though signal strength would be even better).

What network types are supported?

The docs mention:

Currently, only WPA is supported for the algorithm value.

What does this mean in practice? Does this mean only networks with WPA authentication can be joined? What about WPA2, WPA-PSK, WPA Enterprise, WEP, or even open networks?

Grab security protocol with .getScanResults

Is it possible for .getScanResults to include the used security protocol in the returned object? It would be nice if it can achieve this. An example returned object would be something similar to this:

{
    BSSID: "...",
    SSID: "...",
    level: ...,
    algorithm: "WPA"
}

isWifiEnabled always returns true

Hello!

I am trying to use your plugin but I encountered some problems. I successfully scanned for networks, but now I can't get to make isWifiEnabled to work. It always returns true, whether the WIFI is enabled or disabled. I am using Android 5.0.0, Cordova 4.2.0 and WifiWizard 0.2.8. Here is my code:

WifiWizard.isWifiEnabled(function(result){
    alert(result);
});

So whether my WIFI is enabled or not, it shows me a big "true" on my screen. setWifiEnabled or getConnectedSSID also don't work. I may be using these methods in a wrong way, so I'd be glad if someone helped me if that's the case.

Still, thank you for your help!

window.WifiWizard is not defined

I am using Cordova version 3.2.0 and I have enabled ACEESS_WIFI_STATE and CHANGE_WIFI_STATE permissions on android. But window.WifiWizard is not defined.

How to connect a new wifi network

I'm trying to connect to a new network and enter the WPA password but without success ... is possible to have a working code for this ?
I believe that the function to use are:

WifiWizard.formatWifiConfig(SSID, password, algorithm);
WifiWizard.formatWPAConfig(SSID, password);
WifiWizard.addNetwork(wifi, win, fail);
WifiWizard.connectNetwork(SSID, win, fail);

but how to use? Thanks a lot!

Callback when scan is complete

Currently one has to call startScan and then poll getScanResults until the scan is complete. It will be simpler if I could call waitForScanResult (not a good function name, but nvm....) and have a callback called when an intent with SCAN_RESULTS_AVAILABLE_ACTION is sent. An example usage 😄 ..

BTW, 👍¹⁰⁰ for this package, it works great 😃

Build failed with current master repo

Since cordova plugin add com.pylonproducts.wifiwizard pulled 0.2.9 instead of the new 0.2.10, I decided to install using the Master .git URL. However this gives me a build error:

platforms/android/src/com/pylonproducts/wifiwizard/WifiWizard.java:275: error: package NetworkInfo does not exist
              NetworkInfo.DetailedState connectionState = info.getDetailedStateOf(info.getSupplicantState());

Building against Android target version 22.

Released properly?

In the README it is written that there is a release of v0.2.9. But I cannot access it.
'cordova plugin add com.pylonproducts.wifiwizard' gets v0.2.8 and hence no latest fixes.

getScanResults: Neither success nor error callback ever fires

I can't get WifiWizard.getScanResults() to fire any of its callbacks. I have a scan running, and once the scan runs, I set an interval to retrieve results every 3s. However this never happens, while I can see that the interval does fire.

I am testing with Cordova 5.1.1 and version 0.2.9 (release branch) of your plug-in, on Android 4.1.1.

My code:

        if(typeof WifiWizard !== 'undefined'){

            WifiWizard.isWifiEnabled(function(wifiIsEnabled){

                if(!wifiIsEnabled){

                    console.log('Wifi is off');

                }else{

                    WifiWizard.listNetworks(function(previouslySelectedNetworks){

                        if(previouslySelectedNetworks.length>0){

                            console.log("A network was previously selected but not connected. Inform user why we're presenting the network list now.");

                            $scope.previouslySelectedNetworkExpired = true;
                        }                                           

                        WifiWizard.startScan(function(){

                            console.log("Scanning for networks...");

                            $scope.scanResultsInterval = setInterval(function(){

                                console.log("Scan interval running.");

                                WifiWizard.getScanResults(function(availableNetworks){

                                    $scope.networks = availableNetworks;

                                    console.log("Updating network list with results." , availableNetworks)

                                }, function(){

                                    console.log("Failed to get scan results.");
                                });

                            }, 3000);

                        },function(){

                            console.log('Failed to start WiFi scan.');
                        });


                    }, function(){

                        console.log('Failed to get a listing of previously selected networks.');
                    });
                }
            },function(){

            });
        }else{

            console.log("No WifiWizard plugin loaded.");
        }

undefined in android

I use phonegap 5.3.7, and i added android, browser to platform. In my config.xml :
engine name="android" spec="~4.1.1"
engine name="browser" spec="~4.0.0"
but my phone is just 4.4.2.
Question:
In browser, I can get WifiWizard in browser (after execute: build browser, run browser), but got "Missing Command Error" in failed callback.
in android: it is undefined (run android, serve).
What is the problem?
The version of android is 4.1.1 at first, and i changed to 5.0.0 when i saw the issuse:
#48.
but still failed.

How to inject the plugin

Hello,
how can I inject the plugin into my application config?
I would like to let the application to set the wifi password if it is installed.
I have this code on application configuration.

´´´

var happyApp = angular.module('happyApp', [
'ionic',
'ngRoute',
'happyControllers',
'pascalprecht.translate',
'ionic.utils',
'api'
]);

happyApp.config(function($stateProvider, $urlRouterProvider, $translateProvider){

if(window.localStorage['country_value']!=null && window.localStorage['store_number']!=null){
    $urlRouterProvider.otherwise('/');
}else{
    $urlRouterProvider.otherwise('/setup');
}

console.log("test"+WifiWizard.formatWPAConfig('DKT_3','Cp-Spain'));

$stateProvider.state('index', {
    url: '/',
    templateUrl: './views/faceIndex.html',
    controller: 'faceIndexCtrl'
});
$stateProvider.state('setup', {
    url: '/setup',
    templateUrl: './views/setup.html',
    controller: 'setupCtrl'
});
$stateProvider.state('logout', {
    url: '/logout',
    templateUrl: './views/logout.html',
    controller: 'logoutCtrl'
});
$translateProvider
    .useStaticFilesLoader({
        prefix: 'translations/',
        suffix: '.json'
    })
    .registerAvailableLanguageKeys(['en', 'es', 'de', 'fr', 'it'], {
    'en-US': 'en',
    'es-ES': 'es',
    'de-DE': 'de',
    'fr-FR': 'fr',
    'it-IT': 'it',
});
$translateProvider.preferredLanguage(window.localStorage['country_value']);
$translateProvider.fallbackLanguage(window.localStorage['country_value']);

});

´´´

But when I start the application the console give me undefined error in image

image

Error: [$injector:unpr] Unknown provider: WifiWizard

Can you help me please?

getScanResults old level always returns 0

Hello again! With your update on the level value for the getScanResults method, it seems that the old level value always returns "0". Here is my code:

WifiWizard.getScanResults({numLevels:1}, function(result){
    alert(result);
    showScanned(parseScan(result));
});

The alert() show me this:

[{"level":0,"SSID":"fenelonsio","BSSID":"58:8d:09:e2:ad:ad"},{"level":0,"SSID":"OKLM","BSSID":"a2:80:f5:41:3f:0d"}]

Is it a bug in the plugin or did I do something wrong? Thanks!

getCurrentSSID and getCurrentBSSID wrong in android

WifiWizard Version 0.2.10

getCurrentSSID(function(successParam)(), function(errorParam));

In android platform: there are a double quotes more in successParam. I think it may be a bug.
ed51be35-6d20-4911-bda3-0c790a5b1c99

In IOS platform: It works fine.
ade4effc-0970-451a-98f5-e0e86b288b87

and "getCurrentBSSID(function(successParam)(), function(errorParam)); " failed in android. but works fine in ios.

isWifiEnabled doesnt properly reflect the state of the wifi

isWifiEnabled is only set after the status of the wifi is retrieved, if I use addnetwork without first checking the active wifi connection it will incorrectly give me the information that wifi is not enabled

EDIT: never mind I found the fix. apparently I was using an older version of the plugin

update npm

Hey @parsonsmatt, I've been working on a few updates for the WifiWizard repo. Mostly small bugs that have been pointed out or are outstanding. It seems that cordova is moving the plugins to npm seen via http://cordova.apache.org/announcements/2015/04/21/plugins-release-and-move-to-npm.html.

It seems we have already taken care of this, but I was wondering if I could be added as a user. When I tried to update using npm publish ../pathToWifiWizard I was told I do not have permission to do so.

Username is hoerresb

There's no rush on this. Thanks.

Are all features supported in ios?

Hi

My first project in mobile development, please forgive my ignorance for mobile development.

So far I have been using this plugin to connect a wifi device via an andriod phone.

I saw this below comment for the read me:
"iOS has limited functionality, as Apple's WifiManager equivalent is only available as a private API. Any app that used these features would not be allowed on the app store. The only function availabe for iOS is getCurrentSSID."

Does this mean at this stage I can't connect a wifi access point on ios using this plugin?
Are there any future plans to make this available?

Regards,
Savan

Unable to fetch wifiwizard plugin

Hi Matt,

it seems that wifiwizard 0.2.8 cannot be teched at the moment :

cordova plugin add com.pylonproducts.wifiwizard
Fetching plugin "com.pylonproducts.wifiwizard" via plugin registry
npm ERR! fetch failed http://cordova.iriscouch.com/registry/_design/app/_rewrite/com.pylonproducts.wifiwizard/-/com.pylonproducts.wifiwizard-0.2.8.tgz
npm ERR! fetch failed http://cordova.iriscouch.com/registry/_design/app/_rewrite/com.pylonproducts.wifiwizard/-/com.pylonproducts.wifiwizard-0.2.8.tgz
npm ERR! fetch failed http://cordova.iriscouch.com/registry/_design/app/_rewrite/com.pylonproducts.wifiwizard/-/com.pylonproducts.wifiwizard-0.2.8.tgz
Error: getaddrinfo ENOTFOUND
at errnoException (dns.js:37:11)
at Object.onanswer as oncomplete

Does this plugin work with android 5.0?

i've installed this plugin and try to use this method

WifiWizard.getCurrentSSID(function(success){
     alert(success);
}, function(error){
    alert(error);
});

But nothing happened.

Migrate to `WifiWizard` GitHub organization

I'd like to migrate all of the WifiWizard related repositories off of my account, since I'm not doing anything with them anymore and can't provide adequate maintenance. It's probably best to have them on a github organization rather than an individual account.

If someone would like to create the organization, I can assign the repositories to that organization. I can also create the organization and do the assignments myself, and then assign the organization ownership to the current maintainer if that's preferred.

getCurrentBSSID() returns incorrect macaddress

Hi,

The getBSSID() function returns incorrect bssids for some macaddresses.

Here's an example: the bssid of my network is:
Cirrent-personal a8:a6:68:d9:71:0b -31 11 Y -- WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP)
But when i connect to it and call getCurrentBSSID() i get back a8:a6:68:d9:71:b

Notice the last bit - the actual bssid has a 0b, and this just has b. When i convert the hex to decimal the values are quite different. Do you think this is a quick fix?

Thanks a lot!

Small correction in the Documentation

Set wifi status. enabled is a Boolean type, so to disable the Wifi, you'd execute
WifiWizard.setWifiEnabled(false**,win,fail**);

Would save some Headache.

THX.

isWifiEnabled and setWifiEnabled do not work for iOS

Hi,

Both isWifiEnabled and setWifiEnabled are not working for iOS. I also saw that in iOS native code the isWifiEnabled function implementation is empty and setWifiEnabled implementation always return "not supported".

Are you planning to implement both these functionalities for iOS?

Thanks in advance

Error calling addNetwork

I call formatWifiConfig to create the configuration, then addNetwork. I get:

Uncaught TypeError: Object # has no method 'trim' in WifiWizard.js on line 76.

Is this a known problem?

WifiWizard.connectNetwork always fires success

When I call WifiWizard.connectNetwork(), it fires the success callback even if I add a random network that's not mine, with a random passphrase. Running 0.2.11 on Android 4.1.1. My code:

if(typeof window.WifiWizard !== "undefined") {

    WifiWizard.addNetwork(WifiWizard.formatWPAConfig(networkName, passPhrase), function(){

        console.log("Added network '"+networkName+"' to the list of known networks.");

        WifiWizard.connectNetwork(networkName, function(){

            console.log("Connected to network '"+networkName+"'."); // Always logged

        },function(err){

            console.log("Failed to join network '"+networkName+"'.",err);

            deferred.reject('notConnected');

        });

    }, function(err){

        console.log("Failed to add network '"+networkName+"'.",err);

        deferred.reject('errorAddingNetwork');

    });

}else{
    deferred.reject('Wifi Wizard plugin not available.');
}

Testing and Contributing Guidelines

Multi-part issue:

  • Update the WifiWizardDemo app to current WW version
  • Add automated tests in addition to manual buttons.
  • Write contributing guidelines requesting a PR for the test/demo app along with the plugin.

Testing Cordova plugins is sufficiently difficult that automating the process somewhat needs to be done.

I would prefer to have this complete before any additional changes are made to the plugin.

Does this plugin support iOS devices?

Does this plugin fully support iphone devices?
I have installed and tested in iphone 5 its not working. Unable to get network list while device scanning.
Please advice if there is any solution. Thanks in advance.

List Not Refreshing & Not Updating

Hey!

I like the plugin but the problem is that when i try to refresh the list. it refreshes like 1 time and stays the same the whole day. it doenst changes even when i change locations. like it caches the list.

Also the list is very incomplete. There are like 8 networks around me but it only shows 2 sometimes 4 and then 1

Wrong URL on NPM?

https://www.npmjs.com/package/com.pylonproducts.wifiwizard returns 404. This is preventing me from installing the latest version of wifiwizard and anything I try, I can only ever build my project with 0.1. AS you know, this does not include the full range of features.

Can you post your plugin to the address above so that Phonegap Build can access the latest version?

WifiWizard.connectNetwork calls win callback even if wifi network is unavailable

First thanks for a great plugin!
Here is my code:

var onSuccessConnectToNetwork = function (result) {
    console.log(result);
};
var onFailConnectToNetwork = function (result) {
    console.log(result);
};
WifiWizard.connectNetwork('mySSID', onSuccessConnectToNetwork, onFailConnectToNetwork);

If I disable my wireless access point, provide wrong credentials, it still says Network "mySSID" connected!.
onFailConnectToNetwork gets called only if I disable wireless connection on my phone.
Is it possible to get actual connection result?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.