This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC2640R2: BleScanner value is wrong

Part Number: LAUNCHXL-CC2640R2

Hi, First of all, I should start by saying that I have no experience with this topic and this is my first time doing it. I want to make a project that sends the voltage value read from the ADC to the mobile phone via bluetooth. When I browsed the sample projects in the resource explorer section, I saw that the sample project made in the link I will add does the project I want to do. Link of the project is

dev.ti.com/.../node

When I wanted to do this example as NON-POSIX and using the development board's own ADC pin without using a booster pack, I realized that the best way would be to use task 4,5 and 6. Then I started to follow the steps.

When I follow the steps shown in the instruction, I see different values in the value section of the BLEscanner application on the mobile phone with the ones written in PUTTY at the end. Probably it is in the different format but I don't know which format it is in. My request is to ensure that the value shown in the value section is the same as PUTTY.

e2e.ti.com/.../rtos-launchxl-cc2640r2-bluetooth- low-energy-ti-drivers


The question asked in this link is exactly the same as my problem. I applied the answer given to the question  asked  in the link and I can send the value I manually entered to the mobile phone as mentioned. But by doing this I only  have checked that I can send data. Unfortunately, I did not reach the solution I wanted.
How  can I  reach the solution that I want by making changes in which step of the project ?
I have shown the steps I have applied step by step in the file I have attached.

I also add the project document, maybe it helps to solve the problem.NO_POSIX_BLE.docble5_simple_peripheral_cc2640r2lp_stack_library.zip3678.ble5_simple_peripheral_cc2640r2lp_app.zip

  • Hi,

    Thank you for reaching out to us. We will look into your queries and get back to you as soon as possible. In the meantime, can you specify which version of the SDK you are using? Are you using the ble or ble5 stack?

    Best Regards,

    Jan

  •  I hope understand it well, SDK's version is 5.30. The file name that I created is ble5_simple_peripheral_cc2640r2lp_stack_library. Probably I am using ble5 stack. But I am not sure. If you explain how I can learn, it will be better.

    Thanks,

  • Hi Riza,

    Did you follow the following instruction of updating the parameter when the button is pressed.

    BR,

    Rogelio

  • Hi Rogelio,

    In that step I used periodic task one, but when I press the button value changes either in Putty and blescanner.

    Thanks

  • Well that would make sense if you are using the periodic task to update then. What you see in putty only updates when you press the button while the value that is saved in the MyData characteristic is updated with the periodic task clock (Around every 5 secs). What you see in putty will then be different than what is saved in my data. I would follow what it says about sending the data inside your thread that way putty and what you see in ble scanner will be the same.

    Kind Regards,

    Rogelio

  • Hi Rogelio, 

    I understand what you explain but what I mean here is that value's type is different. As I shown in the document I added. For example value that I see in mobile phone is "f" but 646 in Putty.

    Thanks

  • That would probably be because BLE Scanner is interpreting the data as ascii, you would need to check the ble scanner settings.

    BR,

    Rogelio

  • Hi Rogelio,

    I could not find how to change settings, do you know how to do it?

    Thanks

  • Sorry Riza, I am not sure. But TI does offer a new application very similar to ble scanner

    https://play.google.com/store/apps/details?id=com.ti.connectivity.simplelinkconnect

    which I know you can change the format easily with.

    Kind Regards,

    Rogelio

  • Hi Rogelio, Thank you for advice it is better application and as you said I can change the format of the data easily with SimpleLink.

    But there is a new problem. Still the data are not same on Putty and SimpleLink. When I connect GND to ADC pin, value on the Putty become 3 but in 3000 SimpleLink and after connecting 3.3V ADC pin, value on Putty become 3109 and 371200 on SimpleLink. I cannot find strong relationship between these values. I also take some floating measurment to solve relationship between Putty's and SimpleLink's value. But they do not have logic relation between each other. This may be due to the fact that the measurement taken in Putty is as long as the button is pressed, but the measurement taken in SimpleLink is periodic. But as long as button is not pressed, value on the SimpleLink does not change.  I attached them as a table. Also I attached screenshot of the GND and 3.3V measurement. 

    How can I make these values same ?  

  • Hi Riza, 

    I would debug this issue bug checking the values on the variables mydata and whatever output you have for the ADC and make sure they are the same. you can find the active values in the Expressions and Variables tab while debugging. I would also set the saving of the variable mydata in the same place you print out to putty.

    Kind Regards,

    Rogelio