Author Topic: Integrating Bluetooth into a custom keyboard?  (Read 10442 times)

0 Members and 1 Guest are viewing this topic.

Offline kurplop

  • THE HERO WE DON'T DESERVE
  • Thread Starter
  • Posts: 992
Integrating Bluetooth into a custom keyboard?
« on: Sat, 05 August 2017, 17:18:51 »
I am finishing up a keyboard for tablet use and am bothered by the need for the USB cable. I will be building several new keyboards soon, similar to the "Gimp" https://geekhack.org/index.php?topic=90499.0 using the fairly new Kailh 1350 low profile switches but would like to have them connected via Bluetooth. I have seen a few keyboards that had Bluetooth capabilities added to them but they are surprisingly rare.  Some purists may complain about issues related to wireless connections but they seem minor compared to the benefits, especially for a small portable keyboard.

The how-to's I've read on the subject have lost me when they start talking about programming (something I have no knowledge of). I'm wondering what groundwork has been laid on this subject, can existing firmware be used with wireless, and is there anyone out there interested in helping me develop a wireless custom keyboard.


Offline pkircher

  • Posts: 124
  • Location: UK
Re: Integrating Bluetooth into a custom keyboard?
« Reply #1 on: Sat, 05 August 2017, 19:11:43 »
BT is hard .. makeing it sane is even way harder everyone telling you different has no idea

there is no bt-le hid over gatt implementation .. there arent many open bt stacks at all .. in fact just one ..

batterie management is the next problem because you have not unlimited power via a lipo
smart interrupt handlings .
having sleep modes for the mcu is crucial
 antenna is the next problem unless you use a fed up modul that you need to solder on with a big footprint
.. next problem how to charge the lipo / what manage the power ?! 
lipo empty = keyboard is useless unless you have other means to ..

everyone telling you a coincell is good enough . has not done any serious load testing / current draw mesurements

so you ether have a huge stacksize with a solderd piece of garbage and a extra receiver (example miosis ) or endure and wait.

if you are on the gh irc feel free to pm he there and i can elaborate on what im working on that regards. ( its a little to early for the global announcements/ + that is still r&d till q1/q2 2018)

99.9% of the current bt solutions are half assed or just crappy implemented. propper hid stack for gatt is required and thats 1-2 moths worth of firmware dev on its own .. not to speak about SIG acceptance testing / getting it bt certified
« Last Edit: Sat, 05 August 2017, 19:28:34 by pkircher »

Offline kurplop

  • THE HERO WE DON'T DESERVE
  • Thread Starter
  • Posts: 992
Re: Integrating Bluetooth into a custom keyboard?
« Reply #2 on: Sat, 05 August 2017, 22:09:18 »
Thanks for the response although I only understand about a third of the points you're making.  The one Bluetooth mod I personally saw was a HHKB outfitted with bluetooth based on Hasu's design and he seemed to have it working fine.

Thanks for the offer to further elaborate on your work. I may PM you soon.


 


Offline pkircher

  • Posts: 124
  • Location: UK
Re: Integrating Bluetooth into a custom keyboard?
« Reply #3 on: Sat, 05 August 2017, 22:17:05 »
y hasus design uses 1 of those modues where you need an external mcu .. . so unless you manufacture a board .. you are stuck to say a teensy a other breakout a lipo charger and what not ..

still doesnt give you usb in that regard ..

+ the lipo might hold 24h if lucky .. because it drains ALOT power in scanning

Offline kurplop

  • THE HERO WE DON'T DESERVE
  • Thread Starter
  • Posts: 992
Re: Integrating Bluetooth into a custom keyboard?
« Reply #4 on: Sat, 05 August 2017, 23:04:54 »
pkircher  Building a keyboard case and PCB with enough room to house the modules wouldn't be a problem for me.

What features does a keyboard like the Apple wireless implement to allow its common AA batteries to last so long?

Would something as inelegant as a manual power switch be adequate for power conservation or does even the short pauses between typing drain a significant amount of power from the batteries?

Is it possible to have both Bluetooth and USB connections or would one be exclusive of the other?

Thanks for your input.

Offline pomk

  • Posts: 470
  • Location: Finland
Re: Integrating Bluetooth into a custom keyboard?
« Reply #5 on: Sun, 06 August 2017, 03:04:00 »
What do you mean there is no hid over gatt profile? https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245141
All of the bt4+ stacks that I have seen support the client side of it.

As for kurplops question about battery life, the trick is to sleep the processor as much as humanly possible. Most kb firmwares use busy loops to waste time, which uses a lot of power to do nothing. Someone could make tmk/some other firmware more energy efficient quite easily, but there is close to zero need for it as long as you are connected via a cable.

For bt+usb combo implementation, there are currently no chips that would be very good at it. Someone is bound to paste some links here to devices that would allow you to make your usb keyboard into a bt one, but the battery life is awful in those.

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Integrating Bluetooth into a custom keyboard?
« Reply #6 on: Sun, 06 August 2017, 03:17:40 »
Do any of you gentlemen believe the BLEduino could be a starting point to develop a BT keyboard? The schematic is open source and available here for those interested.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline pomk

  • Posts: 470
  • Location: Finland
