Log bridge sub-device error responses at INFO, not DEBUG
The feature_request path for Centurion sub-device features routes through centurion_bridge_request, which returned None silently when the sub-device replied with sub_feat_idx=0xFF (error marker). The existing log was at DEBUG, invisible for users whose -dd doesn't turn on DEBUG-level output. The write-returned-no-reply INFO we added recently caught mic-gain / sidetone / auto-sleep writes failing with no visible log about WHY. Bumping this log to INFO surfaces the original feat_idx, function, and error code so we can distinguish transport timeout vs device rejection, and debug what exactly the G522 dislikes about our writes. No behavior change — same return value (None), just more visible log.
This commit is contained in:
parent
d24677eb84
commit
acfd02abe8
|
|
@ -842,9 +842,18 @@ class Device:
|
|||
sub_feat_idx = reply_data[5]
|
||||
# Error response from sub-device
|
||||
if sub_feat_idx == 0xFF:
|
||||
error_code = reply_data[8] if len(reply_data) > 8 else 0
|
||||
# Error frame layout after sub_cpl: [0xFF, orig_feat_idx, orig_func_sw, error_code, ...]
|
||||
orig_feat_idx = reply_data[6] if len(reply_data) > 6 else 0
|
||||
logger.debug("bridge sub-device error: feat_idx=%d error=0x%02X", orig_feat_idx, error_code)
|
||||
orig_func_sw = reply_data[7] if len(reply_data) > 7 else 0
|
||||
error_code = reply_data[8] if len(reply_data) > 8 else 0
|
||||
# INFO level so the error is visible without -dd — lets testers see when
|
||||
# the device rejects a write even if they can't get DEBUG logs.
|
||||
logger.info(
|
||||
"bridge sub-device error: orig_feat_idx=%d orig_func=0x%02X error=0x%02X",
|
||||
orig_feat_idx,
|
||||
orig_func_sw,
|
||||
error_code,
|
||||
)
|
||||
return None
|
||||
return reply_data[7:] # response data after sub_cpl, sub_feat_idx, sub_func_sw
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue