DC_BLUETOOTH_STR2ADDR(3)

πŸ“¦ version 0.9.0, in nixos 26.05, nixpkgs unstable

πŸ’– 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 🧚


πŸ’œ 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