Re: Integrating Bluetooth into a custom keyboard?
« Reply #7 on: Sun, 06 August 2017, 03:44:06 »
Do any of you gentlemen believe the BLEduino could be a starting point to develop a BT keyboard? The schematic is open source and available here for those interested.
It is a three chip design, or at least looks like it. It is a lot more difficult to get good battery life out of that because of it.
If you just want bluetooth (no usb), use nrf51 or nrf52. If you want both, you need to figure it out yourself or wait for nrf52840 to be taken into production. Ti has some ble+usb chip, but it has too few pins to be used at least without some io expander stuff.

Offline Leslieann

  • * Elevated Elder
  • Posts: 4518
Re: Integrating Bluetooth into a custom keyboard?
« Reply #8 on: Sun, 06 August 2017, 04:00:33 »
You could use a normal keyboard and adapt bluetooth, it's been done and doesn't seem terribly hard, the problem is you need a charging system for the battery and a monitoring system. The other problem you will encounter will be battery life in a system like this. I discussed this before and the simplest way is to use a cell phone external battery. This has a common voltage to work from and a built in charge system.

Another option and this may be more practical in some ways and less in others is to cannibalize a cheap bluetooth keyboard already on the market. Everything you need is there, you just need to wire in the switches and build a case around it. The good part, you get a more efficient system and probably thinner one, however figuring out the wiring for the switches may be tough.

This would be my plan of attack because you can get these keyboards for $20 and comes in a nice compact package. I'm not saying it will be easy, but I think the end result would be better and doesn't require programming or dealing with battery issues. And if you fail, you're out $20 even if you can't re-assemble it.
Novelkeys NK65AE w/62g Zilents/39g springs
More
62g Zilents/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 magnetic cable, pic
| Filco MJ2 L.E. Vortex Case, Jailhouse Blues, heavily customized
More
Vortex case squared up/blasted finish removed/custom feet/paint/winkey blockoff plate, HID Liberator, stainless steel universal plate, 3d printed adapters, Type C, Netdot Gen10 magnetic cable, foam sound dampened, HK Gaming Thick PBT caps (o-ringed), Cherry Jailhouse Blues w/lubed/clipped Cherry light springs, 40g actuation
| GMMK TKL
More
w/ Kailh Purple Pros/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 Magnetic cable
| PF65 3d printed 65% w/LCD and hot swap
More
Box Jades, Interchangeable trim, mini lcd, QMK, underglow, HK Gaming Thick PBT caps, O-rings, Netdot Gen10 magnetic cable, in progress link
| Magicforce 68
More
MF68 pcb, Outemu Blues, in progress
| YMDK75 Jail Housed Gateron Blues
More
J-spacers, YMDK Thick PBT, O-rings, SIP sockets
| KBT Race S L.E.
More
Ergo Clears, custom WASD caps
| Das Pro
More
Costar model with browns
| GH60
More
Cherry Blacks, custom 3d printed case
| Logitech Illumininated | IBM Model M (x2)
Definitive Omron Guide. | 3d printed Keyboard FAQ/Discussion

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Integrating Bluetooth into a custom keyboard?
« Reply #9 on: Sun, 06 August 2017, 04:01:33 »
Do any of you gentlemen believe the BLEduino could be a starting point to develop a BT keyboard? The schematic is open source and available here for those interested.
It is a three chip design, or at least looks like it. It is a lot more difficult to get good battery life out of that because of it.
I see, thanks.

If you just want bluetooth (no usb), use nrf51 or nrf52. If you want both, you need to figure it out yourself or wait for nrf52840 to be taken into production. Ti has some ble+usb chip, but it has too few pins to be used at least without some io expander stuff.
How about the HC-06? I ask this out of my complete ignorance about bluetooth antennas.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline pomk

  • Posts: 470
  • Location: Finland
Re: Integrating Bluetooth into a custom keyboard?
« Reply #10 on: Sun, 06 August 2017, 08:02:49 »
Hc-06 uses bt 2. It has a lot worse latency characteristics and power consumption when compared to bt 4+. That and it is unnecessarily a two chip solution.

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Integrating Bluetooth into a custom keyboard?
« Reply #11 on: Sun, 06 August 2017, 09:13:58 »
Hc-06 uses bt 2. It has a lot worse latency characteristics and power consumption when compared to bt 4+. That and it is unnecessarily a two chip solution.
Great. Thanks for your explaination.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline pkircher

  • Posts: 124
  • Location: UK
Re: Integrating Bluetooth into a custom keyboard?
« Reply #12 on: Sun, 06 August 2017, 09:21:50 »
What do you mean there is no hid over gatt profile? https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245141
All of the bt4+ stacks that I have seen support the client side of it.

As for kurplops question about battery life, the trick is to sleep the processor as much as humanly possible. Most kb firmwares use busy loops to waste time, which uses a lot of power to do nothing. Someone could make tmk/some other firmware more energy efficient quite easily, but there is close to zero need for it as long as you are connected via a cable.

