This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Which HID device type to use?

We are upgrading an existing product to use Bluetooth instead of the parallel port.

It must support >20kbit/sec communications between the device and the host PC.

We are considering the nRF52832 because of it's local processing power.

I currently have the PCA10040 developer kit board.

Question: what service do you recommend? I looked at the HID keyboard example and it is running fine after building it in eclipse. However, having multiple keyboards on a customer computer might cause problems. Assuming a HID device profile is the best way to connect, which profile would you recommend?

Thank you for your time!

  • Hi

    Can you give me a bit more details about your product?

    Is it a keyboard, or something else?

    How do you plan to connect it to the PC?
    A native connection using the built in wireless, or some kind of dongle?

    How many devices do you need to connect?

    Best regards

  • It is a CNC controller. The current controller (sold many units) connects via parallel port. I am a contractor evaluating the possibility of using bluetooth instead.

    I would prefer that the PC had a commodity bluetooth dongle instead of a custom or proprietary dongle. We may also want to connect via a smart phone in the future as well.

    One of the implementations we are considering is using something like the nRF52832 to control the motor drivers and read the encoders while connecting to a host PC which handles cut path planning, etc.

    Just one CNC device per host although being able to control multiple machines from the host would be nice.

    Thank you for your time!

  • I have learned a little bit more about the HID profile and see that I can just change it's type, the report type, etc.

    I am concerned though that a protocol (like HID over BLE) that apparently requires each report to be acknowledge by the OS, will be too slow.

  • This is fairly early in the project where the controller is being specified. One of the tests I need to run on a perspective controller is a simulated control loop with a representative communications link on a window machine. This should verify that communications is fast enough and that no additional/different uC is required to run the control loop.

    I ran a modified version of the ble uart example (sdk 14) to an Android phone (nrf tools) sending 20byte packets at 200hz. I also had a worker thread wasting time. both triggered by rtc2. The softdevice seemed to be fine at that rate but the nrftools app on the phone was not showing all the packets being received. More than half missing. Thinking maybe the phone was the weak link, I looked into sending to windows instead. This is when I realized that sending to Windows had problems I didn't anticipate.

  • Hi

    This sounds like an application that is better suited to a custom BLE profile (similar to the ble_app_uart example), giving you more control over the data format, and less overhead compared to packing data in HID reports.

    Android shouldn't have an issue receiving 200 packet per second, but the GUI might not be able to keep up. Usually you can receive and process much more data than you can display directly.

    Windows and BLE support is a bit of a sad chapter. Until Windows 8.1 there were no standardized BLE API's, and you needed a driver from the dongle manufacturer. With 8.1 a standard API was provided, but the only person in Nordic who might have used it is currently on vacation.

    Do you require a continuous data stream to use the CNC machine?
    The speed of the wireless link will be highly phone and environment dependent, so you should try to make the application adapt to the available bandwidth.

    Best regards

Related