Search code examples
androidbluetooth-lowenergybluetooth-gatthm-10

HM-10 BLE microcontroller connected without PIN


I'm using HM-10 controller to communicate with my Android App. In Arduino console I set pin with command AT+PIN112233 which should be Passkey for BLE device. This PIN was saved to my device but Android phone can connect to this device without any confirmation or PIN request. Is this normal behaviour?

I just find device through scanning in BroadcastReceiver and I get device under action BluetoothDevice.ACTION_FOUND. It will return BluetoothDevice and I just connect to this device with

bleGatt = bleDevice.connectGatt(this, true, bleGattCallback)

I did not get any Dialog window in my Android App asking for PIN. Also tried some other apps for Bluetooth or BLE connection and it was the same. None of them asked for PIN during pairing.

Also my HM-10 BLE controller does not react to some AT commands:

  • AT+TYPE2 returns +TYPE=0
  • AT+VERR? not responding
  • AT+VERS? not responding
  • AT+RESTART not responding
  • AT not responding but AT+ responds with OK

Solution

  • I had clone model MLT-BT05 where AT+TYPE2 is not working. That means I cant set pairing method only change PIN which is practically useless.