Easy way to Print Strings to CySmart Mobile app via Bluetooth?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I am using ADC to monitor the voltage of an analog input value to my BLE Pioneer Kit. I am currently printing the voltage to putty. Is there an easy way to send these values via Bluetooth to a phone app by adding a few lines of code? Is there an easy way to print strings to the Cysmart app?

   

Thanks

0 Likes
1 Solution
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

You can add a custom service, with a single characteristic that represents the ADC reading. When updating this value, you can send a notification to the BLE app.

   

That way the BLE app receives the current value, and can also graph it if it wants to.

View solution in original post

0 Likes
5 Replies
Anonymous
Not applicable

The point of this project is I'm trying to continuously monitor the voltage of a sensor that is connected to analog in on my pioneer kit. I want to be able to use the mobile app to see the sensor reading. Does anyone have any projects that currently do this?  It would be even better if the mobile app could graph the voltage values in real time on the phone but this is not required.

0 Likes
cadi_1014291
Level 6
Level 6
25 likes received 10 likes received 10 likes given

Maybe this video series can help you https://www.youtube.com/watch?v=51uQKbztthg

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

You can add a custom service, with a single characteristic that represents the ADC reading. When updating this value, you can send a notification to the BLE app.

   

That way the BLE app receives the current value, and can also graph it if it wants to.

0 Likes
Anonymous
Not applicable

Thanks for your comment. When configuring the BLE settings, I created a custom profile with profile GATT and GAP peripheral. Then I set the custom service UUID to CAB5. When I get to custom characteristic, what should I set the UUID to if I'm trying to send ADC values? Also what descriptor properties should I check? I am brand new to this, so steps to set up the BLE would be very helpful. 

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

The UUID is generally a random constant used (by you/apps/software) to determine if you are accessing/reading/writing to the characteristic/service that you want to. Thus, the UUID will be auto-generated to a 128-bit value that you can use as a unique identifier (the 16-bit UUIDs are standard values assigned by the BLE SIG). As long as you use the same UUID when reading/writing from both BLE chips/phones/apps, then it will not matter what the specifc UUID is.

   

Thus, you can generate the custom characteristic in the BLE component, then check that you compare to that UUID constant value in the characteristic when you read/write to it from software.

   

The descriptor properties will set whether it allows Read/Write/Broadcast/etc. for data access. And the permissions allows some filtering for which encryption/authentication levels of access are available for each characteristic. (Generally, I would check Read if you want the other side to be able to read it, Write if you want the other side to be able to write it, and Notify if you want to be able to send notifications for that characteristic. The other check boxes have various applications/restrictions upon them, but generally not used imo).

   

If you look at the "Generate UUID" that I circled in the attached image, you can use this to create a relatively unique UUID rather than having to keep track of the values yourself (otherwise you can keep track yourself 🙂 )