This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How the nus mode is automatically subcontracted and sent efficiently?

Hi, there

  1. NRF51822
  2. SDK9.0.0 and S110

How to subcontract in uart nus mode to ensure that each packet does not exceed 20 bytes and is sent as quickly as possible? The official demo must pass the special character to distinguish the last packet. If i do not use special characters to determine the last package, are there other good ways to do this thing ?

Parents
  • What do you mean by "subcontract" and "nus mode"? If you want to say that you are using Nordic BLE UART Service (NUS) example and want to be sure that you always pass 20 bytes to it well then simply implement some logic on top of NUS data transfer function to be sure that longer data get fragmented properly. Of course there are plenty ways of making fragmentation, you can get inspiration from any networking protocol. All depends on your priorities: do you need to have the protocol easy to parse (= small code size) or you don't care if it's few bytes bigger FW image but you want to have as minimal overhead? And for what sizes you want to optimize your protocol (= will you be sending mostly small packets <20B or mostly some medium 20-200B or mostly long 200B+)?

  • Thanks. Now it's working.

Reply Children
No Data
Related