DC_BLUETOOTH_STR2ADDR(3)
π DC_BLUETOOTH_STR2ADDR π
okay bestie, so this is the manual page for dc_bluetooth_str2addr β yes that's the whole title, we're not copying the header line, we're just saying hi to it here. It's a section 3 library function page, and it lives in the library βlibdivecomputerβ π«Ά.
πΈ NAME πΈ
dc_bluetooth_str2addr β converts a string into a bluetooth address. literally its whole job. no cap.
π LIBRARY π
library βlibdivecomputerβ β¨ (yes, the whole library, that's the flex)
π¦ SYNOPSIS π¦
#include <libdivecomputer/bluetooth.h>
dc_bluetooth_address_t
dc_bluetooth_addr2str(const char *address);
okay don't come for me, this is exactly what the page says β I'm copying it character for character because that's the rule and I respect the rules π . Yes the function in the synopsis has a different name from the one in the title. Not my business! It's giving "the manpage author had a long day" and honestly? same. π
β DESCRIPTION β
So the vibe here is: convert a string to a bluetooth address π. That's it, that's the function.
The string address you hand over needs to be in the format XX:XX:XX:XX:XX:XX, where each XX is a hexadecimal number specifying an octet of the 48-bit address. Six octets. Six little hex pairs. Colon-separated. iconic format honestly π.
And if you ever need to go the other direction β address back into a string β you do that with dc_bluetooth_addr2str(3). They're a matching set, a little duo, main character energy from both of them π.
bestie do NOT pass in some random string and expect magic. The format is XX:XX:XX:XX:XX:XX, hex, six octets, 48-bit address. That's the whole contract π₯.
π RETURN VALUES π
It returns the bluetooth address represented as a 48-bit number β. That's the tea. That's what you get back.
π§ SEE ALSO π§
dc_bluetooth_addr2str(3)β the reverse one, the other half of the duo π
π AUTHORS π
The library βlibdivecomputerβ library (yes, it says it like that, I'm keeping it, don't @ me π) was written by Jef Driesen, jef@libdivecomputer.org. π
This manpage is written by Vincent Hagen, vinnie@script4web.nl. π
and that's the whole page bestie, go forth and convert your strings π β¨
πΈ sign-off time: this one came from Debian, dated June 5, 2020 β a little vintage, a little timeless, absolutely ate. π«Άπ
π¦ where this page comes from
- nixos 26.05: libdivecomputer 0.9.0
- nixpkgs unstable: libdivecomputer 0.9.0
- Copyright (C) 2020 Vincent Hagen <vinnie@script4web.nl>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms