You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

RN-42 HID模式切换咨询:从键盘模式转为鼠标模式

Switching RN-42 from HID Keyboard to Mouse Mode When Locked Out of Terminal

Hey there! I’ve tackled this exact problem with RN-42 Bluetooth modules before—getting stuck in HID keyboard mode and losing access to the serial terminal feels frustrating, but there’s a straightforward way to get back into command mode and switch to mouse mode. Here’s what you need to do:

Step 1: Trigger Command Mode

Even when the RN-42 is in HID mode, you can still enter command mode by sending three consecutive +++ (plus signs) over the serial connection. A few key notes here:

  • Send the +++ without any leading/trailing characters or delays—type them as quickly as possible in your serial terminal.
  • Make sure your serial tool is set to the RN-42’s default parameters: 9600 baud, 8 data bits, no parity, 1 stop bit (8N1), no flow control.
  • Try sending this right after powering on the module, or after disconnecting any paired Bluetooth device (to avoid HID traffic interfering).

Step 2: Verify Command Mode

Once you send +++, the module should respond with CMD in the terminal. This confirms you’re in command mode and can send configuration commands.

Step 3: Switch to HID Mouse Mode

Send the command to set the HID profile to mouse:

SH,2
  • SH stands for "Set HID Profile"
  • 2 is the code for mouse mode (1 is keyboard, 3 is consumer control, etc.)

The module will reply with AOK if the command is accepted.

Step 4: Save the Setting (Critical!)

To make the change permanent (so it persists after reboot), send the save command:

WR

You’ll get another AOK response, and the module will restart automatically. After reboot, it will now operate as an HID mouse.

Troubleshooting Tips

  • If +++ doesn’t trigger CMD, try power-cycling the module and sending the sequence immediately after power-up—this avoids any ongoing HID data that might block the command.
  • Double-check your wiring: Arduino Micro’s TX pin should connect to RN-42’s RX pin, and Arduino’s RX to RN-42’s TX (crossed wiring is essential for serial communication).
  • If you previously changed the RN-42’s baud rate, adjust your serial tool to match that rate instead of the default 9600.

内容的提问来源于stack exchange,提问作者nachomcapella

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 10:03:49