I have to make communication between esp32 and .net framework so I created a mosquitto server on my pc, wrote codes. But, I have to forward the ports every time that I start my pc by this code
netsh interface portproxy delete v4tov4 listenaddress=192.168.120.116 listenport=1883
and then
netsh interface portproxy add v4tov4 listenaddress=192.168.120.116 listenport=1883 connectaddress=127.0.0.1 connectport=1883
.
After writing these on administrator cmd my esp connects mosquitto succesfully.Do I have to do this every start? Are there any way to solve this? Maybe another code, not with netsh?
I tried run a bat file with this to line code in it on task scheduler and some vbs files on shell:startup after win+r. I thought one of work and on every start codes will run by themselves but it didn’t work. I tried many times these two and I tired of restarting my pc for testing.
Berat Kayar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.