For bt+usb combo implementation, there are currently no chips that would be very good at it. Someone is bound to paste some links here to devices that would allow you to make your usb keyboard into a bt one, but the battery life is awful in those.

the stacks you'v seen expose the header files and are blackboxes .. as i sayed there is exactly 1 opensource bt le 4/5 stack thats it ..

the nordic/ti/nxp sdk's/softdevices are deployed binarys. pretty much near to to possibility to get a propper nkro implemeneted . let alone licence conflicts

usb+bt4.2/5 is the nrf52840 but production starts q1/2018 i use them in my stuff - https://puu.sh/wSGtr/eef31e019d.png

yet the pack makes it nearly impossible for a small hobbist to place them reliable without a bga reball mashine with dual vision.

apart from that you will need to get the game right in terms of antenna design specialy if you want to be complient.

« Last Edit: Sun, 06 August 2017, 09:24:25 by pkircher »

Offline chuckdee

  • * Destiny Supporter
  • Posts: 1308
Re: Integrating Bluetooth into a custom keyboard?
« Reply #13 on: Sun, 06 August 2017, 10:32:39 »
Not sure what the issue is.  I have a JD45 with bluetooth, and it works perfectly well.

https://www.reddit.com/r/MechanicalKeyboards/comments/49tnkv/a_bluetooth_jd45/

You could ask him- he connected a Bluefruit EZ Key to the PCB of the JD45, and used a portable charger at 4500 mAh.  He's a pretty cool guy, so you could ask him more on reddit.

Offline pomk

  • Posts: 470
  • Location: Finland
Re: Integrating Bluetooth into a custom keyboard?
« Reply #14 on: Sun, 06 August 2017, 11:11:38 »
What do you mean there is no hid over gatt profile? https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245141
All of the bt4+ stacks that I have seen support the client side of it.

As for kurplops question about battery life, the trick is to sleep the processor as much as humanly possible. Most kb firmwares use busy loops to waste time, which uses a lot of power to do nothing. Someone could make tmk/some other firmware more energy efficient quite easily, but there is close to zero need for it as long as you are connected via a cable.

For bt+usb combo implementation, there are currently no chips that would be very good at it. Someone is bound to paste some links here to devices that would allow you to make your usb keyboard into a bt one, but the battery life is awful in those.

the stacks you'v seen expose the header files and are blackboxes .. as i sayed there is exactly 1 opensource bt le 4/5 stack thats it ..

the nordic/ti/nxp sdk's/softdevices are deployed binarys. pretty much near to to possibility to get a propper nkro implemeneted . let alone licence conflicts

usb+bt4.2/5 is the nrf52840 but production starts q1/2018 i use them in my stuff - https://puu.sh/wSGtr/eef31e019d.png

yet the pack makes it nearly impossible for a small hobbist to place them reliable without a bga reball mashine with dual vision.

apart from that you will need to get the game right in terms of antenna design specialy if you want to be complient.
The HID report for HID over GATT as defined by bluetooth.org states it as a 6kro report. If you plan on making some custom hid report supporting nkro, be prepared to write drivers for it as well or at least scrap wide compatibility. BTW, you can create custom services even with those black boxes.

As for the black box nature of things, I don't really care. If it works, it works.

Can you give some real world example on the problems of nordic's licencing scheme?

Not sure what the issue is.  I have a JD45 with bluetooth, and it works perfectly well.

https://www.reddit.com/r/MechanicalKeyboards/comments/49tnkv/a_bluetooth_jd45/

You could ask him- he connected a Bluefruit EZ Key to the PCB of the JD45, and used a portable charger at 4500 mAh.  He's a pretty cool guy, so you could ask him more on reddit.
So a massive (and tall) 4500 mAh battery and how many hours of typing? With a power optimized solution, that should be enough juice for almost 2 years of continuous typing. I find it a bit silly to have a larger battery for your keyboard than your phone while having less battery life.

Offline chuckdee

  • * Destiny Supporter
  • Posts: 1308
Re: Integrating Bluetooth into a custom keyboard?
« Reply #15 on: Sun, 06 August 2017, 11:53:55 »
What do you mean there is no hid over gatt profile? https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245141
All of the bt4+ stacks that I have seen support the client side of it.

As for kurplops question about battery life, the trick is to sleep the processor as much as humanly possible. Most kb firmwares use busy loops to waste time, which uses a lot of power to do nothing. Someone could make tmk/some other firmware more energy efficient quite easily, but there is close to zero need for it as long as you are connected via a cable.

For bt+usb combo implementation, there are currently no chips that would be very good at it. Someone is bound to paste some links here to devices that would allow you to make your usb keyboard into a bt one, but the battery life is awful in those.

the stacks you'v seen expose the header files and are blackboxes .. as i sayed there is exactly 1 opensource bt le 4/5 stack thats it ..

the nordic/ti/nxp sdk's/softdevices are deployed binarys. pretty much near to to possibility to get a propper nkro implemeneted . let alone licence conflicts

usb+bt4.2/5 is the nrf52840 but production starts q1/2018 i use them in my stuff - https://puu.sh/wSGtr/eef31e019d.png

