Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6769437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:11:37+00:00 2026-05-26T15:11:37+00:00

I have a mini linux PC (headless), and I’d like to use it as

  • 0

I have a mini linux PC (headless), and I’d like to use it as a gateway for a bluetooth remote to IP.

I have no problem with the IP side of things, I’m just a little bit in the fog for the bluetooth side of things.

How can I get the bluetooth events from my code? Is it device based (would mean I just open() the right device) or is there some API?

Basically, what I want is to poll for keypress on the remote and that’s it.

In pseudo code, this would be something like:

handle = open_bluetooth();
for event in poll(handle):
    do_something_with(event.key)

I’m a bit unsure because most of the documentation I find is to make the remote acts like a regular keyboard, but as I’d like to be headless (no Xserver, no TTY console, only SSH for admin) this is not what I want.

As for the language, my control software is in ruby, but I have no problem making a C extension if needed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:11:37+00:00Added an answer on May 26, 2026 at 3:11 pm

    I figured how to do it.

    It’s quite simple actually, just call POSIX open on the character device, then read struct input_event (more than one at a time, because a keypress generates more than one event, you get the syn, the key and sometimes the misc event).

    For info on the struct, look into header linux/input.h.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a SVG image, or more like mini application, for viewing graphs
I have a stock mac-mini server (2.53GHz, 4GB, 5400RPM drive) which I use for
I have a mini project that I'd like to start on port 2000. How
Just curious: I have to do a mini-CMS that allows users to add pages
I have been developing on my Mac Mini. I have just paid to join
I have just coded the below regular expression. I have a mini rich text
I have a panel where I place several mini-panels, side-by-side, with different sizes and
I have a mac mini on which I do some iphone and other experimental
I have created a mini installer in NSIS that installs patches for my application.
I have written a mini web-server which needs to serve up a few static

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.