title: How to link/pair HTML 5 with a hardware device?
body: <p>I have two entities which I would like to be able to start a communication:</p>
  
  <ul>
  <li><p>Hardware Device Using Atmel ATSAMS70 and WINC1500 Wifi Module</p></li>
  <li><p>HTML 5 App</p></li>
  </ul>
  
  <p>The idea to have a HTML 5 app is to be able to communicate easily with most of the commercial devices like: Windows computers, Android Phones, Mac OSX computer and iOS devices. Apart from that, I would avoid working with native code at all.</p>
  
  <p>Currently, they can talk with each other using WebSockets but somehow the IP address of the custom board has to be known from HTML 5 to initiate the communication.</p>
  
  <p>In order to do this, I can think of 3 options:</p>
  
  <ol>
  <li><p>Using WebRTC I can get the local IP address of the browser and then I could do  a scan of the local devices considering a 255.255.255.0 network mask.</p></li>
  <li><p>Have an external server that the hardware device can send its local address which will be later retrieved by HTML 5.</p></li>
  <li><p>Using Bonjour or some sort of device discovery service between the board and HTML5. </p></li>
  </ol>
  
  <p>I could not find a way to achieve #3 but #2 seems feasible to me. #1 is what I am doing now, but WebRTC is currently not supported on iOS.</p>
  
  <p>So, is there any other better possibility to achieve this communication? </p>