Author Topic: Turning HM-10, HM-11 into Bluetooth HID modules  (Read 31953 times)

0 Members and 1 Guest are viewing this topic.

Offline congia

  • Thread Starter
  • Posts: 17
  • Location: Australia
Turning HM-10, HM-11 into Bluetooth HID modules
« on: Thu, 28 August 2014, 02:14:44 »
Hey guys, so a while ago, I started working on a HID bridge using Texas Instruments CC2540/1 Bluetooth Low Energy chip, which is used on the HM-10 and HM-11. I have briefly tested the firmware by sending a spacebar and move the mouse a bit in an awfully shaped circle (badly calculated lookup table) when a button is pressed and it worked out well for a HM-10 CC2541 module I have.

The up point about using this is that it saves cost in the long term since these HM-10, HM-11 would only cost $7 instead of $30+ on pre-made HID modules. The source code is available on GitHub and there are pre-compiled HEX files for: PC to enter pair key or user to type in pair key for both CC2540 and CC2541 modules. HM-10 and HM-11 pretty much switched to CC2541 these days. I used "HM-10_CC2541_DisplayOnly.hex" for testing so that one should work.

Anyway, the project is available at https://github.com/rampadc/cc2540-hidKbdM. I couldn't work on the project much longer since I only have a tablet that can use Bluetooth 4.0 and it doesn't play nice with Bluetooth mouse so it's very hard to test.

I hope you guys find it useful.

Offline Matt3o

  • -[_]-
  • ** Robot Emeritus
  • Posts: 3547
  • Location: Italy
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #1 on: Thu, 28 August 2014, 02:28:36 »
this is very interesting! sooner or later I have to build a BT keyboard.

thanks for sharing.

Offline Hundrakia

  • Posts: 172
  • Location: Northwest Territories, Canada
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #2 on: Thu, 28 August 2014, 11:28:00 »
Did you program it with a cc debugger?

Offline congia

  • Thread Starter
  • Posts: 17
  • Location: Australia
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #3 on: Thu, 28 August 2014, 11:28:44 »
Yes

Offline Hundrakia

  • Posts: 172
  • Location: Northwest Territories, Canada
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #4 on: Thu, 28 August 2014, 11:30:11 »
Oh OK. I was neck deep in the CC2541 the last few months as well, but it just isn't fun without programming the unit in the real world. Also, mine got fried so I need a new one xD

Offline congia

  • Thread Starter
  • Posts: 17
  • Location: Australia
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #5 on: Thu, 28 August 2014, 11:37:06 »
Oh OK. I was neck deep in the CC2541 the last few months as well, but it just isn't fun without programming the unit in the real world. Also, mine got fried so I need a new one xD

The last few months? You're probably running on a full license version of IAR. That's pretty awesome. I found the whole experience quite unpleasant because of the 30-day evaluation thing but I couldn't be bother investing on a Nordic kit. There are also very cheap nrf51822 on eBay that could be turned into HID bridges.

Offline Hundrakia

  • Posts: 172
  • Location: Northwest Territories, Canada
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #6 on: Thu, 28 August 2014, 11:44:39 »
I haven't used avr the whole time. Dabbled in open source stuff. I needed i2c, and as far as I could find the 2541 fit the bill

Offline futaris

  • Posts: 3
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #7 on: Wed, 17 September 2014, 19:44:44 »
CC2541 Bluetooth V4.0 HM-11 BLE Module is only $12.90.
nRF51822 Seeed Micro BLE Module is only $16.90, and supports upgrading over the air.
« Last Edit: Wed, 17 September 2014, 19:50:29 by futaris »

Offline Hundrakia

  • Posts: 172
  • Location: Northwest Territories, Canada
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #8 on: Wed, 17 September 2014, 19:48:21 »
Nice!

Offline congia

  • Thread Starter
  • Posts: 17
  • Location: Australia

Offline congia

  • Thread Starter
  • Posts: 17
  • Location: Australia
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #10 on: Thu, 18 September 2014, 13:00:13 »
Feature Request: LED Indicators for Fn and Fn2 Layers
...for when you get the time after sorting the home purchase!

