title: Android Bluetooth PIN pairing without user interface on Android 4.2+
body: <p>There are similar questions to this here already, but the answers and suggestions relate to older versions of Android. I understand that the bluetooth stack has been completely revised from 4.2 onwards and older solutions do not work anymore.</p>
  
  <p>I have tried all the older solutions to no avail. the use of the private APIs no longer works because they have changed. I dont mind using private APIs but it must work on the newest versions and later (ie API 17+)</p>
  
  <p>I am trying to do the following:</p>
  
  <p>set up a bluetooth pairing between an Android device and an embedded device using legacy PIN pairing without the embedded device being discoverable nor the user having to manually enter the PIN. In fact I want no PIN entry dialog box at all.</p>
  
  <p>The plan is that the two devices have a predefined shared secret PIN, so that I can perform the pairing programmatically and then open an RFCOMM connection between them. All of this without UI. The hardware address of the embedded device is known to the Android program.</p>
  
  <p>There is no security issue here. the project involves just talking to a nearyby, small embedded device through BT as simple as possible.</p>
  
  <p>Ideas that might work on Android 4.2 (Jelly Bean) most welcome, thanks.</p>