Start a new topic

Sonoff Smartwitch Network/UDP problems


I think the sonoff smart switch solution is a gorgeous solution with many possible applications but i am actually facing network problems when using my own firmware.

I am using UDP messages to controll the device. This firmware is running without any problems on other ESP devices but on the sonoff switch about 1 out of 10 UDP messages get lost.

I could monitor the message using Wireshark network monitor but it does not appear in the arduino environment build firmware.

Since the firmware is running without problems on other devices i expect either some electrical problem or a configuration problem. (I already got the version with the additional capacity)

Can you maybe give some hints what to try? I already tried to contact the official support but without luck.

I got the impression that it runs more stable if the device is powered only by 3.3v (FTDI) and working worse if powered by 230V. But even with 3.3V some messages get lost.

Any idea ?



right observation, wrong conclusion ...

    - UDP protocol per se has no transmission feedback. You send out data, and good, UDP won't give you any feedback if data has been received or not. If you need such, use TCP instead of UDT ...

    - the fact that other ESP modules work without any data loss is meaningless. ESP modules are not the same. They use the same core chip, but differ a lot in antenna implementation and signal shielding.

Especially with WIFI, any kind of EM emission will have side effects. And a 220V line next to, or a switching relay with its coil, will surely have its impact. Therefore choose a transfer-protocol without any handshake, error correction or transmission-feedback like UDT is no good choice per se ...


Hi Gerry,
i know that UDP messages could get lost in generall but in an intranet this typically does not happen so we use this instead of TCP to be able to use broadcasts. I think that the EM emmision you mentioned causes the problem. I wonder if one can improve it by adding some capacity or filter somewhere ?


not really ... the problem is not the pcb routes in general, it is more like the PCB antenna , which causes trouble ...


Login or Signup to post a comment