Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eCompass and temperature not working #27

Open
amotl opened this issue Feb 25, 2023 · 32 comments
Open

eCompass and temperature not working #27

amotl opened this issue Feb 25, 2023 · 32 comments

Comments

@amotl
Copy link
Contributor

amotl commented Feb 25, 2023

Hi there,

at GH-12, we were aiming to unlock eCompass readings. However, @UserMacUseface, and @honigwald 1 both reported that compass- and temperature readings do not work yet with the recent 0.6.0 release. Bummer.

Nevertheless the eCompass (Yaw/Heading, Pitch, Roll) and the Temperature don't provide any readings.

With kind regards,
Andreas.

Footnotes

  1. https://github.com/maritime-labs/calypso-anemometer/issues/14#issuecomment-1445030260

@amotl
Copy link
Contributor Author

amotl commented Feb 25, 2023

Together with @UserMacUseface, we are also wondering why it would not work yet. I think I did not use the eCompass yet when conceiving this library, but I am almost sure I received valid readings for temperature and battery level in the past.

May I ask more details about your device? When did you buy it? Which firmware version does it run? Did you upgrade the firmware once already, or is it a vanilla device? Does it work when using the accompanying smartphone app?

P.S.: Same questions to you, @UserMacUseface. Thank you already!

@amotl
Copy link
Contributor Author

amotl commented Feb 25, 2023

Can I ask you both to invoke the program with the --debug option? Then, you should see corresponding debug output from the decode_reading() method, effectively Received buffer: and Decoded reading:. It probably will not lead anywhere, nevertheless I wanted to tell you about it.

@staticmethod
def decode_reading(data: bytearray, sender: Optional[int] = None):
logger.debug(f"Received buffer: {data}")
try:
reading = CalypsoReading.from_buffer(data)
except Exception as ex:
msg = f"Decoding reading failed. Reason: {ex}. Data: {data}"
logger.exception(msg)
raise CalypsoDecodingError(msg) from None
logger.debug(f"Decoded reading: {reading}")
return reading

calypso-anemometer --debug info
calypso-anemometer --debug read
calypso-anemometer --debug explore

@honigwald
Copy link

honigwald commented Feb 25, 2023

I bought my Calypso (the one you can see in picture of the README file here) recently.
Here are the information's from Calypso App:

Manufacturer Name: CALYPSO
Model Number: POR
Hardware Version: 3.0
Firmware Version: 2.18
Software Version: 1.41C   # Added from debug output

I didn't executed a FW-Upgrade yet.

@honigwald
Copy link

honigwald commented Feb 25, 2023

Can I ask you both to invoke the program with the --debug option? Then, you should see corresponding debug output from the decode_reading() method, effectively Received buffer: and Decoded reading:. It probably will not lead anywhere, nevertheless I wanted to tell you about it.

calypso-anemometer --debug info
calypso-anemometer --debug read
calypso-anemometer --debug explore

Will check the outcome later, since I've to leave it for today as it is but I attached the debug logs. :)

calypso_explore_debug.txt
calypso_info_debug.txt
calypso_read_debug.txt

@amotl
Copy link
Contributor Author

amotl commented Feb 25, 2023

Thank you very much. It may make sense to add the --compass=on option as well to the read command, like

calypso-anemometer --debug read --compass=on

Sorry for missing this.

@amotl
Copy link
Contributor Author

amotl commented Feb 25, 2023

info

From the info debug output, I can see the eCompass should be turned on. The response bytes for (mode, rate, compass) status are (\x02, \x01, \x01), translating to (CalypsoDeviceMode.NORMAL, CalypsoDeviceDataRate.HZ_1, CalypsoDeviceCompassStatus.ON).

Those lines within the explore output also indicate that the eCompass is turned on.

Found characteristic: 0000a003-0000-1000-8000-00805f9b34fb (Handle: 58): Vendor specific. 
Value: b'\x01'
  Found descriptor: 00002901-0000-1000-8000-00805f9b34fb (Handle: 60): Characteristic User Description
  Value: b'Activate clinometer and eCompass\x00'

read

Within the read output, those are the relevant lines where the actual reading at 00002a39-0000-1000-8000-00805f9b34fb is requested.

2023-02-25 09:09:05,651 [bleak.backends.bluezdbus.client] DEBUG   : Read Characteristic 00002a39-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_C7_4B_1B_80_61_92/service002f/char0030: bytearray(b'\x00\x00\x00\x00\nd\x00\x00\x00\x00')
2023-02-25 09:09:05,652 [calypso_anemometer.core  ] DEBUG   : Received buffer:  bytearray(b'\x00\x00\x00\x00\nd\x00\x00\x00\x00')
2023-02-25 09:09:05,653 [calypso_anemometer.core  ] DEBUG   : Decoded reading: CalypsoReading(wind_speed=0.0, wind_direction=0, battery_level=100, temperature=0, roll=-90, pitch=-90, heading=360)

\x00\x00\x00\x00\nd\x00\x00\x00\x00 does not yield much information, right?

explore

Last but not least, this is the corresponding conversation about the reading from the explore output. Here, the 10 byte reading response \x00\x00T\x00\nd\x00\x00\x00\x00 is equally thin as seen before.

2023-02-25 09:08:34,172 [calypso_anemometer.core  ] INFO    :   Found characteristic: 00002a39-0000-1000-8000-00805f9b34fb (Handle: 48): Heart Rate Control Point. properties=read,notify
2023-02-25 09:08:34,256 [bleak.backends.bluezdbus.manager] DEBUG   : received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_C7_4B_1B_80_61_92/service002f/char0030): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x00\x00T\x00\nd\x00\x00\x00\x00'))>}, []]
2023-02-25 09:08:34,259 [bleak.backends.bluezdbus.client] DEBUG   : Read Characteristic 00002a39-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_C7_4B_1B_80_61_92/service002f/char0030: bytearray(b'\x00\x00T\x00\nd\x00\x00\x00\x00')
2023-02-25 09:08:34,260 [calypso_anemometer.core  ] INFO    :   Value: b'\x00\x00T\x00\nd\x00\x00\x00\x00'
2023-02-25 09:08:34,261 [calypso_anemometer.core  ] INFO    :     Found descriptor: 00002901-0000-1000-8000-00805f9b34fb (Handle: 51): Characteristic User Description
2023-02-25 09:08:34,346 [bleak.backends.bluezdbus.manager] DEBUG   : received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_C7_4B_1B_80_61_92/service002f/char0030/desc0033): ['org.bluez.GattDescriptor1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'Principal\x00'))>}, []]
2023-02-25 09:08:34,350 [bleak.backends.bluezdbus.client] DEBUG   : Read Descriptor 51 | /org/bluez/hci0/dev_C7_4B_1B_80_61_92/service002f/char0030/desc0033: bytearray(b'Principal\x00')
2023-02-25 09:08:34,351 [calypso_anemometer.core  ] INFO    :     Value: b'Principal\x00'
2023-02-25 09:08:34,352 [calypso_anemometer.core  ] INFO    :     Found descriptor: 00002902-0000-1000-8000-00805f9b34fb (Handle: 50): Client Characteristic Configuration
2023-02-25 09:08:34,439 [bleak.backends.bluezdbus.manager] DEBUG   : received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_C7_4B_1B_80_61_92/service002f/char0030/desc0032): ['org.bluez.GattDescriptor1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x00\x00'))>}, []]
2023-02-25 09:08:34,442 [bleak.backends.bluezdbus.client] DEBUG   : Read Descriptor 50 | /org/bluez/hci0/dev_C7_4B_1B_80_61_92/service002f/char0030/desc0032: bytearray(b'\x00\x00')
2023-02-25 09:08:34,444 [calypso_anemometer.core  ] INFO    :     Value: b'\x00\x00'

@amotl
Copy link
Contributor Author

amotl commented Feb 25, 2023

Just to make sure: We do not see a regression here, do we? So, version 0.5.1 displays the same output? It can be installed using pip install calypso-anemometer==0.5.1.

^^ Edit: Probably not relevant, as the reading seem to be conducted properly, but \x00\x00\x00\x00\nd\x00\x00\x00\x00 clearly indicates that there is "not much to see here".

@amotl
Copy link
Contributor Author

amotl commented Feb 25, 2023

Better question:

Does it actually work, and yield valid readings, when using the accompanying smartphone app?

@amotl
Copy link
Contributor Author

amotl commented Feb 25, 2023

For custom BLE conversations and explorations, I found the nRF Connect for Mobile application (latest apk) very comprehensive and useful when investigating some BLE GATT ESS characteristics the other day 1. It may also help in this case, in order to have a third BLE client application around, to be able to compare between each other.

Recap:

characteristic uuid name description
0000a003-0000-1000-8000-00805f9b34fb Activate clinometer and eCompass 0x00 or 0x01, whether the compass is enabled or not.
00002a39-0000-1000-8000-00805f9b34fb Heart Rate Control Point The actual reading, a 10 bytes response, decoded with CalypsoReading.from_buffer().

The application is also displayed within the Calypso Ultrasonic developer manual.

Footnotes

  1. https://community.hiveeyes.org/t/implementing-ble-gatt-ess-characteristics-with-micropython/2413

@UserMacUseface
Copy link

Can I ask you both to invoke the program with the --debug option? Then, you should see corresponding debug output from the decode_reading() method, effectively Received buffer: and Decoded reading:. It probably will not lead anywhere, nevertheless I wanted to tell you about it.

@staticmethod
def decode_reading(data: bytearray, sender: Optional[int] = None):
logger.debug(f"Received buffer: {data}")
try:
reading = CalypsoReading.from_buffer(data)
except Exception as ex:
msg = f"Decoding reading failed. Reason: {ex}. Data: {data}"
logger.exception(msg)
raise CalypsoDecodingError(msg) from None
logger.debug(f"Decoded reading: {reading}")
return reading

calypso-anemometer --debug info
calypso-anemometer --debug read
calypso-anemometer --debug explore

Here we are from my side:
debug_info.txt
debug_read.txt
debug_explore.txt

@UserMacUseface
Copy link

Thank you very much. It may make sense to add the --compass=on option as well to the read command, like

calypso-anemometer --debug read --compass=on

Sorry for missing this.

Here with compass:
debug_read_w_compass.txt

@UserMacUseface
Copy link

UserMacUseface commented Feb 25, 2023

I bought my Calypso (the one you can see in picture of the README file here) recently. Here are the information's from Calypso App:

Manufacturer Name: CALYPSO
Model Number: POR
Hardware Version: 3.0
Firmware Version: 2.18
Software Version: 1.41C   # Added from debug output

I didn't executed a FW-Upgrade yet.

This is the info from my device:

Manufacturer Name: CALYPSO
Model Number: POR
Hardware Version: 2.50
Firmware Version: 2.20
Software Version: 1.30S

I did recently run a firmware upgrade.

@amotl
Copy link
Contributor Author

amotl commented Feb 25, 2023

@UserMacUseface: Thanks for sharing your debug logs. Your reading \x00\x00\x00\x00\td\x00\x00\x00\x00 also looks a bit thin? Don't you currently have any wind at your masttop?

read

2023-02-25 11:38:16,544 [calypso_anemometer.core  ] INFO    : Requesting reading
2023-02-25 11:38:17,012 [bleak.backends.bluezdbus.manager] DEBUG   : received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_CD_5D_43_7F_AD_75/service002f/char0030): ['org.bluez.GattCharacteristic1', {'Value': <dbus_next.signature.Variant ('ay', b'\x00\x00\x00\x00\td\x00\x00\x00\x00')>}, []]
2023-02-25 11:38:17,013 [bleak.backends.bluezdbus.client] DEBUG   : Read Characteristic 00002a39-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_CD_5D_43_7F_AD_75/service002f/char0030: bytearray(b'\x00\x00\x00\x00\td\x00\x00\x00\x00')
2023-02-25 11:38:17,013 [calypso_anemometer.core  ] DEBUG   : Received buffer:  bytearray(b'\x00\x00\x00\x00\td\x00\x00\x00\x00')
2023-02-25 11:38:17,014 [calypso_anemometer.core  ] DEBUG   : Decoded reading: CalypsoReading(wind_speed=0.0, wind_direction=0, battery_level=90, temperature=0, roll=-90, pitch=-90, heading=360)

explore

