title: Making UDP broadcast work with wifi router
body: <p>I'd like to test out UDP broadcast on a very simple network: an old wifi router (WRT54GS) that's not connected to the internet at all, an android tablet, and my macbook:</p>
  
  <pre><code>[Tablet] &lt;\/\/\/\/\/&gt; [Wifi Router] &lt;\/\/\/\/\/&gt; [Macbook]
  </code></pre>
  
  <p>where the wavy lines indicate wireless connections. </p>
  
  <p>The Macbook has IP address 192.168.1.101, the tablet has IP address 192.168.1.102. The router is 192.168.1.1. </p>
  
  <p>To avoid too much low-level detail, I wanted to use netcat to do my testing. I decided to use port 11011 because it was easy to type. </p>
  
  <p>As a first step, I thought I'd try just making this work from the macbook back to itself. In two terminal windows, I ran these programs</p>
  
  <blockquote>
    <p>Window 1: <code>% nc  -ul 11011</code></p>
  </blockquote>
  
  <p>which I started up first, and then:</p>
  
  <blockquote>
    <p>Window 2: <code>% echo 'foo' |  nc -v -u  255.255.255.255  11011</code></p>
  </blockquote>
  
  <p>Nothing showed up in Window 1. The result in Window 2 was this:</p>
  
  <pre><code>found 0 associations
  found 1 connections:
       1: flags=82&lt;CONNECTED,PREFERRED&gt;
      outif (null)
      src 192.168.1.2 port 61985
      dst 255.255.255.255 port 11011
      rank info not available
  </code></pre>
  
  <p>I'm fairly certain I'm missing something obvious here. Can someone familiar with nc spot my obvious error? </p>