1
0
jcktrue.dk/content/project/lednotifier/index.md

52 lines
1.4 KiB
Markdown
Raw Normal View History

2022-01-05 09:25:53 +00:00
---
title: "LED Notifier"
summary: "Commandline app to change the color of a USB LED notifier."
date: 2022-01-04T20:56:05+02:00
categories: ["C#"]
image:
preview_only: false
url_code: "https://github.com/furyfire/LEDNotifier"
---
# LED Notifier
Setting the color of a simple USB LED Notifier. Implemented in C# and .NET 6.0
# Device
The device itself was purchased years ago from a chinese site.
2022-01-05 10:15:58 +00:00
| Field | Value |
|----------------|------------------|
| Vendor ID | 0x1294 |
| Product ID | 0x1320 |
| Product Name | EMAIL |
| Device Name | Webmail Notifier |
| Vendor | RISO KAGAKU CORP.|
2022-01-05 09:25:53 +00:00
It enumerates as a USB HID device and supports a limited set of colors.
- Off
- Blue
- Red
- Green
- Aqua
- Purple
- Yellow
- White
# Implementation
I opted to use C# for a basic Windows implementation.
- Using VS2022
- To interface with the HID device I used the HIDSharp library. (https://www.zer7.com/software/hidsharp)
2022-01-05 10:15:58 +00:00
Colors are not bit mapped and only values between 0x0 and 0x7 are supported. The first byte sent to the device does not appear to have any effect as is left as 0xFF. Drivers are not needed as this is a basic HID device.
2022-01-05 09:25:53 +00:00
2022-01-05 10:15:58 +00:00
# TODO
- Basic pattern support (built from colors and durations)
- Decode the HID device description
- Better error handling
- Service/Daemon for background operation
- PWM (Low resolution considering the 1ms USB update frequency)