Hackaday Prize Entry: Dongle For A Headless Pi

Mass production means that there’s a lot of great hardware out there for dirt cheap. But it also means that the manufacturer isn’t going to spend years working on the firmware to squeeze every last feature out of it. Nope, that’s up to us.

[deqing] took a Bluetooth Low Energy / USB dongle and re-vamped the firmware to turn it into a remote keyboard and mouse, and then wrote a phone app to control it. The result? Plug the USB dongle in, and the computer thinks it sees a keyboard and mouse. Connect the phone via BLE, and you’re typing — even if you don’t have your trusty Model F by your side.

[Deqing] points out that ergonomics and latency will make you hate using this in the long term, but it’s just meant to work until you’ve got SSH up and running on that headless single-board Linux thing. If you’ve ever worked with the USB or BLE specifications, you can appreciate that there’s a bit of work behind the scenes in making everything plug and play, and the web-based interface is admirably slick.

Kudos, [deqing]!

29 thoughts on “Hackaday Prize Entry: Dongle For A Headless Pi

  1. I want to see a dongle that will take any HDMI output and turn an iPad or android tablet to dummy video display screen or even a graphics terminal. Instant portable debug unit for headless systems when SSH isn’t present or broken because the server/device is stuck in emergency mode.

      1. There’s still likely plenty of market space for such a device. So long as the cost is quite low, it would be a very fair trade-off for low performance.

        There are already commercial devices of this nature but all of them I am aware of are very high end and target enterprise and industrial usage, and come with the price tags to match.

        KVM over IP usually starts at a grand for each end-point and goes up from there.
        Wireless KVM is typically just under a grand.
        You may be able to settle on a wireless HDMI extender setup, and a plain old wireless USB keyboard/mouse or keyboard with trackpad, which would only be in the $200-ish range, if your only goal is a single headed “crash cart” setup without the switching between multiple devices function.

        So a cheap device, like the CC2540 dongle used here, running $10-20 would likely be seen by a hobbyist as a perfectly viable solution, even with slower speeds and high latency. At that price I’d love to have one as a plan b (or C or D) in my toolbox, Just In Case(tm)

      1. That works in a totally different way. It get keystrokes from computer can send it via Bluetooth.
        I wouldn’t doubt the performance as it is using BT3.0. My experience with BT2.0 on CSR chipset shows great performance with neglectable latency.

        However you will not be able to do same thing on iOS device. Pairing with a customized BT classic device is not allowed

  2. It would be generally useful beyond the Pi use case. I can see using my phone as a presentation remote/keyboard instead of carrying around a dedicated BLE mini-keyboard/track-pad in a bag like I do today.

  3. Because any sensible “hacker” would have plugged in a 2.4Ghz receiver and used the accompanying keyboard and mouse to get the task done without any noticeable latency or having to remember to charge there cellphone.

  4. fun hack, but there are any number of wifi (with dongle) keyboard/mouse combos on amazon for less than $20. The real issue for me has been lack of a mini-hdmi (or other way to see what my keyboard/mouse are doing). A cheap solution to suck up hdmi and display it on a tablet device (even slow) would be awesome.

    1. I’d settle for a “dumb terminal” keyboard with a display.
      No easy-to-lose dongle, no battery-sucking Bluetooth, no potentially insecure wireless – just a direct connection running off a USB port. In a pinch, I’d even take the serial port such a setup emulates.

    2. There are a number of set top boxes coming to market with the Realtek 1295 chipset, which supports HDMI input (amongst other things), from around $85. Apparently the available boxes can even do USB gadget, with a male-male cable.

      I’d love to see something similar made up with HDMI in and USB device connectors, gigabit ethernet (supported by chipset) and Wifi, in as small a form factor as possible.

      That would make a perfect IP KVM box. (with optional passthrough – USB host and HDMI out – if you want to have your actual screen and input devices connected too).

      And if I can do a full wishlist, add dual GbE, for ethernet “passthrough” capabilities (since the chipset apparently has dual PHY). For bonus points, power it via PoE, like a Cisco phone ;-)

      1. Yay, I’d not noticed that to be honest, I’d given up on them.

        So I can PXE boot and also use pm-suspend and wakeonlan, or is the implementation really half-baked?

        What about some of the cheaper clones such as the Orange and Banana Pi? I’ve never seen a comparison table that covers those capabilities, but you can see how it would be very useful and informative.

        If the functionality in the RPi3 is complete then it makes this project redundant for them unless they are isolated, but many people will have the older or cheaper variants.

          1. Yes it needs one boot to load the bootcode.bin with a setting to enable netboot, but this doesn’t need to be interactive.
            Make a normal raspbian image, edit the config.txt from windows to enable the option, put it in the Pi3 and boot then count to 30, yank power and remove the sd card.
            After that the Pi remains in netboot mode from then on and doesn’t require an sd card at all.

            I’ve never tried to suspend or WoL a Pi like that, so can’t say. You’re probably correct in assuming it can’t.
            In fact the Ethernet is still connected internally via USB, so very likely can’t WoL.

            The older Pi models do not have the netboot functions built in at all.
            I remember finding two projects that were working on a “unnetbootin” type of replacement coreboot.bin for Pi 2’s, such that you would need an SD card but could leave it locked in read-only mode. It only boots the coreboot.bin and then instead of the start.elf and/or kernel, would just proceed to netboot. In a read only state it seems like it should be OK to not safely power down the pi hard.
            But I don’t know if either of those projects got up to a working state before the Pi 3 came out, and I never went back to check.

            I do remember seeing a PoE hat to power a Pi before, as an actively being sold product.
            If you have a PoE capable switch and can toggle power in its settings or via snmp, that might be able to replace the need for WoL. Maybe suspend mode too, but in most cases you’d still want to do a safe shutdown before removing PoE so it’s not exactly the same thing there.

          2. Yes I think a hat of some form is the way to go, you could add a very low power MCU with a rechargeable battery or super cap and have it manage the Pi, but I’ve never tried it as I found so much cheap ex-corporate Intel gear that I just followed that path, however I am probably paying higher power bills as a consequence.

          3. Having found out that the RPi3 is still not a complete solution, and that old Intel gear is, PXE on the Pi is no longer a priority, and I have 54 years of the Journal of the American Association of Physics Teachers to go through, which I expect will take days or weeks.

            BTW I have figured out why you are incapable of sustaining an intelligent dialogue, you are terrified of being identified by linguistic finger printing. What a coward you are.

  5. I think it’s a rediculous idea. Here’s why:
    You’re setting up a HEADLESS Pi. That means it’s going to do stuff in the future that doesnt need input and maybe not even output from anything.
    For one, you’re setting it up, just plugin in a friggin keyboard and mouse.
    point two: you ARE plugging in a monitor anyway. So bring the frigging keyboard and mouse too.

    1. I don’t use an external monitor, keyboard or mouse anymore. It’s all either laptop or tablet. I really dislike the wireless KB and mice because 1) dead/dying batteries always become an issue and 2) half the time the wireless doesn’t connect during boot time on many devices so trying to get it to work for BIOS stuff is an exercise in frustration. Solution? Keep a cheapo wired USB KB and mouse and monitor sitting around collecting dust until a hard crash or I buy a new headless device and have to set it up. I want to declutter, not store tons of outdated peripherals.

  6. I thought Headless meant no screen/keyboard/mouse — so this would only solve 1/2 the issue for a headless unit (input).

    If you are doing setup for later, why bother, nice proof of concept for reuse of device but not very real world useful IMHO.

  7. if you are using this solution described as irritating and high latency untill ssh is set up…
    Why not (when using raspbian) pull de sd, add an empty file called ssh on the boot partition, boot the thing and wait untill has it’s ip from your dhcp server?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s