Skip to content

Instantly share code, notes, and snippets.

@HeadHodge
HeadHodge / Bluez HID over GATT (HOGP) Keyboard Emulator Example.md
Last active October 23, 2024 14:28
Bluez HID over GATT (HOGP) Keyboard Emulator Example

Bluez HID over GATT (HOGP) Keyboard Emulator Example

A working example of a BLE Keyboard Peripheral (Server) ran on my Raspberry PI4-b with Buster Raspbian-Lite for all to use. My desire is to hopefully save at least one other person the literal weeks I've spent trying to get this working for my little home automation project.

Verified working connected to my Blade Android, Windows 10 laptop, and Amazon FireTV stick devices

Once running and connectted properly to a client device, it will update the battery status with a lower percentage every 60 seconds, use the Keyboard Input Report to send a capital 'M' every 10 secomds, and use the Consumer Input Report to send a 'volumeUp' every 15 seconds.

TIPS

@prasanthj
prasanthj / lirc-pi3.txt
Last active June 20, 2024 10:09
Getting lirc to work with Raspberry Pi 3 (Raspbian Stretch)
Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]).
The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch.
Following are the changes that I made to make it work.
$ sudo apt-get update
$ sudo apt-get install lirc
# Add the following lines to /etc/modules file
lirc_dev
lirc_rpi gpio_in_pin=18 gpio_out_pin=17
@GrantByrne
GrantByrne / UserValidator.cs
Created April 24, 2014 06:02
Using Fluent Validation with WPF - Dead Simple
using System.Text.RegularExpressions;
using FluentValidation;
using WpfFluentValidationExample.ViewModels;
namespace WpfFluentValidationExample.Lib
{
public class UserValidator : AbstractValidator<UserViewModel>
{
public UserValidator()
{