You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
I am trying to read temperature values from a BLE Temperature sensor (bluemaestro tempo disc)
I am developing in c++ using tinyb library.
Relevant code snippet:
using Iter = std::vector<std::unique_ptr<tinyb::BluetoothDevice>>::const_iterator;
while (true)
{
for (Iter it = sensor_tag_array.begin(); it != sensor_tag_array.end(); ++it)
{
std::string address_ = (*it)->get_address();
std::map<uint16_t, std::vector<uint8_t>> mfg__ = (*it)->get_manufacturer_data();
for (auto it : mfg__)
{
if (it.second.empty())
logger_->error("{}, {} :Empty mfg for : {}", __FILENAME__, __func__, bleMap[address_].sensor_name);
else
{
if (it.second.front() == 23)
{
battery_lvl = it.second[1];
first_byte = it.second[6];
second_byte = it.second[7];
temperature = convert_to_actual(first_byte, second_byte) / 10.0;
std::cout << "\nTemperature is for : " << bleMap[address_].sensor_name << " : " << temperature << "\n";
}
}
}
}
This code was properly giving the correct relatime values until now. But suddenly it started printing a single constant reading each time the application is restarted. Whatever temperature value is first read at application startup is repeated throughout the application runtime. I used the tempo utility app to verify that the sensor is actually reporting the correct realtime values.
I tried re-installing the OS (Ubuntu 18.04.1), tried multple version of bluez ( 5.48 which is pre-installed,5.39 and 5.37) but the issue is still there. Tinyb file :libtinyb.so.0.5.1
I also changed the advertisement frequency in the bluemaestro device.
Any idea how to resolve this ?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am trying to read temperature values from a BLE Temperature sensor (bluemaestro tempo disc)
I am developing in c++ using tinyb library.
Relevant code snippet:
This code was properly giving the correct relatime values until now. But suddenly it started printing a single constant reading each time the application is restarted. Whatever temperature value is first read at application startup is repeated throughout the application runtime. I used the tempo utility app to verify that the sensor is actually reporting the correct realtime values.
I tried re-installing the OS (Ubuntu 18.04.1), tried multple version of bluez ( 5.48 which is pre-installed,5.39 and 5.37) but the issue is still there. Tinyb file :libtinyb.so.0.5.1
I also changed the advertisement frequency in the bluemaestro device.
Any idea how to resolve this ?
The text was updated successfully, but these errors were encountered: