Bluetooth connections and pty/tty – HELP!!!

Hopefully someone’s reading this who can help me. I’ve posted it to the forum as well as I’m stumped!

I’ve got a very specific kind of problem to do with a Bluetooth keyboard.
Now, I’ve had the keyboard working fine before, and I believe I have it working now… except…
Okay, here’s what I do:

1. Start the Pi. It connects to my WiFi network automatically.
2. Run a remote ssh terminal (MobaXterm) and connect to it via IP.
3. Login.
Everything’s fine up to here.
4. Make sure the BT dongle is working in the Pi. It is.
5. Put the keyboard in discovery mode (light flashes).
6. hcitool scan. Find the MAC of my keyboard. All ok so far.
7. Use l2ping to make sure that I can actually get to the keyboard. still ok.
8. Run bluez-simple-agent hci0 DC:2C:26:D9:1A:BB
    This connects my dongle with my keyboard
9. bluez-test-input connect DC:2C:26:D9:1A:BB
    This connects my dongle with the keyboard SERVICE of the keyboard.
10. At which point the light on my keyboard goes steady. I know this is correct operation.

If I start typing on the keyboard, the orange transmit light flashes (which it doesn’t do if it’s not connected). However, nothing appears on the screen.
Now, I know that I’m on /dev/pty0 – which is a pseudo-terminal from my remote connection.
I suspect that the keyboard has connected to the terminal session that a screen connected to my Pi _would_ be showing if I had a screen plugged in.

So… the question is… How do I

a) Connect the bluetooth keyboard to the pty I’m already logged in on.
OR b) Change from the pty session to the ‘console’ session.

Any ideas?

1 comment for “Bluetooth connections and pty/tty – HELP!!!

  1. >Does the Pi autologin ?
    It's been so long since I've been on a Pi's console that I don't remember haha.

    What you can do, if it autologins, is add this into ~/.bashrc
    screen -R

    and when you login via ssh, you should be able to see what the keyboard is typing.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.