yet the pack makes it nearly impossible for a small hobbist to place them reliable without a bga reball mashine with dual vision.

apart from that you will need to get the game right in terms of antenna design specialy if you want to be complient.
The HID report for HID over GATT as defined by bluetooth.org states it as a 6kro report. If you plan on making some custom hid report supporting nkro, be prepared to write drivers for it as well or at least scrap wide compatibility. BTW, you can create custom services even with those black boxes.

As for the black box nature of things, I don't really care. If it works, it works.

Can you give some real world example on the problems of nordic's licencing scheme?

Not sure what the issue is.  I have a JD45 with bluetooth, and it works perfectly well.

https://www.reddit.com/r/MechanicalKeyboards/comments/49tnkv/a_bluetooth_jd45/

You could ask him- he connected a Bluefruit EZ Key to the PCB of the JD45, and used a portable charger at 4500 mAh.  He's a pretty cool guy, so you could ask him more on reddit.
So a massive (and tall) 4500 mAh battery and how many hours of typing? With a power optimized solution, that should be enough juice for almost 2 years of continuous typing. I find it a bit silly to have a larger battery for your keyboard than your phone while having less battery life.
It's not massive, and works for about 3 weeks.

Offline pomk

  • Posts: 470
  • Location: Finland
Re: Integrating Bluetooth into a custom keyboard?
« Reply #16 on: Sun, 06 August 2017, 12:04:31 »
What do you mean there is no hid over gatt profile? https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245141
All of the bt4+ stacks that I have seen support the client side of it.

As for kurplops question about battery life, the trick is to sleep the processor as much as humanly possible. Most kb firmwares use busy loops to waste time, which uses a lot of power to do nothing. Someone could make tmk/some other firmware more energy efficient quite easily, but there is close to zero need for it as long as you are connected via a cable.

For bt+usb combo implementation, there are currently no chips that would be very good at it. Someone is bound to paste some links here to devices that would allow you to make your usb keyboard into a bt one, but the battery life is awful in those.

the stacks you'v seen expose the header files and are blackboxes .. as i sayed there is exactly 1 opensource bt le 4/5 stack thats it ..

the nordic/ti/nxp sdk's/softdevices are deployed binarys. pretty much near to to possibility to get a propper nkro implemeneted . let alone licence conflicts

usb+bt4.2/5 is the nrf52840 but production starts q1/2018 i use them in my stuff - https://puu.sh/wSGtr/eef31e019d.png

yet the pack makes it nearly impossible for a small hobbist to place them reliable without a bga reball mashine with dual vision.

apart from that you will need to get the game right in terms of antenna design specialy if you want to be complient.
The HID report for HID over GATT as defined by bluetooth.org states it as a 6kro report. If you plan on making some custom hid report supporting nkro, be prepared to write drivers for it as well or at least scrap wide compatibility. BTW, you can create custom services even with those black boxes.

As for the black box nature of things, I don't really care. If it works, it works.

Can you give some real world example on the problems of nordic's licencing scheme?

Not sure what the issue is.  I have a JD45 with bluetooth, and it works perfectly well.

https://www.reddit.com/r/MechanicalKeyboards/comments/49tnkv/a_bluetooth_jd45/

You could ask him- he connected a Bluefruit EZ Key to the PCB of the JD45, and used a portable charger at 4500 mAh.  He's a pretty cool guy, so you could ask him more on reddit.
So a massive (and tall) 4500 mAh battery and how many hours of typing? With a power optimized solution, that should be enough juice for almost 2 years of continuous typing. I find it a bit silly to have a larger battery for your keyboard than your phone while having less battery life.
It's not massive, and works for about 3 weeks.
They are. 8.0*57*85 mm is massive, especially for a keyboard. Who wants an extra centimeter to their keyboards height? Housing a large battery like that right under the switch pins is also dangerous, one just needs to lean on the keyboard a bit to puncture it unless you put a protective sheet of metal between the battery and the switches (you could also file all the pins down of course).

3 weeks is more than I expected. How many hours of typing do you think there is in that?

Offline pkircher

  • Posts: 124
  • Location: UK
Re: Integrating Bluetooth into a custom keyboard?
« Reply #17 on: Sun, 06 August 2017, 12:41:32 »
What do you mean there is no hid over gatt profile? https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245141
All of the bt4+ stacks that I have seen support the client side of it.

As for kurplops question about battery life, the trick is to sleep the processor as much as humanly possible. Most kb firmwares use busy loops to waste time, which uses a lot of power to do nothing. Someone could make tmk/some other firmware more energy efficient quite easily, but there is close to zero need for it as long as you are connected via a cable.

For bt+usb combo implementation, there are currently no chips that would be very good at it. Someone is bound to paste some links here to devices that would allow you to make your usb keyboard into a bt one, but the battery life is awful in those.

the stacks you'v seen expose the header files and are blackboxes .. as i sayed there is exactly 1 opensource bt le 4/5 stack thats it ..

the nordic/ti/nxp sdk's/softdevices are deployed binarys. pretty much near to to possibility to get a propper nkro implemeneted . let alone licence conflicts

