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
Trying to set up multiple clients on the Pi3/bluez 5.66. Same issue on Pi4/bluez 5.78. Both using the internal and two USB adapters. The adapters get configured properly but binc_agentmanager_register_agent fails at binc_agentmanager_call_method twice.
The input adapter and agent path are unique (borrowing your random_string function from the application config previously), yet the error show it thinks the second attempt (with unique adapter and path) is a duplicate, and then fails at the default agent manager because it is null. I don't understand what the manager is doing??
Also noted there's no way to trap this type of error--can it be done? Thank you.
produces the following with hc0, hc1, hc2 initialized
`
//FIRST ADAPTER--No errors*******
[gl_client_agent_init_all]: Creating agent for adapter hci0 with path /org/bluez/BincAgent_EcTV...
2024-10-28 21:00:09:193 ERROR [Agent] [binc_agent_create]: bluez registered ok using adapter /org/bluez/hci0
[gl_client_agent_init_all]: Started agent '/org/bluez/BincAgent_EcTV'
//SECOND ADAPTER--errors*******
[gl_client_agent_init_all]: Creating agent for adapter hci1 with path /org/bluez/BincAgent_ez7Q...
2024-10-28 21:00:09:211 ERROR [Agent] [binc_agent_create]: bluez registered ok using adapter /org/bluez/hci1
[gl_client_agent_init_all]: Started agent '/org/bluez/BincAgent_ez7Q'
//THIRD ADAPTER--same errors*
[gl_client_agent_init_all]: Creating agent for adapter hci2 with path /org/bluez/BincAgent_HrO6...
2024-10-28 21:00:09:222 ERROR [Agent] [binc_agent_create]: bluez registered ok using adapter /org/bluez/hci2
Trying to set up multiple clients on the Pi3/bluez 5.66. Same issue on Pi4/bluez 5.78. Both using the internal and two USB adapters. The adapters get configured properly but
binc_agentmanager_register_agent
fails atbinc_agentmanager_call_method
twice.The input adapter and agent path are unique (borrowing your random_string function from the application config previously), yet the error show it thinks the second attempt (with unique adapter and path) is a duplicate, and then fails at the default agent manager because it is null. I don't understand what the manager is doing??
Also noted there's no way to trap this type of error--can it be done? Thank you.
Modified code from agent.c
Agent *binc_agent_create(Adapter *adapter, const char *path, IoCapability io_capability) { Agent *agent = g_new0(Agent, 1); agent->path = g_strdup(path); agent->connection = binc_adapter_get_dbus_connection(adapter); agent->adapter = adapter; agent->io_capability = io_capability; bluez_register_agent(agent); log_error( TAG, "[%s]: bluez registered ok using adapter %s", __func__ , binc_adapter_get_path( adapter )); // *******MY LINE binc_agentmanager_register_agent(agent); <<<<<<<<<<<<<<---FAILS HERE log_error( TAG, "[%s]: manager_registered", __func__ ); return agent; }
produces the following with hc0, hc1, hc2 initialized
`
//FIRST ADAPTER--No errors*******
[gl_client_agent_init_all]: Creating agent for adapter hci0 with path /org/bluez/BincAgent_EcTV...
2024-10-28 21:00:09:193 ERROR [Agent] [binc_agent_create]: bluez registered ok using adapter /org/bluez/hci0
[gl_client_agent_init_all]: Started agent '/org/bluez/BincAgent_EcTV'
//SECOND ADAPTER--errors*******
[gl_client_agent_init_all]: Creating agent for adapter hci1 with path /org/bluez/BincAgent_ez7Q...
2024-10-28 21:00:09:211 ERROR [Agent] [binc_agent_create]: bluez registered ok using adapter /org/bluez/hci1
(process:1684): GLib-CRITICAL **: 21:00:09.215: g_variant_unref: assertion 'value != NULL' failed
2024-10-28 21:00:09:216 ERROR [Agent] AgentManager call failed 'RegisterAgent': GDBus.Error:org.bluez.Error.AlreadyExists: Already Exists
(process:1684): GLib-CRITICAL **: 21:00:09.220: g_variant_unref: assertion 'value != NULL' failed
2024-10-28 21:00:09:220 ERROR [Agent] AgentManager call failed 'RequestDefaultAgent': GDBus.Error:org.bluez.Error.DoesNotExist: Does Not Exist
[gl_client_agent_init_all]: Started agent '/org/bluez/BincAgent_ez7Q'
//THIRD ADAPTER--same errors*
[gl_client_agent_init_all]: Creating agent for adapter hci2 with path /org/bluez/BincAgent_HrO6...
2024-10-28 21:00:09:222 ERROR [Agent] [binc_agent_create]: bluez registered ok using adapter /org/bluez/hci2
(process:1684): GLib-CRITICAL **: 21:00:09.226: g_variant_unref: assertion 'value != NULL' failed
2024-10-28 21:00:09:227 ERROR [Agent] AgentManager call failed 'RegisterAgent': GDBus.Error:org.bluez.Error.AlreadyExists: Already Exists
(process:1684): GLib-CRITICAL **: 21:00:09.231: g_variant_unref: assertion 'value != NULL' failed
2024-10-28 21:00:09:231 ERROR [Agent] AgentManager call failed 'RequestDefaultAgent': GDBus.Error:org.bluez.Error.DoesNotExist: Does Not Exist
`
The text was updated successfully, but these errors were encountered: