weliem / bluez_inc

A C library for Bluez (BLE) that hides all DBus communication. It doesn't get easier than this. This library can also be used in C++.
MIT License
84 stars 19 forks source link

GDBUS error #12

Closed tchen61 closed 10 months ago

tchen61 commented 11 months ago

example/central.c produced

2023-10-02 19:20:30:669 DEBUG [Adapter] failed to call adapter method (error 36: GDBus.Error:org.bluez.Error.InvalidArguments: Invalid arguments in method call) 2023-10-02 19:20:30:787 DEBUG [Main] discovery 'started' (/org/bluez/hci0)

(process:23652): GLib-CRITICAL **: 19:20:30.962: g_str_has_prefix: assertion 'str != NULL' failed ^C2023-10-02 19:20:33:587 ERROR [Main] received SIGINT

weliem commented 11 months ago

The central.c application is working fine on my machine. So can you provide more information about when this error occurs? Did you change any code? Which adapter method is giving you the error?

You can also try to see if everything works when using the 'bluetoothctl' command.

tchen61 commented 11 months ago

i made a couple changes, otherwise the code would not compile: (agent.c and application.c) to include errno.h otherwise, no change

i am running ubuntu 18, bluetooth 5.53

On Tue, Oct 3, 2023 at 2:55 AM Martijn van Welie @.***> wrote:

The central.c application is working fine on my machine. So can you provide more information about when this error occurs? Did you change any code? Which adapter method is giving you the error?

You can also try to see if everything works when using the 'bluetoothctl' command.

— Reply to this email directly, view it on GitHub https://github.com/weliem/bluez_inc/issues/12#issuecomment-1744318610, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILERS46TLRU4JOXEBG373LX5OZHXAVCNFSM6AAAAAA5QEBIIOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBUGMYTQNRRGA . You are receiving this because you authored the thread.Message ID: @.***>

-- thomas chen cell: +1.240.401.7902

weliem commented 11 months ago

Right. Bluez 5.53 is super old and definitely not supported. The current version is 5.70. Try upgrading...

Not sure if it will work on Ubuntu 18 either. I am 22.04....but I'd first try to see if upgrading Bluez to a newer version solves your problem.

The examples compile file on my machine and no changes should be necessary