| name | blink1 |
| description | Use when controlling blink(1) USB LED device via blink1-tool CLI, setting RGB/HSB colors, fade transitions, patterns, blinking effects, multi-device/LED control, or Linux udev setup. Keywords: blink1-tool, ThingM, USB LED, notification light, RGB color, HSB, pattern, blink, fade, chase, glimmer. |
blink(1) USB LED Control
Overview
blink1-tool controls ThingM blink(1) USB LED devices. Supports RGB/HSB colors, fade transitions, patterns, multi-device, and multi-LED (mk2+).
Quick Fix: If device not detected on Linux, run blink1-tool --add_udev_rules then replug. See Troubleshooting for details.
Version Compatibility
| Feature | mk1 | mk2 | mk3 |
|---|
| Multi-LED (top/bottom) | ✗ | ✓ | ✓ |
| Save pattern to flash | ✗ | ✓ | ✓ |
| Startup params | ✗ | v206+ | ✓ |
| Bootloader access | ✗ | ✗ | ✓ |
| User notes | ✗ | ✗ | ✓ |
| LED count | 1 | 2 | 2 |
Check firmware: blink1-tool --fwversion
Quick Reference
| Action | Command |
|---|
| List devices | blink1-tool --list |
| Set RGB | blink1-tool --rgb=255,0,0 or --rgb=#FF0000 |
| Set HSB | blink1-tool --hsb=<hue>,<sat>,<bri> |
| Preset colors | --red, --green, --blue, --cyan, --magenta, --yellow, --on (white), --off |
| Blink | blink1-tool --rgb=ff00ff --blink 3 |
| Fade time | -m <ms> (default 300ms) |
| Delay between events | -t <ms> (default 500ms) |
| Random colors | blink1-tool --random=10 |
| Play pattern | blink1-tool --playpattern '5,#ff0000,0.5,0,#00ff00,0.5,0' |
| Read color | blink1-tool --lastcolor |
| Firmware version | blink1-tool --fwversion |
Quick Start (3 Steps)
blink1-tool --list
blink1-tool --rgb=255,0,0
blink1-tool --off
如果 Step 1 无输出 → 见 Troubleshooting
Color Control
RGB Values
blink1-tool --rgb=255,0,255
blink1-tool --rgb=#FF9900
blink1-tool --rgb FF9900
HSB Values
blink1-tool --hsb=180,100,50
Fade Transitions
blink1-tool -m 100 --rgb=255,0,0
blink1-tool -m 2000 --rgb=0,255,0
Brightness Control
blink1-tool -b 50 --rgb=255,255,255
blink1-tool -b 200 --rgb=ff0000
blink1-tool --hsb=0,100,25
Blinking & Effects
Basic Blink
blink1-tool -t 200 -m 100 --rgb ff00ff --blink 5
Random Colors
blink1-tool --random
blink1-tool -t 2000 --random=100
Glimmer Effect
blink1-tool --rgb=0,0,255 --glimmer=10
Chase (Multi-LED mk2+)
blink1-tool --chase
blink1-tool --chase=5,3,18
Patterns
Pattern String Format
count,color,fade,delay,color,fade,delay,...
blink1-tool --playpattern '10,#ff00ff,0.1,0,#00ff00,0.1,0'
blink1-tool --writepattern '5,#ff0000,0.3,0.1,#000000,0.3,0.1'
blink1-tool --savepattern
Pattern Management
blink1-tool --clearpattern
blink1-tool --savepattern
blink1-tool --readpattern
blink1-tool --play 1,0
blink1-tool --playstate
Multi-Device & Multi-LED
Device Selection
blink1-tool --list
blink1-tool -d all --rgb=ff0000
blink1-tool -d 0,2 --rgb=00ff00
LED Selection (mk2+)
blink1-tool --led=2 --rgb=FF9900
blink1-tool --ledn 1,3,5,7
Device Setup (Linux)
blink1-tool --add_udev_rules
Options Summary
| Option | Purpose |
|---|
-d <ids> | Device IDs (from --list) |
-l <led> | LED number: 0=all, 1=top, 2=bottom |
-m <ms> | Fade time (default 300ms) |
-t <ms> | Delay between events (default 500ms) |
-g | Disable gamma correction |
-b <0-255> | Brightness (0=real, 1-255 scaled) |
-q | Quiet (mute output) |
-v | Verbose debug |
Troubleshooting
No Device Found
blink1-tool --list
Permission Denied (Linux)
blink1-tool --add_udev_rules
sudo blink1-tool --list
sudo groupadd plugdev
sudo usermod -a -G plugdev $USER
udev Rules 与 plugdev 组的关系
取决于 udev rules 怎么写的:
grep -r "27b8" /etc/udev/rules.d/ 2>/dev/null
cat /etc/udev/rules.d/51-blink1.rules
| udev 写法 | 是否需要 plugdev |
|---|
GROUP="plugdev", MODE="0664" | ✅ 必须 |
MODE="0666" | ❌ 理论不需要(但实际可能仍需要) |
TAG+="uaccess" | ❌ 不需要(推荐现代写法) |
注意:即使 MODE="0666",某些发行版/配置仍要求用户在 plugdev 组。遇到权限问题,先尝试加入组。
推荐:用 TAG+="uaccess" 替代 GROUP 写法:
ATTRS{idVendor}=="27b8", ATTRS{idProduct}=="01ed", TAG+="uaccess"
uaccess 是 systemd/logind 的动态授权机制,当前登录用户自动获得设备权限。
验证设备权限
lsusb | grep -i blink
ls -la /dev/bus/usb/001/005
Common Mistakes
| Issue | Fix |
|---|
| Device not detected on Linux | Run --add_udev_rules, replug |
| Blink timing wrong | Put --blink LAST: --rgb X --blink N |
| Pattern blocks terminal | Pattern runs in blink1-tool - use background |
| Hex without # works | Both #FF9900 and FF9900 valid |
| mk2+ features on mk1 | LED selection, savepattern require mk2+ |
| Multiple devices conflict | Use -d 0 or -d all to specify target |
| Color looks washed out | Try -g to disable gamma correction |