Why am I asked to enter legacy pairing code when I am pairing the BT900 with another BT 2.1 or later device? Shouldn't it be simple secure pairing (SPP)?

It is because the “pairing mode” has not been enabled in the smartBASIC application. Please search for “PAIRABLE_ON_STARTUP”, and modify the value to 1 in the sample smartBASIC application.