title: C# - Windows Mobile - Pairing with Zebra RW 420
body: <p>Update: This may not be "Pairing". This may just need to have a service started and bound to a port. However, this code is not storing it either. I need the device to be stored even after the application is closed.</p>
  
  <p>I am building a program specifically suited for Zebra RW 420's on a Windows Mobile 6 Handheld device. The application needs to allow a mobile device to pair with the printer on COM1. I believe I am very close to getting it, but I can't get the pair request to work.</p>
  
  <p>I am able to communicate with the printer and even print by directly connecting and printing, but I can't get the mobile device to actually pair with it. I've tried a variation of pins to include <code>null</code>, <code>"1"</code>, <code>"0000"</code>, and <code>"1234"</code>. No matter what, the method always returns false. Any suggestions or ideas why this might be failing? I can pair the device just find in the WM6 Bluetooth menu, but not in my application.</p>
  
  <p>It might be important to note that the little light bulb icon on the printer comes on when the program says it is attempting to pair, but after about 5 to 10 seconds, it fails.</p>
  
  <pre><code>BluetoothSecurity.PairRequest(device, "1"))
  </code></pre>
  
  <hr>
  
  <p>Additional Information:</p>
  
  <p>I've successfully paired with my Android phone using this code.</p>
  
  <p>I then logged in and set a PIN on the Zebra printer. However, this code still fails to pair with the printer even when I know the pin is correct / set in the printer.</p>
  
  <hr>
  
  <p>From <a href="https://km.zebra.com/kb/index?page=answeropen&amp;type=open&amp;searchid=1336682809706&amp;answerid=16777216&amp;iqaction=5&amp;url=https%3A%2F%2Fkm.zebra.com%2Fkb%2Findex%3Fpage%3Dcontent%26id%3DSO8031%26actp%3Dsearch%26viewlocale%3Den_US&amp;highlightinfo=6292341,26,43#" rel="nofollow">https://km.zebra.com/kb/index?page=answeropen&amp;type=open&amp;searchid=1336682809706&amp;answerid=16777216&amp;iqaction=5&amp;url=https%3A%2F%2Fkm.zebra.com%2Fkb%2Findex%3Fpage%3Dcontent%26id%3DSO8031%26actp%3Dsearch%26viewlocale%3Den_US&amp;highlightinfo=6292341,26,43#</a></p>
  
  <p>Zebra Bluetooth enabled mobile printers are 'slave' devices only. The printers will pair with any 'master' device that tries to make a valid connection. Since only a master device can initiate a connection, the printer does not store pairing data, that function is always done on the master device. The printer can only be connected to one master device at a time, but any number of master devices that have stored pairing information for the printer would be able to initiate a connection to the printer without having to rediscover it.</p>
  
  <p>I'm guessing that this means the InTheHand.Net BluetoothSecurity.PairRequest might not work for this type of pairing?</p>
  
  <hr>
  
  <p>In the Bluetooth section of the WM handheld, under the "Devices" tab, I can add the device. I need to essentially do that. I need to register the device in that list and then set it to use COM 1 in the "COM Ports" section. The application I am using doesn't actually print. It's sole purpose is to prepare the printer for other applications.</p>