2023-02-25 11:39:34,117 [calypso_anemometer.core  ] INFO    : Found service: 0000180d-0000-1000-8000-00805f9b34fb (Handle: 47): Heart Rate
2023-02-25 11:39:34,117 [calypso_anemometer.core  ] INFO    :   Found characteristic: 00002a39-0000-1000-8000-00805f9b34fb (Handle: 48): Heart Rate Control Point. properties=read,notify
2023-02-25 11:39:34,213 [bleak.backends.bluezdbus.manager] DEBUG   : received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_CD_5D_43_7F_AD_75/service002f/char0030): ['org.bluez.GattCharacteristic1', {'Value': <dbus_next.signature.Variant ('ay', b'\x00\x00\x00\x00\td\x00\x00\x00\x00')>}, []]
2023-02-25 11:39:34,216 [bleak.backends.bluezdbus.client] DEBUG   : Read Characteristic 00002a39-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_CD_5D_43_7F_AD_75/service002f/char0030: bytearray(b'\x00\x00\x00\x00\td\x00\x00\x00\x00')
2023-02-25 11:39:34,217 [calypso_anemometer.core  ] INFO    :   Value: b'\x00\x00\x00\x00\td\x00\x00\x00\x00'

@UserMacUseface
Copy link

@UserMacUseface: Thanks for sharing your debug logs. Your reading \x00\x00\x00\x00\td\x00\x00\x00\x00 also looks a bit thin? Don't you currently have any wind at your masttop?

read

2023-02-25 11:38:16,544 [calypso_anemometer.core  ] INFO    : Requesting reading
2023-02-25 11:38:17,012 [bleak.backends.bluezdbus.manager] DEBUG   : received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_CD_5D_43_7F_AD_75/service002f/char0030): ['org.bluez.GattCharacteristic1', {'Value': <dbus_next.signature.Variant ('ay', b'\x00\x00\x00\x00\td\x00\x00\x00\x00')>}, []]
2023-02-25 11:38:17,013 [bleak.backends.bluezdbus.client] DEBUG   : Read Characteristic 00002a39-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_CD_5D_43_7F_AD_75/service002f/char0030: bytearray(b'\x00\x00\x00\x00\td\x00\x00\x00\x00')
2023-02-25 11:38:17,013 [calypso_anemometer.core  ] DEBUG   : Received buffer:  bytearray(b'\x00\x00\x00\x00\td\x00\x00\x00\x00')
2023-02-25 11:38:17,014 [calypso_anemometer.core  ] DEBUG   : Decoded reading: CalypsoReading(wind_speed=0.0, wind_direction=0, battery_level=90, temperature=0, roll=-90, pitch=-90, heading=360)

explore

2023-02-25 11:39:34,117 [calypso_anemometer.core  ] INFO    : Found service: 0000180d-0000-1000-8000-00805f9b34fb (Handle: 47): Heart Rate
2023-02-25 11:39:34,117 [calypso_anemometer.core  ] INFO    :   Found characteristic: 00002a39-0000-1000-8000-00805f9b34fb (Handle: 48): Heart Rate Control Point. properties=read,notify
2023-02-25 11:39:34,213 [bleak.backends.bluezdbus.manager] DEBUG   : received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_CD_5D_43_7F_AD_75/service002f/char0030): ['org.bluez.GattCharacteristic1', {'Value': <dbus_next.signature.Variant ('ay', b'\x00\x00\x00\x00\td\x00\x00\x00\x00')>}, []]
2023-02-25 11:39:34,216 [bleak.backends.bluezdbus.client] DEBUG   : Read Characteristic 00002a39-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_CD_5D_43_7F_AD_75/service002f/char0030: bytearray(b'\x00\x00\x00\x00\td\x00\x00\x00\x00')
2023-02-25 11:39:34,217 [calypso_anemometer.core  ] INFO    :   Value: b'\x00\x00\x00\x00\td\x00\x00\x00\x00'

Well with calypso-anemometer --debug read --compass=on I always get 0 values for wind
debug_read.txt

However when invoking read with --subscribe , I get proper values.

@amotl
Copy link
Contributor Author

amotl commented Feb 25, 2023

Hi again. GH-28 has some important information about the compass, its intention, and quality. On the matter here, the FAQ has a few interesting items:

Q: I am going to install my device, is it necessary to recalibrate it?

A: Yes. You need to calibrate your compass depending on your geographical area to compensate
magnetic declination and depending and on the magnetic nature of your boat to compensate
magnetic deviation.

Q: I calibrate the compass but it doesn't work fine.

A: Repeat compass calibration turning the device slower, to minimize deviation. Still, this is a secondary sensor and it will not deliver the features of a professional dedicated compass.

@UserMacUseface
Copy link

In the current version of the Calypso "Anemotracker" app, I get -... for pitch and roll and 000 for Heading:
In this version there is also no way to see the devices temperature reading.
IMG_0051
There is a button for calibration in the app settings, but pressing it yields an error message telling me I should enable the clinometer first. Unfortunately there is no button for this.
IMG_2F21DEAF9FFA-1