usb+bt4.2/5 is the nrf52840 but production starts q1/2018 i use them in my stuff - https://puu.sh/wSGtr/eef31e019d.png

yet the pack makes it nearly impossible for a small hobbist to place them reliable without a bga reball mashine with dual vision.

apart from that you will need to get the game right in terms of antenna design specialy if you want to be complient.
The HID report for HID over GATT as defined by bluetooth.org states it as a 6kro report. If you plan on making some custom hid report supporting nkro, be prepared to write drivers for it as well or at least scrap wide compatibility. BTW, you can create custom services even with those black boxes.

As for the black box nature of things, I don't really care. If it works, it works.

Can you give some real world example on the problems of nordic's licencing scheme?

Not sure what the issue is.  I have a JD45 with bluetooth, and it works perfectly well.

https://www.reddit.com/r/MechanicalKeyboards/comments/49tnkv/a_bluetooth_jd45/

You could ask him- he connected a Bluefruit EZ Key to the PCB of the JD45, and used a portable charger at 4500 mAh.  He's a pretty cool guy, so you could ask him more on reddit.
So a massive (and tall) 4500 mAh battery and how many hours of typing? With a power optimized solution, that should be enough juice for almost 2 years of continuous typing. I find it a bit silly to have a larger battery for your keyboard than your phone while having less battery life.

plenty problems with blackboxes/ same as with closed source .. what ever works for you - not good enough for me tho

 .. connection pooling to example but thats down on the protocol  level .. / and you are bound by what you get from nordic .. its a decent stack .. but certainly not what i want :)

controller / peripheral ( simultanously )

and yes there is probably the requirement for gatt drivers regardless .. its not supported everywhere yet.


Offline pomk

  • Posts: 470
  • Location: Finland
Re: Integrating Bluetooth into a custom keyboard?
« Reply #18 on: Sun, 06 August 2017, 13:06:06 »
What do you mean there is no hid over gatt profile? https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245141
All of the bt4+ stacks that I have seen support the client side of it.

As for kurplops question about battery life, the trick is to sleep the processor as much as humanly possible. Most kb firmwares use busy loops to waste time, which uses a lot of power to do nothing. Someone could make tmk/some other firmware more energy efficient quite easily, but there is close to zero need for it as long as you are connected via a cable.

For bt+usb combo implementation, there are currently no chips that would be very good at it. Someone is bound to paste some links here to devices that would allow you to make your usb keyboard into a bt one, but the battery life is awful in those.

the stacks you'v seen expose the header files and are blackboxes .. as i sayed there is exactly 1 opensource bt le 4/5 stack thats it ..

the nordic/ti/nxp sdk's/softdevices are deployed binarys. pretty much near to to possibility to get a propper nkro implemeneted . let alone licence conflicts

usb+bt4.2/5 is the nrf52840 but production starts q1/2018 i use them in my stuff - https://puu.sh/wSGtr/eef31e019d.png

yet the pack makes it nearly impossible for a small hobbist to place them reliable without a bga reball mashine with dual vision.

apart from that you will need to get the game right in terms of antenna design specialy if you want to be complient.
The HID report for HID over GATT as defined by bluetooth.org states it as a 6kro report. If you plan on making some custom hid report supporting nkro, be prepared to write drivers for it as well or at least scrap wide compatibility. BTW, you can create custom services even with those black boxes.

As for the black box nature of things, I don't really care. If it works, it works.

Can you give some real world example on the problems of nordic's licencing scheme?

Not sure what the issue is.  I have a JD45 with bluetooth, and it works perfectly well.

https://www.reddit.com/r/MechanicalKeyboards/comments/49tnkv/a_bluetooth_jd45/

You could ask him- he connected a Bluefruit EZ Key to the PCB of the JD45, and used a portable charger at 4500 mAh.  He's a pretty cool guy, so you could ask him more on reddit.
So a massive (and tall) 4500 mAh battery and how many hours of typing? With a power optimized solution, that should be enough juice for almost 2 years of continuous typing. I find it a bit silly to have a larger battery for your keyboard than your phone while having less battery life.

plenty problems with blackboxes/ same as with closed source .. what ever works for you - not good enough for me tho

 .. connection pooling to example but thats down on the protocol  level .. / and you are bound by what you get from nordic .. its a decent stack .. but certainly not what i want :)

controller / peripheral ( simultanously )

and yes there is probably the requirement for gatt drivers regardless .. its not supported everywhere yet.
The hardware is closed source anyway, so just think of the black box as an updateable part of the hardware and you are golden ;)
IMO compatibility with mobile devices is more important than nkro. The latest stacks support controller/peripheral as well as simultaneous connections to multiple hosts.

Offline chuckdee

  • * Destiny Supporter
  • Posts: 1308
Re: Integrating Bluetooth into a custom keyboard?
« Reply #19 on: Sun, 06 August 2017, 16:16:01 »
What do you mean there is no hid over gatt profile? https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245141
All of the bt4+ stacks that I have seen support the client side of it.