For the JD40 and the GH36 (and other boards where possible) please enable the following logic for unused pins:

When the "Fn layer" is active (via key-down, locking key down, software "lock" or otherwise) bring PD4 high to enable an LED to light.

When "Fn2 layer" is active (via key-down, locking key down, software "lock" or otherwise) bring PD5 high to enable an LED to light.

These two pins on the Teensy are on the end, and unused by both the JD40 and GH36, and are both physically simple to access.  They are unpinned when a "Teensy with Pins" is purchased, and so are very easy to use.  Also, since they are normally unused, this additional logic will have no impact on users not seeking this enhancement.

Thanks in advance!

 - Ron | samwisekoi

I think you're replying to the wrong thread.

Offline samwisekoi

  • MAWG since 1997
  • * Administrator
  • Posts: 2480
  • Location: Mt. View, California
  • Sorry, moving houses. Be back ASAP.
    • Tweet samwisekoi
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #11 on: Thu, 18 September 2014, 16:58:06 »
Yup.  Sorry!
I like keyboards and case modding.  Everything about a computer should be silent -- except the KEYBOARD!

'85 IBM F-122/Soarer Keyboard |  Leopold FC200 TKL (Browns) + GH36 Keypad (Browns/Greens) | GH-122 (Whites/Greens) with Nuclear Data Green keycaps in a Unicomp case

Offline Hundrakia

  • Posts: 172
  • Location: Northwest Territories, Canada
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #12 on: Wed, 29 October 2014, 22:24:47 »
I finally ordered a Realtag BLE sensor, it's based off of a CC2541, I'll let you guys know how well it pans out. 


Offline congia

  • Thread Starter
  • Posts: 17
  • Location: Australia
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #13 on: Sun, 02 November 2014, 01:48:37 »
I finally ordered a Realtag BLE sensor, it's based off of a CC2541, I'll let you guys know how well it pans out.

BLE device with sensors? That's an overkill for a HID keyboard & mouse combo :eek:

Offline Hundrakia

  • Posts: 172
  • Location: Northwest Territories, Canada
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #14 on: Sun, 02 November 2014, 08:46:46 »
I finally ordered a Realtag BLE sensor, it's based off of a CC2541, I'll let you guys know how well it pans out.

BLE device with sensors? That's an overkill for a HID keyboard & mouse combo :eek:
Overkill like a fox.

Offline DamonHong

  • Posts: 1
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #15 on: Fri, 24 April 2015, 00:07:22 »
Write successfully in the HM-10 "HM-10_CC2541_DisplayOnly.hex" file , I used CC-Debugger with SmatRF Flash Programmer.
after that, when I plug in USB into my PC, it is unknow divece.
Should I install something else?
Or, did I do something wrong?
Please help me.

Offline congia

  • Thread Starter
  • Posts: 17
  • Location: Australia
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #16 on: Fri, 24 April 2015, 04:24:03 »
The firmware doesn't support USB.

Offline joric

  • Posts: 104
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #17 on: Wed, 03 June 2015, 18:35:28 »
This is so cool! Is it possible to get rid of arduino altogether and make your own bluetooth controller for (HHKB) any keyboard using only hm-10 microcontroller and its GPIO ports? (HHKB only uses 9 pins for data - 3 pins for row, 3 pins for column, 3 for flags, and vcc may be adjusted by a level converter.)

Offline congia

  • Thread Starter
  • Posts: 17
  • Location: Australia
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #18 on: Wed, 03 June 2015, 20:49:21 »
Yup, it's possible. You just have to program the chip

Offline joric

  • Posts: 104
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #19 on: Sun, 21 February 2016, 13:05:16 »
Recently got Varmilo VB87M from Massdrop, very nice Bluetooth 4.0 keyboard. Well, for starters there is a whole bunch of Comic Sans branded accessories - a Comic Sans branded key puller and a Comic Sans branded mini-usb cable (totally worth it). But there's also a nasty problem with the insert key LED, it's used as power LED, always turned on and it annoys the hell out of ya. I'm thinking if Varmilo allegedly uses HM-10 or HM-11 controller maybe it's possible to write a custom firmware for it, that would turn off that ****ing LED after a few seconds (the keyboard is fully illuminated but the insert LED totally leads its own life). Is it even possible? What should I do first? Is it necessary to buy a CC debugger box to flash the new firmware into that bt 4.0 module? Are there any specs for that keyboard?