@amotl
Copy link
Contributor Author

amotl commented Feb 25, 2023

@UserMacUseface: Those lines from your explore debug output indicate that the eCompass indeed pretends to be turned on already.

2023-02-25 11:39:34,916 [calypso_anemometer.core  ] INFO    :   Found characteristic: 0000a003-0000-1000-8000-00805f9b34fb (Handle: 58): Vendor specific. properties=read,write
2023-02-25 11:39:35,066 [calypso_anemometer.core  ] INFO    :   Value: b'\x01'
2023-02-25 11:39:35,067 [calypso_anemometer.core  ] INFO    :     Found descriptor: 00002901-0000-1000-8000-00805f9b34fb (Handle: 60): Characteristic User Description
2023-02-25 11:39:35,216 [calypso_anemometer.core  ] INFO    :     Value: b'Activate clinometer and eCompass\x00'

@amotl
Copy link
Contributor Author

amotl commented Feb 25, 2023

Once more,

on the quest for the eCompass

#27 (comment) says:

[The compass] is a secondary sensor and it will not deliver the features of a professional dedicated compass.

Combined with what we learned here and at GH-28, I'd say it's clear that even though Calypso used to clearly state in the earlier documentation what expectations you can have about this sensor, they now stopped promoting the sensor at all. Of course, I then wonder why they still have the values displayed in their app at all.

@amotl
Copy link
Contributor Author

amotl commented Feb 25, 2023

There is a button for calibration in the app settings, but pressing it yields an error message telling me I should enable the clinometer first. Unfortunately there is no button for this.

Apparently, there has been corresponding machinery in an earlier version?

image

-- https://r-p-r.co.uk/downloads/calypso/Anemotracker_App.pdf, p. 9

@UserMacUseface
Copy link

Hi again. GH-28 has some important information about the compass, its intention, and quality. On the matter here, the FAQ has a few interesting items:

Q: I am going to install my device, is it necessary to recalibrate it?

A: Yes. You need to calibrate your compass depending on your geographical area to compensate magnetic declination and depending and on the magnetic nature of your boat to compensate magnetic deviation.

Q: I calibrate the compass but it doesn't work fine.

A: Repeat compass calibration turning the device slower, to minimize deviation. Still, this is a secondary sensor and it will not deliver the features of a professional dedicated compass.

That should make us remove compass and temp.
What good is unreliable data.
Keep it simple

@UserMacUseface
Copy link

Apparently, there has been corresponding machinery in an earlier version?

Indeed. But not anymore, guess why ... :)

@amotl
Copy link
Contributor Author

amotl commented Feb 25, 2023

I am excited what @honigwald will report about this.

@amotl
Copy link
Contributor Author

amotl commented Feb 25, 2023

[1] also has excellent information about this topic.

PLEASE NOTE: THESE INSTRUCTIONS ARE FOR THE OLDER GENERATION CALYPSO ULTRASONIC THAT CONTAINS A COMPASS. THE INSTRUCTIONS ARE SPECIFIC TO MARKSETBOT USERS AND SHOULD NOT BE USED BY ANYONE ELSE (THEY WILL DAMAGE THE LATEST HARDWARE).

If you bought a Calypso Ultra to use with your MarkSetBot, it is essential that you upgrade the firmware and calibrate/swing the Calypso Ultra wind instrument's compass. Both tasks are fairly technical.

The compass must be calibrated before it will work well. The Anemotracker app has a compass calibration/swing feature. For calibration to work correctly, the Refresh rate needs to be set to 1Hz from 4Hz during calibration. We are hoping that Calypso will build that in to their app automatically in the future.

It is critical that you calibrate in an area that does not have magnetic interference. This is more difficult than you would think. It is recommended that you take a hand bearing compass and walk around a space to make sure it reports correctly. We have found many docks and hoist areas at clubs have so much interference that they will report 90 degrees wrong with a hand bearing compass.

[1] https://marksetbot.zendesk.com/hc/en-us/articles/360008783734-How-do-you-properly-calibrate-swing-the-compass-in-the-Calypso-Anemotracker-instrument-when-attached-to-the-MarkSetBot-What-to-do-if-the-wind-dir-spd-graph-doesn-t-work-

@UserMacUseface
Copy link