As for kurplops question about battery life, the trick is to sleep the processor as much as humanly possible. Most kb firmwares use busy loops to waste time, which uses a lot of power to do nothing. Someone could make tmk/some other firmware more energy efficient quite easily, but there is close to zero need for it as long as you are connected via a cable.

For bt+usb combo implementation, there are currently no chips that would be very good at it. Someone is bound to paste some links here to devices that would allow you to make your usb keyboard into a bt one, but the battery life is awful in those.

the stacks you'v seen expose the header files and are blackboxes .. as i sayed there is exactly 1 opensource bt le 4/5 stack thats it ..

the nordic/ti/nxp sdk's/softdevices are deployed binarys. pretty much near to to possibility to get a propper nkro implemeneted . let alone licence conflicts

usb+bt4.2/5 is the nrf52840 but production starts q1/2018 i use them in my stuff - https://puu.sh/wSGtr/eef31e019d.png

yet the pack makes it nearly impossible for a small hobbist to place them reliable without a bga reball mashine with dual vision.

apart from that you will need to get the game right in terms of antenna design specialy if you want to be complient.
The HID report for HID over GATT as defined by bluetooth.org states it as a 6kro report. If you plan on making some custom hid report supporting nkro, be prepared to write drivers for it as well or at least scrap wide compatibility. BTW, you can create custom services even with those black boxes.

As for the black box nature of things, I don't really care. If it works, it works.

Can you give some real world example on the problems of nordic's licencing scheme?

Not sure what the issue is.  I have a JD45 with bluetooth, and it works perfectly well.

https://www.reddit.com/r/MechanicalKeyboards/comments/49tnkv/a_bluetooth_jd45/

You could ask him- he connected a Bluefruit EZ Key to the PCB of the JD45, and used a portable charger at 4500 mAh.  He's a pretty cool guy, so you could ask him more on reddit.
So a massive (and tall) 4500 mAh battery and how many hours of typing? With a power optimized solution, that should be enough juice for almost 2 years of continuous typing. I find it a bit silly to have a larger battery for your keyboard than your phone while having less battery life.
It's not massive, and works for about 3 weeks.
They are. 8.0*57*85 mm is massive, especially for a keyboard. Who wants an extra centimeter to their keyboards height? Housing a large battery like that right under the switch pins is also dangerous, one just needs to lean on the keyboard a bit to puncture it unless you put a protective sheet of metal between the battery and the switches (you could also file all the pins down of course).

3 weeks is more than I expected. How many hours of typing do you think there is in that?



It's about as thick as my normal desktop keyboards.  And it's well constructed- you're now talking about things that you don't have the full story on.  Why keep trying to poke holes in something just because it goes against your arguments.  I've been using it for well over a year with no problems.

I use it when I take my laptop.  So about 4 days a week, the whole day.  I can also plug it in if necessary.

Offline pkircher

  • Posts: 124
  • Location: UK
Re: Integrating Bluetooth into a custom keyboard?
« Reply #20 on: Sun, 06 August 2017, 20:41:17 »
What do you mean there is no hid over gatt profile? https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245141
All of the bt4+ stacks that I have seen support the client side of it.

As for kurplops question about battery life, the trick is to sleep the processor as much as humanly possible. Most kb firmwares use busy loops to waste time, which uses a lot of power to do nothing. Someone could make tmk/some other firmware more energy efficient quite easily, but there is close to zero need for it as long as you are connected via a cable.

For bt+usb combo implementation, there are currently no chips that would be very good at it. Someone is bound to paste some links here to devices that would allow you to make your usb keyboard into a bt one, but the battery life is awful in those.

the stacks you'v seen expose the header files and are blackboxes .. as i sayed there is exactly 1 opensource bt le 4/5 stack thats it ..

the nordic/ti/nxp sdk's/softdevices are deployed binarys. pretty much near to to possibility to get a propper nkro implemeneted . let alone licence conflicts

usb+bt4.2/5 is the nrf52840 but production starts q1/2018 i use them in my stuff - https://puu.sh/wSGtr/eef31e019d.png

yet the pack makes it nearly impossible for a small hobbist to place them reliable without a bga reball mashine with dual vision.

apart from that you will need to get the game right in terms of antenna design specialy if you want to be complient.
The HID report for HID over GATT as defined by bluetooth.org states it as a 6kro report. If you plan on making some custom hid report supporting nkro, be prepared to write drivers for it as well or at least scrap wide compatibility. BTW, you can create custom services even with those black boxes.

As for the black box nature of things, I don't really care. If it works, it works.

Can you give some real world example on the problems of nordic's licencing scheme?

Not sure what the issue is.  I have a JD45 with bluetooth, and it works perfectly well.

https://www.reddit.com/r/MechanicalKeyboards/comments/49tnkv/a_bluetooth_jd45/

You could ask him- he connected a Bluefruit EZ Key to the PCB of the JD45, and used a portable charger at 4500 mAh.  He's a pretty cool guy, so you could ask him more on reddit.
So a massive (and tall) 4500 mAh battery and how many hours of typing? With a power optimized solution, that should be enough juice for almost 2 years of continuous typing. I find it a bit silly to have a larger battery for your keyboard than your phone while having less battery life.