Upd: Found the manual here https://fccid.io/document.php?id=2812037

"The chipset for Varmilo is BLE NRF51822 from Nordic. The chipset is integrated with one ARM Cortex-M0 32-bit core which has obvious advantages of low power consumption, high performance, high stability and long-distance transmission."

It's rather cheap as figures, about $5 on ebay ($1.5 the chip itself) but you'd probably need a devkit from Nordic. Seems like a good alternative for HM-10(11). In addition, it supports firmware update over the air and doesn't need a CC debugger.
There's even a firmware dumping manual for that thing http://blog.includesecurity.com/2015/11/NordicSemi-ARM-SoC-Firmware-dumping-technique.html
And developer software is also available for downloading (since 2015 or so) http://developer.nordicsemi.com
Someone already develops a controller based on the Nordic chip https://geekhack.org/index.php?topic=62667.msg2039131
« Last Edit: Mon, 28 March 2016, 05:14:56 by joric »

Offline joric

  • Posts: 104
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #20 on: Thu, 10 November 2016, 09:45:05 »
Tried flashing HM-10 with Arduino and CCLoader (see http://forum.arduino.cc/index.php?topic=393655.0).
The process is very simple. Connected as here:



Flashed CCLoader.ino onto Arduino Pro Nano as described here http://forum.arduino.cc/index.php?topic=393655.0
Took compiled blobs from here https://github.com/rampadc/cc2540-hidKbdM
Converted hex to bin with http://hex2bin.sourceforge.net/
Flashed HID firmware as "CCLoader.exe 4 HM-10_CC2541_Experimental.bin 0".
Needless to say it's pretty fast, just a few seconds.

And it worked! Started announcing as "HID Keyboard & Mouse". Couldn't pair though (tried 000000 many times).
Provided CC2541hm10v540.bin works just fine (pairs, responds to AT commands).
HID firmware (all three of them) won't pair and won't respond to AT commands (announces fine though, so partially works).
Maybe because there's no extra quartz or something on this breakboard?
The chip itself marked as CC2541.

What may be the problem?

Bonus pics:





Program output with "CCLoader.exe 4 HM-10_CC2541_Experimental.bin 0":

Code: [Select]
Copyright (c) 2013 RedBearLab.com
CCLoader.exe version 0.5
Comport : COM4
Bin file: HM-10_CC2541_Experimental.bin
Device  : Default (e.g. UNO)

Comport open!
<Baud:115200> <data:8> <parity:none> <stopbit:1> <DTR:off> <RTS:off>

File open!
!!WARNING: File's size isn't the integer multiples of 512 bytes, and
           the last block will be filled in up to 512 bytes with 0xFF!
Block total: 228

Enable transmission...
Request sent already!
/********************************************************************/
* If there is no respond last for 3s, please press "Ctrl+C" to exit!
* And pay attention to :
*   1. The connection between computer and Arduino;
*   2. The connection between Arduino and CC2540;
*   3. Whether the device you using is Leonardo or not;
*   4. Other unexpected errors.
/********************************************************************/

Waiting for respond from Arduino...

Uploading firmware...

1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99  100  101  102  103  104  105  106  107  108  109  110  111  112  113  114  115  116  117  118  119  120  121  122  123  124  125  126  127  128  129  130  131  132  133  134  135  136  137  138  139  140  141  142  143  144  145  146  147  148  149  150  151  152  153  154  155  156  157  158  159  160  161  162  163  164  165  166  167  168  169  170  171  172  173  174  175  176  177  178  179  180  181  182  183  184  185  186  187  188  189  190  191  192  193  194  195  196  197  198  199  200  201  202  203  204  205  206  207  208  209  210  211  212  213  214
  215  216  217  218  219  220  221  222  223  224  225  226  227  228  Upload successfully!
File closed!
Comport closed!

Program output with "CCLoader.exe 4 CC2541hm10v540.bin 0":

Code: [Select]
Copyright (c) 2013 RedBearLab.com                                                                                                                                                               
CCLoader.exe version 0.5                                                                                                                                                                       
Comport : COM4                                                                                                                                                                                 
Bin file: CC2541hm10v540.bin                                                                                                                                                                   
Device  : Default (e.g. UNO)                                                                                                                                                                   
                                                                                                                                                                                               
Comport open!                                                                                                                                                                                   
<Baud:115200> <data:8> <parity:none> <stopbit:1> <DTR:off> <RTS:off>                                                                                                                           
                                                                                                                                                                                               
File open!                                                                                                                                                                                     
Block total: 512                                                                                                                                                                               
                                                                                                                                                                                               
Enable transmission...                                                                                                                                                                         
Request sent already!                                                                                                                                                                           
/********************************************************************/                                                                                                                         
* If there is no respond last for 3s, please press "Ctrl+C" to exit!                                                                                                                           
* And pay attention to :                                                                                                                                                                       
*   1. The connection between computer and Arduino;                                                                                                                                             
*   2. The connection between Arduino and CC2540;                                                                                                                                               
*   3. Whether the device you using is Leonardo or not;                                                                                                                                         
*   4. Other unexpected errors.                                                                                                                                                                 
/********************************************************************/                                                                                                                         
                                                                                                                                                                                               
Waiting for respond from Arduino...                                                                                                                                                             
                                                                                                                                                                                               
Uploading firmware...                                                                                                                                                                           
                                                                                                                                                                                               
1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  5
1  52  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  9
9  100  101  102  103  104  105  106  107  108  109  110  111  112  113  114  115  116  117  118  119  120  121  122  123  124  125  126  127  128  129  130  131  132  133  134  135  136  137
 138  139  140  141  142  143  144  145  146  147  148  149  150  151  152  153  154  155  156  157  158  159  160  161  162  163  164  165  166  167  168  169  170  171  172  173  174  175  1
76  177  178  179  180  181  182  183  184  185  186  187  188  189  190  191  192  193  194  195  196  197  198  199  200  201  202  203  204  205  206  207  208  209  210  211  212  213  214
  215  216  217  218  219  220  221  222  223  224  225  226  227  228  229  230  231  232  233  234  235  236  237  238  239  240  241  242  243  244  245  246  247  248  249  250  251  252 
253  254  255  256  257  258  259  260  261  262  263  264  265  266  267  268  269  270  271  272  273  274  275  276  277  278  279  280  281  282  283  284  285  286  287  288  289  290  29
1  292  293  294  295  296  297  298  299  300  301  302  303  304  305  306  307  308  309  310  311  312  313  314  315  316  317  318  319  320  321  322  323  324  325  326  327  328  329
 330  331  332  333  334  335  336  337  338  339  340  341  342  343  344  345  346  347  348  349  350  351  352  353  354  355  356  357  358  359  360  361  362  363  364  365  366  367  3
68  369  370  371  372  373  374  375  376  377  378  379  380  381  382  383  384  385  386  387  388  389  390  391  392  393  394  395  396  397  398  399  400  401  402  403  404  405  406
  407  408  409  410  411  412  413  414  415  416  417  418  419  420  421  422  423  424  425  426  427  428  429  430  431  432  433  434  435  436  437  438  439  440  441  442  443  444 
445  446  447  448  449  450  451  452  453  454  455  456  457  458  459  460  461  462  463  464  465  466  467  468  469  470  471  472  473  474  475  476  477  478  479  480  481  482  48
3  484  485  486  487  488  489  490  491  492  493  494  495  496  497  498  499  500  501  502  503  504  505  506  507  508  509  510  511  512  Upload successfully!                       
File closed!                                                                                                                                                                                   
Comport closed!                                                                                                                                                                                 

Slightly related (uploading HID firmware onto nrf51822): https://geekhack.org/index.php?topic=40514.msg2244694#msg2244694

Upd: rebuilt with IAR Embedded Workbench for 8051 9.30 + BLE-stack v1.4.0 (http://pastebin.com/zRcQV6Yw), now it pairs but UART still doesn't work.

Maybe my module isn't HM-10 but rather BLE-CC41-A, a HM-10 rip off (wihout a second quartz) and that's why UART won't start with a standard firmware.
« Last Edit: Sun, 13 November 2016, 08:14:49 by joric »

Offline a-c

  • Posts: 196
  • Location: USA
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #21 on: Fri, 11 November 2016, 14:10:51 »
Those bluetooth modules run at 3.3v. If your Arduino is running at 5v you may have burned up the ports on the module. The carrier board drops the voltage, but you are connecting directly to those data pins.

Offline joric

  • Posts: 104
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #22 on: Fri, 11 November 2016, 20:48:00 »
FIXED! Yes, it was UART settings. BLE-CC41-A needs HAL_UART_ISR to be set to 2 (was 1).

To build firmware, use IAR Embedded Workbench for 8051 9.30 + BLE-stack v1.4.0.

IAR Embedded Workbench for 8051 is here: https://www.iar.com/iar-embedded-workbench/#!?device=CC2541F128&architecture=8051
BLE-stack 1.4.0 is here: http://www.ti.com/tool/BLE-STACK-ARCHIVE

Copy cc254x-hidKbdM folder from https://github.com/rampadc/cc2540-hidKbdM to C:\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\cc254x-hidKbdM

Open project cc254x-hidKbdM\CC2541DB\HIDKbdMouse.eww in IDE.

Edit project options as here:



(Haven't changed anything here except HAL_UART_ISR=2. It finally worked.)

To fix compilation errors (identifier "bStatus_t" is undefined), add #include "gatt.h" to the KBD_report.h, after #include "hal_types.h".

It doesn't pair with mobile devices for some reason. To fix it, set DEFAULT_IO_CAPABILITIES to GAPBOND_IO_CAP_NO_INPUT_NO_OUTPUT.

Then build it, convert intel hex to bin with http://hex2bin.sourceforge.net and upload via Arduino Nano with CCLoader sketch, as described above.

I used command line "CCLoader.exe 4 HM-10_CC2541_Experimental.bin 0" for COM4.

Mind that a new firmware is really quiet, so it's rather tricky to check it out after uploading.

Use standard RX/TX pins (from the module, aka voltage dividing board) via USB-TTL adapter.



I used serial monitor from Arduino IDE. Connected at 57600 with CR & NL (README.md mentions 9600 but it's bull****, it's 57600 in the code).

It is in command mode by default. Try commands S,S and S,A, it's the only commands that output something (SLEEP and ACTIVE accordingly):



Then pair it to the computer with pin 000000:



Then enter command mode - type $$$+enter and then any string (I used 123+enter, it should go into an endless loop of typing, which is kind of fun, considering it works):



All other commands are described in README.md:

Code: [Select]
The device operates in 2 modes: command mode and translation mode.

 - If 3 consequence @'s, ie. @@@ is sent, put device into command mode
 - If 3 consequent $'s, ie. $$$ is sent, put device into translation mode

In command mode, the device parse commands sent by the host that are followed by
a CR or LF character. The list of commands implemented is listed below:
+ KU[value]: a key is released with an 8-bit value that corresponds to a HID keycode
+ KD[value]: a key is pressed with an 8-bit value that corresponds to a HID keycode
+ M[status][X][Y][Z]: sending mouse buttons and mouse coordinates
+ KUPDATE: send report to host
+ S,R: reset the device
+ S,DC: disconnect from host
+ SN,[value]: change scan response data's string and device name. [value] must be less
than 20 characters long. Restart device to see changes.

I probably should rewrite the code, make it respond to AT commands and maybe make a necessary and sufficient RN-42 clone with BT 4.0, it would be extremely useful for power saving. I think it could replace that RN-42 module on the Hasu HHKB Alt Controller and drastically improve battery life of this board (hi, Hasu!). But maybe later. Cheers.

Mandatory 1-key keyboard, now with Bluetooth 4.0:



Keyboard sketch is here: http://pastebin.com/JyE02qjS

Full album is here: http://imgur.com/a/KWmz6

Updated firmware is here: http://pastebin.com/zRcQV6Yw

P.S. I would be really glad to see more people making their projects using this chip. It's way cheaper and easier than dealing with nrf51822 and (I'm pretty sure) could be programmed to handle a keyboard matrix with its 20 GPIO pins without an external MCU. Looking forward to more CC2541/8051-based projects.
« Last Edit: Fri, 18 November 2016, 11:15:00 by joric »

Offline eyahlin

  • Posts: 1
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #23 on: Mon, 19 December 2016, 04:21:10 »
Good work, Joric! I have successfully implemented this and it works well under Android.  :) However, in iOS, the keystrokes are only sent when the focus is inside a text field. Is there a way to send keystrokes anytime?

[EDIT] I've discovered that there is a need to toggle the IOS virtual keyboard, as has been done in Adafruit EZ-Keys (https://cdn-learn.adafruit.com/downloads/pdf/introducing-bluefruit-ez-key-diy-bluetooth-hid-keyboard.pdf). Is there a similar way to do this for HM-10?
« Last Edit: Mon, 19 December 2016, 10:56:34 by eyahlin »

Offline Laspi

  • Posts: 1
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #24 on: Sun, 22 January 2017, 14:28:15 »
I'm not an expert, just started to learn to work on the Arduino and BLE.
I have the Uno R3 CH340G / ATmega328p, analogue Arduino UNO R3 and Bluetooth 4.0 CC41-A firmware V 3.0.6 on the CC2541 chip production "Bolutek Technology Co., Ltd".
I flashed my BLE file CC2541hm10v540.bin using Arduino UNO R3 and Ccloader.exe, BLE is working properly.
I try to flash your firmware HM-10_CC2541_Experimental.hex, Bleu after the firmware does not work, the LED is lit, not blinking, not responding to AT commands, the air does not work. Sewn back CC2541hm10v540.bin LED is blinking, it works. I know that the firmware needs TTL 3,3v, but Arduino UNO 5v and well sews CC2541hm10v540.bin and everything works.
Please tell me I'm wrong? When converting from hex to BIN need to install additional options keys? Please if you can  to put the firmware in BIN format. Thank you very much, will be useful  any information that your have  for the BLE. 

My BLE https://ru.aliexpress.com/store/product/Bluetooth-4-0-For-Arduino-Android-IOS-HM-10-BLE-CC2540-CC2541-Serial-Wireless-Module/1735233_32643587691.html?detailNewVersion=&categoryId=400103
« Last Edit: Sun, 22 January 2017, 14:33:31 by Laspi »

Offline kyneproxchair

  • Posts: 1
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #25 on: Sun, 13 August 2017, 14:00:47 »
Hi all, i have flashed the last versione of the experimental firmware for the hm-10, i can see it like HID device, i can connect (without pin?!?), but how can i issue command e.g. when a button is pressed?? how can i change name and type to HID Gamepad? Thanks to all and sorry for my not so well english

Offline sria91

  • Posts: 1
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #26 on: Tue, 28 November 2017, 22:38:00 »
How do I change the name of the hm10 module?

Offline onlyfly34

  • Posts: 1
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #27 on: Sat, 02 December 2017, 02:29:19 »
I flashed my HM-10 with the newest HID firmware provided above. My Windows10 PC can scan the HM-10 but my PC generates PIN code automatically. After that, pairing with HM-10 fails. Is there any solution? I try to figure this for so long......

Offline pseudolobster

  • Posts: 33
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #28 on: Sat, 16 December 2017, 12:54:10 »
[...] after the firmware does not work, the LED is lit, not blinking, not responding to AT commands, the air does not work. Sewn back CC2541hm10v540.bin LED is blinking, it works. I know that the firmware needs TTL 3,3v, but Arduino UNO 5v and well sews CC2541hm10v540.bin and everything works.
Please tell me I'm wrong? When converting from hex to BIN need to install additional options keys? Please if you can  to put the firmware in BIN format. Thank you very much, will be useful  any information that your have  for the BLE. 

Sounds like it's working. It doesn't respond to AT commands, it responds to @@@, KD(scancode), KUPDATE, KU(scancode), KUPDATE. This will send a keypress and key release. The LED is blinking very quickly, hundreds of times per second. Most of these seem to be fine with 5v, but your results may vary. Attached is a bin version of Joric's firmware in case anyone needs it.

Hi all, i have flashed the last versione of the experimental firmware for the hm-10, i can see it like HID device, i can connect (without pin?!?), but how can i issue command e.g. when a button is pressed?? how can i change name and type to HID Gamepad? Thanks to all and sorry for my not so well english

The commands to send keys are documented above. To change this to a gamepad you'll need to completely rewrite the source code of the firmware. It currently only works as a keyboard and mouse, and even that's a bit limited. It doesn't support modifier keys or volume keys for example.


How do I change the name of the hm10 module?

This is in the documentation. Send "SN,Your New Name" in command mode.

I flashed my HM-10 with the newest HID firmware provided above. My Windows10 PC can scan the HM-10 but my PC generates PIN code automatically. After that, pairing with HM-10 fails. Is there any solution? I try to figure this for so long......

I've encountered this error too. I think it's because the internal UART port is different on clones vs real modules. OP's firmware works when the internal UART port is 1, Joric's firmware is for boards with a UART port of 2.

So, I don't know if anyone can help me with this, but I've tried compiling the firmware according to Joric's instructions. Interestingly, under project options, the UART port is already set to 2, but when I compile it and flash it to my module, it shows up as "Unknown" or "Keyboard" instead of "HID Keyboard & Mouse", and pairing it asks you to type a pin, which it immediately rejects. Joric's compiled hex file works fine, shows up as "HID Keyboard & Mouse", doesn't ask for a pairing code, works just fine.

When I'm compiling it, I get 3 warnings. Two are just functions that are never used, but one says: "Warning[w52]: More than one definition for the byte at address 0x6b in common segment INTVEC. It is defined in module "hidKbdMouse" as well as in module "hal_key"

I'm not really sure what to make of that, but I'd like to figure it out since I wouldn't mind adding functionality to this, like implementing the Consumer Device profile which will allow for media buttons etc. I'm not sure if the warning is significant, or why my UART is set to 2 by default, but if anyone has any ideas I'd love to hear them!

Offline romandesign

  • Posts: 1
  • Location: Toronto
    • Roman Design
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #29 on: Fri, 22 December 2017, 14:07:10 »
Would it work with AT-09 module? It says it's similar to HM-10. If yes, what do I have to do exactly - take the "updated firmware" and flash it to AT-09 through CCLoader? That's it? Or would I have to go through the complicated compile etc. above? Sorry for noob questions, I'm just starting with that... Also, does it work with Android 6/7? My goal is to build Android air mouse for controlling the phone. So I need HID BT interface...

Offline pseudolobster

  • Posts: 33
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #30 on: Sat, 23 December 2017, 01:27:44 »
I haven't looked into the AT-09, but it does have the same CC2541 chip, which should run the same firmware. A brief google search seems to show other people have flashed genuine HM-10 firmware to an AT-09, so that's a good start.

I'm fairly sure you'll be able to flash this firmware to your device. Whether it will work or not probably depends on what the ID of the internal serial port number is, 1 or 2. Genuine HM-10's seem to run on port 1, whereas mine and OPs seem to run on port 2.

Only way to know is to flash it. If it fails, you will brick your module unless you have another firmware handy to flash back. If you can flash it once to brick it, you ought to have no problem flashing it back to unbrick. No idea what the availability of that firmware is, or if you could backup your existing, but if all else fails it sounds like the genuine HM-10 firmware might be an option.


Offline Acronis95

  • Posts: 1
Re: Turning HM-10, HM-11 into Bluetooth HID modules
« Reply #31 on: Tue, 27 March 2018, 18:22:50 »
Hi guys just asking if anyone has managed to program the cc2541 using a couple of the gpio as well as the ble his firmware?