Wifi setup command doesn't work in CygWin
pftg4 opened this issue · comments
i read the docs i'm on a windows machine downloaded
cygwin and typed command below
echo -n "{"psw": "YOUR_WIFI_PASSWORD","ssid": "YOUR_WIFI_SSID","t": "wlan"}" | nc -cu 192.168.1.1 7000
as written in the docs replacing my wifi info
it it says there is no such command so i searched netcat docs and indeed there is no cu comand
did i miss something
thanks
dave
The command was tested under macOS, so there might be a difference in netcat options. Try using nc -Cu
(capital C) instead.
The required netcat options are:
- Send CRLF as line-ending
- Use UDP instead of the default option of TCP
Please let me know if this fixes the issue.
hi arthur thanks for quick reply
the capital c did the trick but the cursor just jumps to next line and flashes i assume it is trying to connect to the ac??
i reset the wifi module on ac then connected to the ac network greexxxxx and ran the command
but nothing not sure what i am doing wrong would love to set this up and thanks for the hard work
Dave
The basic idea of the command is to echo a JSON payload, pipe it into nectat and send it using UDP.
The flashing newline means there might be something wrong with the syntax, probably with the echo
command (wrong option or a quote left open). Unfortunately, I can't help you beyond that.
If you find a command that works, please post it here for others!
quick update windows android and my daughters MacBook air all do the same thing just jumps down one line and flashes I assume it cannot connect no errors just sits there on all platforms so not sure what i'm doing wrong?????
thanks
dave
I just tested the original command (below) on my macOS terminal and it works. Try to run the following on the MacBook:
echo -n "{\"psw\": \"YOUR_WIFI_PASSWORD\",\"ssid\": \"YOUR_WIFI_SSID\",\"t\": \"wlan\"}" | nc -cu 192.168.1.1 7000
UDP messages are fire-and-forget so it won't wait for a response and should simply finish.
To my understanding the ac should then come out of ap mode and log on to my network correct??? so we Control it via pi so it has to be on same network
same results as before i took quite a few pictures to show you but github won't let me upload
thanks dave
How you make the AC connect to your WiFi doesn't matter, e.g. you can use the dedicated mobile app for that.
yeah no matter what I do it won't connect to my wifi with that command or with the app i have reset wifi module many times I can log into the ac with laptop but not sure what I do when i'm in the command doesn't work for me just drops to next line and keeps flashing don't know it that is finished or can't do the command i get no feedback at all to know if the command is wrong or ac won't do what i tell it
is there another way I can do this ????
thanks
dave
I'm sorry, but I have no access to a Windows PC to look into this. Did you finally manage to fix the command for CygWin?
nothing I try works tried with mac as well you wrote above this will give me no indication whether it worked or not so there is nothing to troubleshoot sadly it just doesn't work for me glad it worked for you but this doesn't work here
dave