Tried to calibrate the compass using the nRF connect mobile application to no avail.
Maybe these sensors have been disabled.
I will see if Calypso can confirm that.

@honigwald
Copy link

honigwald commented Feb 26, 2023

Hi! Sorry that it took me some time to test/reply.
I tried nRF App with two Calypsos (Mini, Portable) and at booth devices I can't activate, calibrate or read compass values.
Maybe Calypso removed the eCompass due to semiconductor bootle neck xD...

On the other hand, I was able to gather information about the battery level, so no clue why we're not able to collect this data through the py-libary, too. Or did I miss something?

@UserMacUseface
Copy link

Well. Battery is non problem. It seems however that nRF can access the battery level via an undocumented service which displays the level with two digits instead of one.
Screenshot 2023-02-26 at 10 46 26

Do you get a temperature reading other then 64?

@amotl
Copy link
Contributor Author

amotl commented Feb 26, 2023

eCompass

Thank you also for reporting back. I think we can cancel our quest for the eCompass, right. @UserMacUseface is trying to get some more feedback from Calypso about it.

Battery level

Observation

On the "battery level" reading, @UserMacUseface also found that the device responds with zero (0x00) within the response when reading the "Heart Rate Control Point" characteristic 00002a39-0000-1000-8000-00805f9b34fb.

Investigations

On the other hand, he discovered that the device may use the generic Battery Level characteristic GENERIC_GATT_DEVICE_BATTERY_LEVEL_UUID (00002a19-0000-1000-8000-00805f9b34fb) from the Battery Service 0000180f-0000-1000-8000-00805f9b34fb instead.

image

Maybe the newer firmware releases are encoding the data differently. Using a standard characteristic is a good thing in general, but we will need to adjust the driver.

Details

This is the corresponding part of the explore log of your devices:

2023-02-25 09:08:31,576 [calypso_anemometer.core  ] INFO    : Found service: 0000180f-0000-1000-8000-00805f9b34fb (Handle: 34): Battery Service
2023-02-25 09:08:31,578 [calypso_anemometer.core  ] INFO    :   Found characteristic: 00002a19-0000-1000-8000-00805f9b34fb (Handle: 35): Battery Level. properties=read,notify
2023-02-25 09:08:31,653 [calypso_anemometer.core  ] INFO    :   Value: b'd'
2023-02-25 09:08:31,654 [calypso_anemometer.core  ] INFO    :     Found descriptor: 00002902-0000-1000-8000-00805f9b34fb (Handle: 37): Client Characteristic Configuration
2023-02-25 09:08:31,743 [calypso_anemometer.core  ] INFO    :     Value: b'\x01\x00'
2023-02-25 11:39:32,964 [calypso_anemometer.core  ] INFO    : Found service: 0000180f-0000-1000-8000-00805f9b34fb (Handle: 34): Battery Service
2023-02-25 11:39:32,964 [calypso_anemometer.core  ] INFO    :   Found characteristic: 00002a19-0000-1000-8000-00805f9b34fb (Handle: 35): Battery Level. properties=read,notify
2023-02-25 11:39:33,067 [calypso_anemometer.core  ] INFO    :   Value: b'^'
2023-02-25 11:39:33,067 [calypso_anemometer.core  ] INFO    :     Found descriptor: 00002902-0000-1000-8000-00805f9b34fb (Handle: 37): Client Characteristic Configuration
2023-02-25 11:39:33,165 [calypso_anemometer.core  ] INFO    :     Value: b'\x01\x00'

Those are the decoded values:

>>> int.from_bytes(b'd', byteorder='little', signed=False)
100
>>> int.from_bytes(b'^', byteorder='little', signed=False)
94

@honigwald
Copy link

Well. Battery is non problem. It seems however that nRF can access the battery level via an undocumented service which displays the level with two digits instead of one. Screenshot 2023-02-26 at 10 46 26

Do you get a temperature reading other then 64?

Sadly not. I also got only 0x64 as temprature value back and it won't change not matter what I do.
Today I contacted calypso as well to see if this is FW related and if there is coming a new release in the future which will suppport Temp and Compass.

@amotl
Copy link
Contributor Author

amotl commented Feb 28, 2023

Hi again,

The newer device generations seem to implement emitting data on generic BLE characteristics and services. For example, the Battery Level characteristic GENERIC_GATT_DEVICE_BATTERY_LEVEL_UUID (00002a19-0000-1000-8000-00805f9b34fb) from the Battery Service 0000180f-0000-1000-8000-00805f9b34fb seems to be used.

