I have some problems with pairing devices in lejos.
I can't add device for example, but on original firmware everything work's fine.
Some time ago I wrote really simple application to adding/deleting devices in lejos. It worked fine.
Now I'm trying to write better simple application for managing Bluetooth in lejos.
I recognize that function Bluetooth.getPin() don't work properly.
It returns null instead of byte. I enclose code example.
- Code: Select all
public void ShowPIN()
byte pin = Bluetooth.getPin();
if(pin == null)
LCD.drawString("PIN unavliable!", 0, 1);
LCD.drawString("Press any key...", 0, 2);
LCD.drawString("Current PIN is:", 0, 0);
LCD.drawInt(pin, 0, 2);
LCD.drawInt(pin, 2, 2);
LCD.drawInt(pin, 4, 2);
LCD.drawInt(pin, 6, 2);