govert / WiFiDirectLegacyAPDemo

Copy of the Windows sample that allows 'soft AP' support on Windows 10 through the WiFi Direct interfaces
49 stars 9 forks source link

Feature Request: Non-console mode #1

Open ysaliens opened 3 years ago

ysaliens commented 3 years ago

Very useful tool! Windows is now disabling hosted networks on newer adapters and I was delighted to see this uses the newer Wi-Fi direct standard.

Would it be possible to make a non-console version of this tool? I'm looking for something I can run on startup to enable the Hotspot functionality. This could work perfectly if it could use a config file for settings and be able to start and stop a network from the command line

govert commented 3 years ago

That would help me too.

What do you think is the easiest way to implement that, and can you maybe help? Writing C++ makes me unhappy :-(

One approach might be to take a list of commands (delimited somehow?) as a command-line argument. Then in the main we split the commands and just execute each one.

So that one could say: WiFiDirectLegacyAPDemo.exe "ssid MyNetwork" "pass 12341234" "autoaccept 1" "start"

Then in main just iterate through the delimiter commands and call SimpleConsole.Execute for each one. Not sure what the best delimiter story is - quotes and spaces?

govert commented 3 years ago

Alternatively just use "-" to indicate the start of a new command: WiFiDirectLegacyAPDemo.exe -ssid MyNetwork -pass 12341234 -autoaccept 1 -start

suheylkiris commented 1 year ago

hi. is there any solution about this issue. I need work at startup. I configure some batch files but it does not work correctly. My codes:

wifilegacy.bat

cd C:\user\path\to\WifiApi echo type commands.txt | WifiLegacyDemo.exe

commands.txt

ssid MySsid pass 123456789 start

When i send this command, it works repeatedly.

ImBIOS commented 1 year ago

Alternatively just use "-" to indicate the start of a new command: WiFiDirectLegacyAPDemo.exe -ssid MyNetwork -pass 12341234 -autoaccept 1 -start

It didn't work

govert commented 1 year ago

@ImBIOS

It didn't work

Indeed, it would not work like that now. My suggestion was that someone could implement the command line switches this way. It is not currently implemented like this.