Chat freely about anything...

User avatar
By Solomon Candy
#57928 Listening for packets on a port on my MACBOOK and using a NodeMCU as client (coded in native SDK), I can only receive the packets on my mac computer if I have a Firefox or Safari web browser open in the back. When the browsers are closed, somehow there is no traffic to my mac and a TCP connection doesn't even form.
I found this very bizzare and was losing my head over what was going on with my ESP :x before I found this strange connection. Anybody more knowledgeable in networks :ugeek: can perhaps tell me what's going on ? :?
User avatar
By Solomon Candy
#57976 I can not believe that either but that's what's happening. Can it be that opening a browser allows my router to know where my macbook is through some cache of ip to mac address perhaps, seems like a pandora's box to me. I am using a wireshark to monitor the sockets on my macbook. Here are some details:

1. ESP is programmed in NONOS SDK libraries. It is a NodeMCU but I have removed the Lua firmware of-course.

2. ESP uses espconn_connect() to reach my macbook over wifi-LAN and make a TCP connection.

3. My macbook listens to a port all this while. When the browser is open, a TCP connection forms and packet is received. When there is no browser open, a connection doesn't form, i.e. the ESP doesn't advance beyond espconn_connect(). The espconn_connect_callback is never put into action. Very less often, once in 20 times, a connection forms and the packet is transferred.

On my wireshark what I hear is:
1. Deep silence mostly when no web browser is on.
2. Packets say out-of-order packets or spurious packets.

I know it is strange but do you have any theory? however wild, on what may be going on. Sometimes the router is forwarding nothing at all to my macbook.