Sensor Tag CC2650 - reading movement sensor - sensors

Is there any way to read data continuously upon request without using notifications? Thank you for your help.

If you want an app capable of working with all the sensors from CC2541DK, CC2650STK, ThunderBoard React and Sense (e.g. accelerometer., magnetometer, gyroscope etc.), you can download it from: BLE SensorTags (blessTags) – the software is able of giving new uses (movement & magnetic security, accelerometer mouse, PC remote control and wireless presenters) to all these IoT SensorTags. For more info: Bluetooth low energy SensorTag.

Yes, it is possible. You have notifying and reading mechanism of data transfer - in CC2650 almost all characteristics support both mechanism of data transfer. But other characteristics can only be accessed based only one method of data reading. One such example is the reading of the buttons states on the CC2650STK and CC2541DK that can only be read by means of the notification mechanism. But, notifications is preferred if you need a higher data transfer rate between the SensorTag and your application.

Related

Rust STM32: webUSB publishing sensors

For a hobby project using the stm32f1xx-hal, I'm wanting to periodically read a sensor and then push the values such that I can graph them realtime in a webUSB app.
I have found an example in webusb_blinky by mvirkkunen which demonstrates the connectivity portion, but it's not clear to me how I would adapt it to publish sensor values. Should I be overriding control_in?
Any suggestions/help would be appreciated. Thanks!
You could define a control transfer that requested the device respond with the current sensor values but the more natural USB mechanism for publishing sensor updates is with an IN endpoint.
The usbd-serial module is the best example I can find of creating and using endpoints with this framework. A serial port consists of both an IN and OUT endpoint for bidirectional streaming of data. For your application you would only need the IN endpoint since the device only generates data.

Interacting with BLE Cycle Trainer

My current is on Flutter using Dart and working with Bluetooth low energy devices. I have the basics up using this library and am able to do the following
1. Search for devices and list
2. Connect to device
3. Retrieve services and read characteristic values
4. Subscribe to changes on characteristics.
In order to interact with device correctly I need to read and write from the correct services/characteristics to read data and set things like resistance on the flywheel
I have used the below link and have started mapping out the services, however although the reading can be worked out. The writing to characteristics is a bit out of my reach.
https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.cycling_power.xml
The question is.
Does any have experience working BLE cycle trainers and could provide
some insight into how to read and manage services and characteristics
appropriately?

Multiple Eddystone-URL/UID's from same Bluetooth Beacon?

Is it possible to program a BT beacon to advertise a sequence of different Eddystone-URL/UID's in sequence? I imagine I could from something like a Raspberry Pi3 with a BT adapter, but I was wondering about something like an actual beacon.
Yes, this is possible. This technique is called "interleaving", and it is possible to do with both software beacons and hardware beacons.
Eddystone actually relies on this technique in order to match its multiple frames. When a receiver sees an Eddystone-TLM frame coming from the same device as Eddystone-URL or Eddystone-UID, it knows that the telemetry is for that beacon frame.
Using the same technique, it is possible to send out multiple URL or UID frames from the same device using different identifiers for each frame. Some commercial manufacturers such as Radius Networks support doing this in some of their products.
I dont think so. Im pretty sure you would need to have some smart device nearby that is running a program that is periodically changing the UIDs. The micro-controllers that power these beacons are pretty bare bones and are really optimized for transmitting bluetooth signals.
Here's how to do it.
EddyStone supports four types of payloads/frame-formats i.e, UID, URL, TLM, and EID.
Eddystone UID/EID are the frame-formats to use for this purpose.
As far as using the 'NordicSemiconductor NRF line' of beacons just make sure that these are fully Eddystone compliant i.e, support the EID frame-format.
Freely available Google Beacon Cloud platform is great for trying this out (called 'registering and provisioning your beacon').
It can be implemented w/o building or requiring any custom app at the client end.
On the client-side.
Use 'Google Nearby Notifications' & 'Google Nearby Messages'
On the server/cloud-side.
Google Proximity API for 'registering and provisioning your beacon'
Use 'Google Nearby Messages' API
Good luck with your project .

Bluetooth 4.0 LE -- Conceptual -- Sending data form master to peripheral AND from peripheral to master

In Bluetooth, specifically 4.0 LE (if this changes anything), what is the way to send data both ways, from master to slave and from slave to master?
What kind of protocol is it better to design? Can you please provide an example of an application level protocol that is typically used in this scenario?
In this case, should the peripheral run two services, one used for sending data to the device and another to receive data from the device? (The "device" is the peripheral/slave).
The most forward way of doing this would be to define a custom service which defines the data types and fields and access you need as characteristics, and implement this on both the peripheral and central. If you are looking for a symmetric system, you can implement the same service on both sides. If there is differences in how the two devices access/send data, you can implement two different services, suiting your needs. Either way, you will need both the slave and master peripherals to support both GATT server and GATT client.
Depending on what you want to do, you could either push data using notifications (unconfirmed, you may miss updates on the receiving side) or indications (confirmed, the receiving side will have to acknowledge the push), or you could pull the data using read commands. You could also combine these in various ways, and you could implement access to different data in different ways in your service(s).
I recommend taking a look at the different Bluetooth Low Energy vendors' dev kits and APIs, as well as the different phone/tablet APIs and examples, depending on which platform you aim to develop on/ are familiar with.

Wireless protocol for accelerometer data

I'm building an application where a mobile phone with an accelerometer is used to control an app on a computer in a similar way you would use a mouse. So I need to send the movement from the phone to the computer over some wireless protocol. I am thinking about using Bluetooth but I am not sure what transfer delay to expect. Another possibility is using 802.11g. What do you think? What delay could I expect given that I don’t hit the bandwidth limit?
I worked with a group at Motorola who linked up an external accelerometer pack to a mobile phone using Bluetooth. This work supported a mobile games development class at USC's GamePipe Laboratory, and the speed was sufficient to control the mobile games developed by the students. You'll need to make sure your handset's Bluetooth stack has the correct profile enabled to allow data communication.
Another advantage of Bluetooth over 802.11g is that the frequency hopping Bluetooth uses will make it less vulnerable to interference by all the other 802.11 devices in the vicinity, which sit on one frequency.
I wouldn't expect the amount of data sent by an accelerometer would give Bluetooth any problems.

Resources