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

Example code for transmitting data from nrf51822 to mobile app

Can anyone please help me on this? I struggling in transmitting string and numbers from nrf51822 to mobile app through BLE. I need some sample code. thanks.

uint8_t numbers = 80;

GattCharacteristic characteristic2(service1_rx_uuid, (uint8_t *)numbers, sizeof(numbers), sizeof(numbers), GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY);

ble.updateCharacteristicValue(characteristic2.getValueAttribute().getHandle(), &numbers , sizeof(numbers));

Based on the code above, I keep on getting : 'P' rather than 80.

Please help!

Parents Reply Children
Related