plenty problems with blackboxes/ same as with closed source .. what ever works for you - not good enough for me tho

 .. connection pooling to example but thats down on the protocol  level .. / and you are bound by what you get from nordic .. its a decent stack .. but certainly not what i want :)

controller / peripheral ( simultanously )

and yes there is probably the requirement for gatt drivers regardless .. its not supported everywhere yet.
The hardware is closed source anyway, so just think of the black box as an updateable part of the hardware and you are golden ;)
IMO compatibility with mobile devices is more important than nkro. The latest stacks support controller/peripheral as well as simultaneous connections to multiple hosts.

the radio is closed yes .. how ever what the radio does should not  be - lets agree to disagree and call it a day - we could go on for days and no point to it
if the softdevice works for you - great / it certainly does not for everyone :)

Offline pomk

  • Posts: 470
  • Location: Finland
Re: Integrating Bluetooth into a custom keyboard?
« Reply #21 on: Mon, 07 August 2017, 04:19:19 »
the radio is closed yes .. how ever what the radio does should not  be - lets agree to disagree and call it a day - we could go on for days and no point to it
if the softdevice works for you - great / it certainly does not for everyone :)
I see your point and agree that it would be nice to have full control over the radio, on both ends.

Show Image


It's about as thick as my normal desktop keyboards.  And it's well constructed- you're now talking about things that you don't have the full story on.  Why keep trying to poke holes in something just because it goes against your arguments.  I've been using it for well over a year with no problems.

I use it when I take my laptop.  So about 4 days a week, the whole day.  I can also plug it in if necessary.
So about 2,5 cm to the switch plate, when 10-11 mm would be enough normally. I'm not saying that it is not well constructed, just that it is quite tall and to be fair it is unclear if kurplop has room for such batteries in his design. In his build thread one point is that it sits lower than an apple scissor switch keyboard.

As for the battery life, 12 days of working, with maybe 3 hours of actively pressing buttons per day, totals to about 36 hours of typing per charge. A tiny battery of about 30 mAh would be enough to give the same working time with a power optimized design.

If it works for you, great, I'm simply stating the obvious that the solution will not fit in all designs and that it could be made better and smaller.
« Last Edit: Mon, 07 August 2017, 04:21:30 by pomk »

Offline pkircher

  • Posts: 124
  • Location: UK
Re: Integrating Bluetooth into a custom keyboard?
« Reply #22 on: Mon, 07 August 2017, 06:58:28 »
nokia batteries are widely available .. short protected cheap .. and hold around 1450 mah .. if bundeld with a propper charge mangement like the MCP73832/MCP72833 you can use them with out a problem .. they take 5 mm in might .. you can place them anywhere in the board just wire the connector board - here a older lipo charger from me .. that takes a nokia akku .


Offline 0100010

  • Posts: 1127
  • Location: DFW, TX, US
  • Not Sure
  Quoting me causes a posting error that you need to ignore.

Offline kurplop

  • THE HERO WE DON'T DESERVE
  • Thread Starter
  • Posts: 992
Re: Integrating Bluetooth into a custom keyboard?
« Reply #24 on: Mon, 07 August 2017, 11:25:19 »
Another option and this may be more practical in some ways and less in others is to cannibalize a cheap bluetooth keyboard already on the market. Everything you need is there, you just need to wire in the switches and build a case around it. The good part, you get a more efficient system and probably thinner one, however figuring out the wiring for the switches may be tough.

Do you know of any write-ups by anyone that has done this? One problem I would have is finding such a donor keyboard that has programable layers.

Not sure what the issue is.  I have a JD45 with bluetooth, and it works perfectly well.

https://www.reddit.com/r/MechanicalKeyboards/comments/49tnkv/a_bluetooth_jd45/

You could ask him- he connected a Bluefruit EZ Key to the PCB of the JD45, and used a portable charger at 4500 mAh.  He's a pretty cool guy, so you could ask him more on reddit.

If the Bluetooth components in your build(including battery, controller and antenna) were not under the switches but rather above the top row or buried in a palmrest, could they fit within a 0.40" (10mm) thick enclosure?
 My space constraints are with the thickness and length  of the keyboard; if necessary, I could add more to the front-to-back dimension. I want to keep the overall size within the boundaries of an iPad.
175260-0

Three weeks of run-time between charges sounds fine. I think that while even longer battery life is nice, since my application would be with a laptop/tablet which is also battery dependent, a rechargeable system that would provide 16+ hours of service would be adequate.

Thanks to everybody that have added to this topic. I realize that although I asked questions specific to my project, this is an important subject for the whole community and suspect many will benefit from your elaborations. I only wish I had more than ignorance to offer to the discussion.

Offline chuckdee

  • * Destiny Supporter
  • Posts: 1308
Re: Integrating Bluetooth into a custom keyboard?
« Reply #25 on: Mon, 07 August 2017, 12:30:03 »
If the Bluetooth components in your build(including battery, controller and antenna) were not under the switches but rather above the top row or buried in a palmrest, could they fit within a 0.40" (10mm) thick enclosure?
 My space constraints are with the thickness and length  of the keyboard; if necessary, I could add more to the front-to-back dimension. I want to keep the overall size within the boundaries of an iPad.

