EH-MA41 User Guide
25-26
Ex. 5.100. To set the Throttle to 5, Left X to -2, Left Y to 3, Right X to 2, Right Y to -5, the joystick report should be:
A1 04 05 FE 03 02 FB 08 00 00
Throttle = 05h = 5
(Decimal)
X = Left X = FEh = -2
(Decimal)
Y = Left Y = 03h = 3
(Decimal)
Z = Right X = 02h = 2
(Decimal)
Rz = Right Y = FBh = -5
(Decimal)
HatSwitch = 08 = No movement
Buttons1 = 00h = No button be pressed.
Buttons2 = 00h = No button be pressed
Ex. 5.101. To set the Throttle to -10, Button2, Button3 and Button 15 pressed, Hat Switch to Bottom-left, the joystick
report should be:
A1 04 F6 00 00 00 00 05 06 40
Throttle = F6h = -10
(Decimal)
X = Left X = 00h = 00
(Decimal)
Y = Left Y = 00h = 00
(Decimal)
Z = Right X = 00h = 00
(Decimal)
Rz = Right Y = 00h = 00
(Decimal)
HatSwitch = 05 = Bottom-left
Buttons1 = 06h = Button2 and Button3 be pressed.
Buttons2 = 40h = Button15 be pressed
Ex. 5.102. To send a joystick/gamepad report to HID host:
AT+KR=A1,04,05,FE,03,02,FB,08,00,00<CR><LF>
send a
joystick/gamepad
report to the HID host.
OK<CR><LF>
response from the module to indicate the command is adopted.
AT+KR=A1,04,F6,00,00,00,00,05,06,40<CR><LF>
send a joystick/gamepad report to the HID host.
OK<CR><LF>
response from the module to indicate the command is adopted.
AT+KR=A1,04,00,00,00,00,00,08,00,00<CR><LF>
send a
joystick/gamepad
report to the HID host.
OK<CR><LF>
response from the module to indicate the command is adopted.
5. User Defined Report:
A1 FF Length D1 D2 D3 D4
………… Dn
The
Length
is the length of report data in byte.
The
D1, D2, D3,
D4,……,Dn
are the report data, here
n
equal to the
Length
.
Ex. 5.103. If a user defined report has 10 report data, the report should be:
A1 FF 0A 01 02 03 04 05 06 07 08 09 0A
Length = 0Ah = 10
(Decimal)
Report data = 01 02 03 04 05 06 07 08 09 0A
Note:
1. For Bypass mode, the Length can up to FFh(255 in decimal), while for Proxy mode, the maximum Length is 55h(85
in decimal).
5.3.5. AS
—Send ASCII string to remote HID host
5.3.5.1. Description:
This command is used to send an ASCII string to the remote HID host.
5.3.5.2. Syntax:
Synopsis:
AT+AS{=AsciiStr}<CR><LF>
5.3.5.3. Parameter Description: