Need Help Sending BLE UART Broadcast


#21

Can you share a screenshot of the nRF Connect screen where it’s showing the Xenon data just so I know I’m looking in the right area.

Seems simple and my app is scanning and updating and the Xenon is connected is changing for some reason. I must be doing something wrong, trying to figure it out.


#22

@RWB here is the screenshot of a xenon advertising some sensor data (all values are integers)

Notice the 0xFFFF company ID. If you touch the data payload area you will be prompted for a format and when you select UTF-8 it will look like this. Note that values won’t change if the nRF app is not scanning.


#23

Thanks!

Ok, so I can get it to show up just like you on my Samsung Note 9 on the nRF Connect Android application.

The Data will not change on nRF Connect App on my Apple iPad Pro 11 which is, of course, running iOS.

I don’t like this solution because we can only really see the connected data broadcast with the special nRF Connect application. It’s cool that it’s a 1-to-Many broadcast but it’s awkward and nowhere near as clean as just seeing the data come in on the BLE UART application in my opinion.

I think the cleanest and easiest way to be able to read the data that the Gen3 BLE device is transmitting is via one of these options:

#1. Transmit the data over BLE as a Serial Data service transmission. Then there are quite a few different BLE Serial UART applications you can use to view this data easily on PC, Phone, or Tablet.

@ScruffR I would love to see the code you written modified to just broadcast the same info except just over BLE Serial UART so we can connect and just view it on one of the many BLE UART apps that are available.

#2. The 2nd best option for displaying this data, in my opinion, is viewing it via the Web BLE using the Chrome Browser which seems to work on most devices. This gives us lots of flexibility to make the data UI look a lot better than just a BLE Serial Terminal window.

@ScruffR If your up to the task of taking this Voltage, Current, Wattage, Temp example payload and plugging it into @rickkas7 's Web BLE example code that would be very helpful for everybody and should be added to the BLE example list.


I think BLE is powerful and exciting and I’m looking for the best ways to take advantage and use it for good without needing to build custom iOS & Andriod Apps to take advantage of it.


#24

The data will only change as long you are scanning. Once scanning is finished the updates stop. That’s expected.

That is not true. This app just has the ability to keep scanning and updating for extended periods. When you provide a custom app that does the same, it’ll just work the same.

Sure I’d be, but that’s mere boiler plate coding anybody could do too :wink:

Since the goal was to braodcast the data and UART is a point-to-point connection and not broadcasting I’d say the task is fulfilled with the code above.


#25

I had the IPad set to continuous scanning and the data would not update at all, but it would constantly update the data on the android version of the nRF Connect app.

Have you tested the nRF Connect app on a iOS device? I wonder if it’s the same for you and others?

Your right IF I had the ability or funds to pay to have a custom iOS & Android App made and approved by the Apple & Google Play stores so other people could download it.

Building a custom app is not a rabbit hole I want to go down right this second but I do think I have the ability format a custom webpage that uses Web BLE on a Chrome Browser so we can visualize data being sent out over BLE on the Gen3 devices and also send data from the browser to the Gen3 device.

I feel like if we created a more fully featured Web BLE template for everybody it would be helpful.

A WEB BLE template that showed the following would cover a large part of what a person would want to do with the devices.

#1. Show us how to send a Int, float, Char, and String from a Gen3 device to the Chrome Web BLE webpage. Basically just like @rickkas7 ‘s Web BLE example but with the different data types also being sent over and displayed individually on the webpage.

#2. Show how we can type data into a form field on the BLE Webpage, hit a submit button and then have that data stored as a new variable or char on the Gen 3 device so we can interact with the device we build with the new Gen3 brains.

Similar to what you did with your SoftAP pages on the Photon in the past to collect data that is used for programming the WIFi info and other data when a person first sets up a new device or product.

@rickkas7 @ScruffR Does that make sense? A BLE Webpage Setup Template version of the Soft AP webpage people used to pass the WiFi credentials to the Photon?

People could then take that and build out their own custom Web BLE setup page by simply modifying the example and then stylizing the page via a easy to use HTML editor/builder.

Building that example is beyond me but I know once I have a good example to follow I could expand from it and then modify the HTML to via a webpage editor and create simple clean user interfaces that are respectable without needing to have to deal with Android & iOS applications.

What are your thoughts on this?