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
Doing printf %s on an mdns text record is a bad idea since it's not only ASCII, it also has binary uint8 length bytes. When they happen to be 0x07 you get a beep, it's called the BELL character, referred to as control-G or ^G in caret notation.
bzbarsky-apple
changed the title
chip-tool beeps every time an mdns resolution is made
chip-tool (or anything on Darwin) beeps every time an mdns resolution is made
Aug 25, 2022
Instead, actually look at record lengths, remove the lengths in favor
of comma-separating the records, replace various things that are not
printable with hex escape sequences.
The new output ends up looking something like:
TXT:"SII=5000,SAI=2000,T=1"
Fixesproject-chip#21867
Instead, actually look at record lengths, remove the lengths in favor
of comma-separating the records, replace various things that are not
printable with hex escape sequences.
The new output ends up looking something like:
TXT:"SII=5000,SAI=2000,T=1"
Fixesproject-chip#21867
Instead, actually look at record lengths, remove the lengths in favor
of comma-separating the records, replace various things that are not
printable with hex escape sequences.
The new output ends up looking something like:
TXT:"SII=5000,SAI=2000,T=1"
Fixes#21867
isiu-apple
pushed a commit
to isiu-apple/connectedhomeip
that referenced
this issue
Sep 16, 2022
Instead, actually look at record lengths, remove the lengths in favor
of comma-separating the records, replace various things that are not
printable with hex escape sequences.
The new output ends up looking something like:
TXT:"SII=5000,SAI=2000,T=1"
Fixesproject-chip#21867
Problem
chip-tool beeps every time an mdns resolution is made. The beeping is caused by printf'ing the BELL character 0x07.
Doing printf %s on an mdns text record is a bad idea since it's not only ASCII, it also has binary uint8 length bytes. When they happen to be 0x07 you get a beep, it's called the BELL character, referred to as control-G or ^G in caret notation.
Proposed Solution
Do not printf random binary data with %s format specifier.
The text was updated successfully, but these errors were encountered: