muka / go-bluetooth

Golang bluetooth client based on bluez DBus interfaces

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mesh.NewNetwork1 fails

matsjorg opened this issue · comments

I am trying to get a bluetooth mesh up and running. I have compiled bluez with mesh-support and am able to provision units using mesh-cfgclient. Now I want to do the same from Go.

I include "github.com/muka/go-bluetooth/bluez/profile/mesh" and try to make a new network:

network, err := mesh.NewNetwork1()
	if err != nil {
		log.Error(err)
		return err
	}

This fails with the error:

ERRO[0000] Properties.GetAll org.bluez.mesh.Network1: No matching method found 

It looks like on line 32 of gen_Network1.go, you call GetProperties() to get all the properties of the interface. However, it looks like the interface org.bluez.mesh.Network1 does not have properties, only methods, and as a result, GetProperties returns an error.

I might have misunderstood how the library is supposed to be used, so it would also be very good if any mesh-examples were added to the examples-folder.

I have attached a minimal reproducible code to illustrate the issue, and the output from bluetooth-mesh --dbus-debug

dbus.txt
main.txt

Hi there, there may be a bluez API mismatching here. I do not have equipment to try out and cannot help much. Please open a PR if you find a way. Thanks!