AT+LOCK issue for RAK4631-R

Hi All,
I was trying out the AT+LOCK command and the serial and ble uart are locked (which is working), but while trying to unlock it with the default password (‘00000000’) it still says ‘COMMAND_LOCKED’. Also, can’t upload any new firmware as it shows “no ping response” while uploading.
I haven’t changed the password at all.
I am using a wisblock rak4631-r with version rui 4.1.1.

I am using the low power example and was exploring setting up lorawan and custom parameters using ble,
intially I tried looking into adding characteristics but rui api doesn’t have write permission, “@param prop currently supports (RAK_CHR_PROPS_NOTIFY/RAK_CHR_PROPS_READ)”, then I thought of using ble uart but I can’t use loop() to read the ble.uart data and since using while loops in callback function is prohibited I had to discard that idea as well.
Then I thought of adding custom AT commands with the lock which seems to be the only option working in a no loop() setup.

Is there a better way I can handle this? and has the default password changed in the firmware update?

Thank you for your help.

Welcome to the forum @kpandya

It works well for me on RAK4631 with RUI3 V4.1.1:

Please make sure when you enter the password that it is trailed by a CR/LF, otherwise the device cannot process the send serial data.

Hello,
I am using a trailing CR/LF but still it shows ‘COMMAND_LOCKED’
sharing below ss from arduinoIDE and docklight


Is there a way to reset everything?

UNLOCKED
I was able to put the device in boot mode via pressing the reset button twice.
I wrote a test code to just init Serial and blink LED_BLUE and unlock via “api.system.pword.unlock();”
after unlocking I checked the existing password via “AT+PWORD=?” command and it returned the password which I had used to set the ble pin with via “api.ble.uart.setPIN(pairing_pin, 6);”.
Interestingly enough it wasn’t asking me for a pin when connecting with ble as shown in the example here

@beegee any update on why the api.ble.uart.setPIN would change the serial password and not ask for pin on pairing via serial bluetooth terminal app.
I am setting permission as api.ble.uart.setPermission(RAK_SET_ENC_WITH_MITM), basically using the ble uart test code.

Using the BLE-UART example code, the device asks for pairing on the first connection.
Future connection will not ask anymore, as the device and the phone are already paired.

However, it does not ask for the pin. I opened a ticket about this with our R&D team.

For the second issue, that the serial password is changing to the BLE pin, I cannot reproduce this.

image