Git Product home page Git Product logo

node-wireless's Issues

Setting Object Merge Issues

The settings object isn't merging as expecting; if one of the commands is missing from the passed in object, the one in the existing object doesn't survive the merge.

Unstupidify event emmitter

It's not common Node practice for event emitter calls to have error arguments. They instead emit error events.

FIXIT

Nomenclature

Come up with a common naming convention and stick with it. Connect or Join? Disconnect or Leave?

Network list iterable

Make it so that _.each() works with the list of networks. I think we'll need a normal array instead of an object where the keys are the mac addresses.

TypeError: Cannot read property 'ssid' of undefined

../node-wireless/app.js:97
console.log(("[JOIN]"+network.ssid+"["+network.address+"]")

I get the following error running on a Raspberry Pi, running node V0.10.16.

Before that error I get the following output:

[PROGRESS] Enabling wireless card...
[PROGRESS] Wireless card enabled.
[PROGRESS] Starting wireless scan...
[ COMMAND] sudo iwlist wlan0 scan
[ COMMAND] sudo iwconfig wlan0
[PROGRESS] Wireless scanning has commenced.

If I manually run the commands I get valid results. I am using an RTL8188CUS WLAN Adapter.

underscore

Add underscore as a dependency in the package.json

License

Thomas--this is a great package. Do you have a license you can add to it (e.g. MIT, etc)?

Network Encryption Type

Determine if an encrypted network is either a WPA or a WEP encrypted network. Currently we only know if it is encrypted or not.

The reason we need to know what kind of encryption it is is due to the different types of commands required to connect to the two networks.

# Connect to a WEP network
iwconfig INTERFACE essid "ESSID" key s:KEY

# Connect to a WPA network
wpa_passphrase myrouter mypassphrase > wpa.conf
wpa_supplicant -Dwext -iINTERFACE -cwpa.conf

Test OS X

We'll eventually switch over to D-Bus, though I'm not sure it'll work with OS X.

Might have to keep the old method of executing binaries and parsing output, but instead of relying on wpa_supplicant, instead rely on the following:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport 

Enable and Disable DHCP

Enable dhcpcd on the interface, which will get us an IP address. This is an event which the app would probably execute once a connection to a network is made.

Trigger Disconnect Event

Trigger an event when we disconnect from a network. Possibly send the details of the network we just disconnected from as well.

Tweak Change Event Triggers

Need to fine-tune the requirements which trigger a network change event. Should it just be certain things that trigger it? Should a major change in signal strength cause a change event? Or, should there be a different event for signal strength changes?

Problems connecting to wifi

Hi,

I have just started using your module in my hobby project, and after running your sample code I notice strange behavior on my system. If I try to connect to a network with ssid XYZ, I don't get any errors and the wifi doesn't connect to that network. ir. the callback doesn't get executed.

Now after that if I manually try to connect to the same network using ubuntu's menu I cannot connect until I restart my laptop.

I tried

sudo service network-manager restart

sudo service networking restart

but that doesn't solve the problem.

I tried this code on MAC OS and I still had the same problem. is it a known issue?

Ubuntu: 16 04 LTS / 14 04 LTS
MacOSX El Capitan 10.11.6

Thanks and Regards
Nikhil

Uncaught errors when killing child process

Hitting Ctrl+C can sometimes cause uncaught errors to be throw. We should instead catch and emit.

[   FATAL] Got some major errors from our scan command:Error: Command failed:    

/home/tlhunter/Projects/node-wireless-test/node_modules/wireless/index.js:337    
            throw err;                                                           
                  ^                                                              
Error: Command failed:                                                           
    at ChildProcess.exithandler (child_process.js:647:15)                        
    at ChildProcess.emit (events.js:98:17)                                       
    at maybeClose (child_process.js:755:16)                                      
    at Socket.<anonymous> (child_process.js:968:11)                              
    at Socket.emit (events.js:95:17)                                             
    at Pipe.close (net.js:465:12)                                                

Fix callbacks

Some callbacks (e.g. joining networks) have a success and failure callback, like this was jQuery or something.

Other times we don't pass error arguments to callbacks. Or sometimes we exit the process instead of failing a callback.

Fix dat shit, yo!

Trigger Connect Event

Need to trigger an event when we connect to a network. Should just be able to run iwconfig.

Also, should we trigger multiple events for different stages of connection?

Make the repo no longer stupid

This was my first node module IIRC. It's laid out stupidly.

The root of the github project should be the module, no dependencies should be committed, a simple sample app should exist in a sub directory and be documented in the readme.

Network Disappear Event

Fire an event when a network disappears.

This isn't as easy as it sounds; we need to have a threshold. E.g., does a network disappear as soon as it isn't available in a listing, or does it actually disappear when it's been missing for a few scans. This threshold should be configurable.

Parsing Quality line variability

In the Quality line, I've seen a couple of different formats, both which break the regex parser in Wireless.prototype._parseScan (the first line breaks because it's a 3-digit number):

Quality=100/100  Signal level=47/100
Quality=66/100  Signal level=52/100
Quality=58/100  Signal level=80/100
Quality=61/100  Signal level=72/100
Quality:23  Signal level:0  Noise level:0
Quality:93  Signal level:0  Noise level:0
Quality:13  Signal level:0  Noise level:0

This was seen on Raspbian (Raspberry Pi):

  • iwconfig: Wireless-Tools version 30
  • iw: version 3.4
  • /etc/debian_version: 7.6
  • uname -r: 3.12.28+
  • uname -m: armv6l

Better Sample App

The sample app should have some more features.

I'd like it to run, connect to any open network it finds, get an IP address, find out its public ip address, and log everything it found. Should also be able to check for GPS coordinates.

Ideally, one could drive around with this running on a machine in their car, and automatically connect and disconnect without any errors, which I feel would be a great example of the features of the project.

Get Public IP: http://ip.thomashunter.name

-100 dBm breaks regex

sometimes I scan and the quality line is (something like)
Quality=10/70 Signal level=-100 dBm

and the regex for signal level is
-?[0-9]{1,2} dBm

but it should be
-?[0-9]{1,3} dBm

to handle 3 digits

Change method for interacting with WiFi hardware

Currently, the module runs a bunch of commands over and over. This means we need to wait for the command to finish before we get the results. This can take many seconds, and then we send a "burst" of network found events, etc.

What we should do, is find a better way to talk to the hardware, and be able to trigger an event every single time the device sees a wireless packet.

I have absolutely no idea how to do this. Someone once said something about dmesg or something similar, but I'm still pretty lost.

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.