Git Product home page Git Product logo

Comments (7)

bakerface avatar bakerface commented on August 15, 2024

What version of hostapd are you running?

hostapd -v

from wireless-tools.

Subh1994 avatar Subh1994 commented on August 15, 2024

Hii bakerface,

I am using hostapd v2.4 version

from wireless-tools.

Subh1994 avatar Subh1994 commented on August 15, 2024

intelnuc@intelnuc-desktop:~/Documents/nodejs$ node hostapd
Example app listening on port 5001!
{ Error: Command failed: cat <wlp2s0-hostapd.conf && hostapd -B wlp2s0-hostapd.conf && rm -f wlp2s0-hostapd.conf
channel=1
driver=nl80211
hw_mode=g
interface=wlp2s0
ssid=bhavika
wpa=2
wpa_passphrase=123456789

at ChildProcess.exithandler (child_process.js:205:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at maybeClose (internal/child_process.js:899:16)
at Socket.<anonymous> (internal/child_process.js:342:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at Pipe._handle.close [as _onclose] (net.js:513:12)

killed: false,
code: 1,
signal: null,
cmd: 'cat <wlp2s0-hostapd.conf && hostapd -B wlp2s0-hostapd.conf && rm -f wlp2s0-hostapd.conf\nchannel=1\ndriver=nl80211\nhw_mode=g\ninterface=wlp2s0\nssid=bhavika\nwpa=2\nwpa_passphrase=123456789' }

from wireless-tools.

jsonpoindexter avatar jsonpoindexter commented on August 15, 2024

Hi, same issue. Hostapd v2.3

It appears to happen everyone other time I run hostapd.enable().

I run the command and it will execute without a problem. I run it again and it will throw the error that Subh1994 mentioned. Even if I open node, run the command, it works, exit node, enter node again, run the command, it throws an error.

Hope this helps.

Thanks for your work!

Jason

from wireless-tools.

Subh1994 avatar Subh1994 commented on August 15, 2024

Hii jsonpoindexter

I run the nodejs script and every time I face these command failed issue "Error: Command failed: cat <wlp3s0-hostapd.conf && hostapd -B wlp3s0-hostapd.conf && rm -f wlp3s0-hostapd.conf". Please help me out to solve these error.
When i try to run these hostapd -B wlp3s0-hostapd.conf it successfully run and access point enable but when i run the node script it always through me the error.

from wireless-tools.

kevireilly avatar kevireilly commented on August 15, 2024

@Subh1994 you may need to run your script with elevated permissions by using sudo node hostapd.js or a preferred method. Are you able to execute the following command in a terminal? hostapd -B wlp2s0-hostapd.conf

@jsonpoindexter this appears to be the case when you do not execute the wireless-tools hostapd.disable method before attempting to hostapd.enable again.

FWIW, I'm using the driver: 'nl80211' for a standard USB wifi dongle and followed the instructions from #15 (perhaps this should become part of the readme or a wiki entry?).

from wireless-tools.

Subh1994 avatar Subh1994 commented on August 15, 2024

Hii ,

Thanks for reply!

Yes I am able to execute this command hostapd -B wlp2s0-hostapd.conf in my pc.
And I run my script with sudo only.
and DRIVER is also nl80211

from wireless-tools.

Related Issues (20)

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.