In the same spirit, your devices now seem to use the generic Environmental Sensing Service 0000181a-0000-1000-8000-00805f9b34fb for emitting wind data on those characteristics, see GATT » Environmental » Wind UUIDs:

  • Apparent Wind Speed 00002a72-0000-1000-8000-00805f9b34fb
  • Apparent Wind Direction 00002a73-0000-1000-8000-00805f9b34fb

Using a standard characteristic is a good thing in general, but we will need to adjust the driver.

With kind regards,
Andreas.

2023-02-25 09:08:32,508 [calypso_anemometer.core  ] INFO    : Found service: 0000181a-0000-1000-8000-00805f9b34fb (Handle: 38): Environmental Sensing
2023-02-25 09:08:32,509 [calypso_anemometer.core  ] INFO    :   Found characteristic: 00002a73-0000-1000-8000-00805f9b34fb (Handle: 43): Apparent Wind Direction. properties=read,notify
2023-02-25 09:08:32,600 [calypso_anemometer.core  ] INFO    :   Value: b'\xd0 '
2023-02-25 09:08:32,601 [calypso_anemometer.core  ] INFO    :     Found descriptor: 00002901-0000-1000-8000-00805f9b34fb (Handle: 46): Characteristic User Description
2023-02-25 09:08:32,692 [calypso_anemometer.core  ] INFO    :     Value: b'Wind direction\x00'
2023-02-25 09:08:32,697 [calypso_anemometer.core  ] INFO    :     Found descriptor: 00002902-0000-1000-8000-00805f9b34fb (Handle: 45): Client Characteristic Configuration
2023-02-25 09:08:32,778 [calypso_anemometer.core  ] INFO    :     Value: b'\x00\x00'
2023-02-25 09:08:32,779 [calypso_anemometer.core  ] INFO    :   Found characteristic: 00002a72-0000-1000-8000-00805f9b34fb (Handle: 39): Apparent Wind Speed. properties=read,notify
2023-02-25 09:08:32,867 [calypso_anemometer.core  ] INFO    :   Value: b'\x00\x00'
2023-02-25 09:08:32,868 [calypso_anemometer.core  ] INFO    :     Found descriptor: 00002902-0000-1000-8000-00805f9b34fb (Handle: 41): Client Characteristic Configuration
2023-02-25 09:08:32,955 [calypso_anemometer.core  ] INFO    :     Value: b'\x00\x00'
2023-02-25 09:08:32,956 [calypso_anemometer.core  ] INFO    :     Found descriptor: 00002901-0000-1000-8000-00805f9b34fb (Handle: 42): Characteristic User Description
2023-02-25 09:08:33,045 [calypso_anemometer.core  ] INFO    :     Value: b'Wind speed\x00'

@amotl
Copy link
Contributor Author

amotl commented Mar 7, 2023

Hi again,

we have a few news. Calypso is now designating the Developer manual 1.0, called CALYPSO ULTRASONIC Portable Solar & Mini Developer Manual, as the official one. Also, we received those statements:

Battery level is still legacy service with wind direction and battery service 1-9. The new ones are Environmental service and Battery Level which control Wind direction, speed, and battery levery are from 0-100.

The difference between hardware 2.5 or 3.0 is just changes for internal purposes in the manufacturing department and there is nothing different for the customer or in how it will work.

As for secondary sensors, the units used to have secondary sensors a couple of generations ago, but the models nowadays do not have secondary sensors. Information like location and temperature is acquired from the internet. The wind reading will not be affected by heel or roll and has a damping in place for pitch. The wind sensors give wind direction and wind speed.

With kind regards,
Andreas.

References

@honigwald
Copy link

Thanks again, @amotl!

Calypso didn’t respond to my mail request until now. I’m a little bit sad that they removed? eCompass, but good to know that they changed to another official dev guide.

@honigwald
Copy link

honigwald commented Mar 14, 2023

Hi all,
bad news from Calypso support.

Received on 09.03.2023:

Hi Simon,

Thank you for writing to us! Actually our devices don't have eCompass anymore. I have attached our latest version of the Developer's manual for your records.

Let me know if you need anything!

Best regards,

Rebekah

Looks like there is no chance to activate something, which is not present anymore...very sad, that they removed the hardware without notice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants