Quantcast
Viewing all articles
Browse latest Browse all 116964

Forum Post: RE: What is the fastest way to send "file" over BLE?

Hello Mr. White,

Depending on your application, you can send data to the USB at the maximum USB data rate.  There are options such as in the Thermometer.c profile you can look at.  Or depending on your level of programming you can get the data directly from the USB in 64 byte blocks and then parse it.  As in the code below.  I will not provide details on how to do this, I am only suggesting another option.

For PC to USB Dongle with HCI commands it is best to copy the method used in the Thermometer example and modify the hostTestRelease.c code.  The complete source code and GUI are provided in the BLE v1.3 and the Thermometer profile found in the BLEwiki.

  // Poll USB for data is using USB Dongle
  HalUARTPoll();
  if (USB_data_ready){
    HalUARTRead(HAL_UART_PORT_0,msg_buf1,cntr);
    HalUARTRx(msg_buf1, 8);
    READ_COMMAND();
    USB_data_ready = 0;
  }
  // Process USB data and perform function
  if(msg_buf_valid){
    RUN_OPTION();
    msg_buf_valid = 0;
  }

Viewing all articles
Browse latest Browse all 116964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>