It seems to be a battery the size of a phone battery.  The Bluetooth EZ isn't that large either.  It's all in the integration, which is where the thickness comes from on this particular board.  I'd ask /u/justinyhuang on reddit for more help.  I'm more of a user of his design. But a very satisfied user/purchaser.  JDCarpe helped him with the design and integration (not sure of the extent) so you could ask him how much he knows about what was done.  GL and HTH... it's a great keyboard design, though.

I did have an OT question... you rotated the layout for each hand a lot more than I usually see in these split designs... is that comfortable?

Offline kurplop

  • THE HERO WE DON'T DESERVE
  • Thread Starter
  • Posts: 992
Re: Integrating Bluetooth into a custom keyboard?
« Reply #26 on: Mon, 07 August 2017, 13:05:11 »

I did have an OT question... you rotated the layout for each hand a lot more than I usually see in these split designs... is that comfortable?

Because I haven't completed it yet, I can't say with certainty that it is ideal. It is skewed at 25º where in the past I've used between 15º and 20º.
My rationale is based on the closeness of the hand positioning. On my earlier boards, the center mounted trackball gave the halves a natural 3" spread. As the hands come closer together, the angle becomes more acute. Because of severe arthritis in my wrists, ulnar deviation becomes an issue.
When I did preliminary mock-ups of the design, 25º was the sweet spot for me. As an added benefit, the greater angle creates more room for thumb keys within the same footprint width.

Speaking of JDCarpe; does anyone know what happened to him? He hasn't been active since last year.

Also off topic. When I was formally taught to type many moons ago, maintaining home position was a more common practice than it seems to be today. Even 40 years ago, my hands never were comfortable in that position. People adapt their typing style to accommodate the standard key positioning and, as such, most don't require "ergonomic " designs.

Thanks chuckdee, for the input.

Offline chuckdee

  • * Destiny Supporter
  • Posts: 1308
Re: Integrating Bluetooth into a custom keyboard?
« Reply #27 on: Mon, 07 August 2017, 15:35:33 »
Speaking of JDCarpe; does anyone know what happened to him? He hasn't been active since last year.

I couldn't speak authoritatively, but I think the JD45 debacle killed off his interest.  At least, I saw his involvement lessen during the time of the buy as the whole Paypal mess got to him.  He kept going and got it finished, but I haven't seen anything much from him since, and it's a real shame/loss.

Offline kurplop

  • THE HERO WE DON'T DESERVE
  • Thread Starter
  • Posts: 992
Re: Integrating Bluetooth into a custom keyboard?
« Reply #28 on: Mon, 07 August 2017, 15:51:19 »
I'm sorry to hear that. I met him at a GH meet-up 3 years ago and he seemed like a good guy. He also had offered to help me with some things last year. I agree, a real loss to the community.

Offline Leslieann

  • * Elevated Elder
  • Posts: 4518
Re: Integrating Bluetooth into a custom keyboard?
« Reply #29 on: Mon, 07 August 2017, 19:35:00 »
Do you know of any write-ups by anyone that has done this? One problem I would have is finding such a donor keyboard that has programable layers.
None that I know of.
While I like programmable, sometimes software on the system is an easier solution.
Novelkeys NK65AE w/62g Zilents/39g springs
More
62g Zilents/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 magnetic cable, pic
| Filco MJ2 L.E. Vortex Case, Jailhouse Blues, heavily customized
More
Vortex case squared up/blasted finish removed/custom feet/paint/winkey blockoff plate, HID Liberator, stainless steel universal plate, 3d printed adapters, Type C, Netdot Gen10 magnetic cable, foam sound dampened, HK Gaming Thick PBT caps (o-ringed), Cherry Jailhouse Blues w/lubed/clipped Cherry light springs, 40g actuation
| GMMK TKL
More
w/ Kailh Purple Pros/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 Magnetic cable
| PF65 3d printed 65% w/LCD and hot swap
More
Box Jades, Interchangeable trim, mini lcd, QMK, underglow, HK Gaming Thick PBT caps, O-rings, Netdot Gen10 magnetic cable, in progress link
| Magicforce 68
More
MF68 pcb, Outemu Blues, in progress
| YMDK75 Jail Housed Gateron Blues
More
J-spacers, YMDK Thick PBT, O-rings, SIP sockets
| KBT Race S L.E.
More
Ergo Clears, custom WASD caps
| Das Pro
More
Costar model with browns
| GH60
More
Cherry Blacks, custom 3d printed case
| Logitech Illumininated | IBM Model M (x2)
Definitive Omron Guide. | 3d printed Keyboard FAQ/Discussion

Offline 0100010

  • Posts: 1127
  • Location: DFW, TX, US
  • Not Sure
Re: Integrating Bluetooth into a custom keyboard?
« Reply #30 on: Mon, 07 August 2017, 21:25:30 »
What about a Plum96 BT board?  https://geekhack.org/index.php?topic=81680.0
  Quoting me causes a posting error that you need to ignore.