title: UDP client doesn't broadcast message on esp32
body: <p>So I am trying to send packets via UDP as a broadcast from one ESP32 to another. The receiver is an access_point and server, the sender is a station and client.</p>
  
  <p>I already read this:
  <a href="https://stackoverflow.com/questions/44399443/esp32-udp-broadcaster-receiver-with-native-lwip-library">ESP32 - UDP broadcaster/ receiver with native LwIP library</a></p>
  
  <p>But it didn't help. I know that my server works because I can send packages via terminal.
  But for the client it seems that the packages aren't leaving the esp.</p>
  
  <p>My code:</p>
  
  <pre><code>// CLIENT: 
  
  sockaddr_in _send_addr;
  _send_addr.sin_family         = AF_INET,
  _send_addr.sin_port           = htons( 5000 );
  // also tried local broadcast 192.168.4.255
  _send_addr.sin_addr.s_addr    = inet_addr( "255.255.255.255" ); 
  _send_addr.sin_len            = sizeof( _send_addr );
  
  
  int _sock;
  _sock = socket( AF_INET, SOCK_DGRAM, IPPROTO_IP );
  
  int broadcast = 1;
  setsockopt( _sock, SOL_SOCKET, SO_BROADCAST, &amp;broadcast, sizeof(broadcast) );
  
  void* data; // has some length
  size_t len; // len of data
  sendto( _sock, data, len, 0, (const struct sockaddr*) &amp;_send_addr,
     sizeof(_send_addr) );
  
  // SERVER:
  // server is bound to same port, and to ip "0.0.0.0"
  // like I said normally the server shouldn't be the problem, cause he received already
  </code></pre>
  
  <p>I skipped the checks.</p>
  
  <p>But everything is created successfully, and the sendto returns the correct number of bytes written.</p>
  
  <p>I have really no idea anymore appreciate any help.</p>