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

how to send ASCII data to MCP

I am able to send data from EK to MCP but even i am sending one byte of ASCII(alphabet) of data, it is showing as hex value in MCP ex., 'C' as 43 , if i want to see ASCII in MCP instead of hex, how to achieve it?

Parents
  • yeah, its working, thanks for your reply and i tried to send 4 bytes of data byte by byte no problem, i'm recieving at usb dongle, but when i tried to send 4 bytes at a time, getting link loss

    i'm attaching the MCP screen shot when it got recieved link loss error

    ble_gatts_hvx_params_t params;

    uint16_t len = 4;  //sizeof(button_state);
    uint8_t button_state[]="NAME";
    memset(&params, 0, sizeof(params));
    params.type = BLE_GATT_HVX_NOTIFICATION;
    params.handle = p_lbs->button_char_handles.value_handle;
    params.p_data = &button_state;
    params.p_len = &len;
    

    this is only change i have done -- changing length field

    https://plus.google.com/u/0/photos/106342245485958322131/albums/5940116443983863137/5940116594382688338?pid=5940116594382688338&oid=106342245485958322131

Reply
  • yeah, its working, thanks for your reply and i tried to send 4 bytes of data byte by byte no problem, i'm recieving at usb dongle, but when i tried to send 4 bytes at a time, getting link loss

    i'm attaching the MCP screen shot when it got recieved link loss error

    ble_gatts_hvx_params_t params;

    uint16_t len = 4;  //sizeof(button_state);
    uint8_t button_state[]="NAME";
    memset(&params, 0, sizeof(params));
    params.type = BLE_GATT_HVX_NOTIFICATION;
    params.handle = p_lbs->button_char_handles.value_handle;
    params.p_data = &button_state;
    params.p_len = &len;
    

    this is only change i have done -- changing length field

    https://plus.google.com/u/0/photos/106342245485958322131/albums/5940116443983863137/5940116594382688338?pid=5940116594382688338&oid=106342245485958322131

Children
No Data
Related