Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Wrong data received on Android when trying to read a characteristics #953

@Kyemate

Description

@Kyemate

Describe the bug
Every time I try to read a characteristics on Android the last 2 characters in the data I receive is faulty. I've tired many times and I always get the same behavior. When I check the characteristics value in the nrf connect app it always shows up correct. Here is an example on how it usually looks:
Nonce mismatch. Expected '1fpyCd44M8em1hUWOVv7KA==', received '1fpyCd44M8em1hUWOVv7KA1f'

To Reproduce
Steps to reproduce the behavior:

  1. Read characteristics with var (nonceBytes, resultCode) = await nonceChar.ReadAsync(cancellationToken);
  2. Convert bytes to a string with var rawNonceString = Encoding.UTF8.GetString(nonceBytes);

Expected behavior
The data that my gatt server sends out should be the same as I receive.

Configuration (please complete the following information):

  • Device: Samsung Galaxy Tab S8 5G
  • OS: Android 15
  • Plugin.BLE Version: 3.2.0-beta.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions