I'm working on hid keyboard example. How can I check whether multiple bytes are received & transmitted after I increase the assigned no. of bytes in input/output report? From the code I understood that nrf device can send 64 bytes to host device. So how do I append bytes in one packet of 64 bytes when sending to host? How does it work from host side? Does nrf read 1 byte at a time sent from host?
So how do I append bytes in one packet of 64 bytes when sending to host?
What do you mean by that? Do you want to increase the packet size so you can send more than 64 bytes?
I read somewhere that Windows machine accepts 64 bytes from BLE device. So accordingly I should make changes in HID descriptor which are - REPORT_COUNT = 64, REPORT_SIZE = 8. In the current situation, the below image demonstrates how many no. of bytes are sent/received in nrfConnect.
If I make the changes for 64 bytes, do I need to take care of any header bytes getting added to the packet or can all 64 bytes be data bytes? I know for sure that the first byte to be sent from nrf to pc should be report ID.
Also in the code, in which locations are the packet size actually being checked for input & output report?
I would like maximum size possible for input & output report for Windows OS & Mac OS.
Yes I did but I received BLE_GATT_OP_WRITE_CMD error and did a little search in Nordic forum. What should I do?
Which function returned that error?
Should I increase the ATT MTU size?
Yes, try that.
Bluetooth disconnects if I try to increase the MTU size.
I want to receive 6kb file as an output report. What is the best way to do it?
Should the file be divided into data chunks? If yes then what should be the maximum size of the packet? Will it increase the throughput?
Please guide me with a few steps which I should follow.
Could you please log the disconnect reason?
After I change to #define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 100
the bluetooth does not advertise. The advertising led does not blink.
I'm not sure how to check the logs coz I have combined UART & HID keyboard codes. If I enable RTT, then the bluetooth disconnects. So it can be either the RTT logs or the UART.
But still I enabled rtt & changed ram address as per logs, but bluetooth disconnected.
What can be the maximum size of the packet in order to receive 6kB file as an output report & increase the throughput?
I'm confused if it'll affect the input report packet size as well.
Why is the api displaying bytes less than 247?
The bluetooth is now advertising and got connected. The changes I made in sdk_config.h
#define NRF_SDH_BLE_GAP_EVENT_LENGTH 400
#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247
I also changed the ram address.
But still only 22 bytes are displayed in nrfconnect.
In other api, 64 bytes are displayed
If I change BLE_GATT_ATU_MTU_DEFAULT to 247, I get the error BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED
I also tried to change the optimization level.
Also used internal crystal.
Should I use 2Mbps link?
Please guide with concrete solution.
Do you think I should open a new ticket for this?
Hello, sorry for the late reply, I have been away for a few days. Yes, you should open a new ticket.