Help with Bluetooth Low Energy Mesh In Unity3d, Provisioning?

Hello,

I have been working on trying to get Bluetooth mesh to work in Unity trying to support iOS, Android and UWP.
I will have to write most things from scratch.
At this moment I have looked trough guides provided by Bluetooth and at nRF-Mesh Library for Android source code to get me there.
But now at this moment I got stuck not understanding what messages I have to send.

I use the Thingy52 and flashed mesh firmware on it.
A android tabled to test.
Unity3d using c# as programming language.

I can connect to the Thingy52 and start the provisioning process which seems to be successful.
When I am done with that I have to reconnect and subscribe and write to new characteristics. Proxy? characteristics.
Which is also successful.

After subscribing to Proxy Out("00002ade-0000-1000-8000-00805f9b34fb")
I get a message of type Beacon.
Which I then use to compare some data and check if it is all correct, it appears to be so!
After that I get stuck and I have no clue what information I have to send.

When playing around with the nRF Mesh app and logging information, I noticed that the first time you subscribe to Proxy Out(after provisioning) there is information going back and forth several times. I want to know what these messages are and how they work. Slight smile

It would be this part of my nRF Mesh app, adb logcat log.

MeshManagerApi: Received mesh beacon: SecureNetworkBeacon { KeyRefreshActive: false, IV Index: IV Index: 0, IV Update Active: false, Authentication Value: 0x700247B91DF6BEC6}
MeshManagerApi: Secure Network Beacon authenticated.
MeshManagerApi: Last IV Index: 0       
MeshManagerApi: MeshNetwork pdu sent: 0x0041D70E6CD46F67E6A35D3FBC07EF72B4A321BC8E12
MeshManagerApi: Received network pdu: 0x0041F3453AE63045D1FAAF2EF6B5719AE35F003BFF53ED697EFFE41DF501
MeshManagerApi: MeshNetwork pdu sent: 0x00415420F4DCD9F1D24C8AF2CA1B0B1ABE8C7C37337E288B56
MeshManagerApi: Received network pdu: 0x00410B9C72A46FDB4E16BB188CB052B068682B0C63FD98CAE0841E3A6E66
MeshManagerApi: MeshNetwork pdu sent: 0x00414314FA1999CB4F256405BE00677B82B827C14704A0EE66
MeshManagerApi: Received network pdu: 0x004109A6443548E2008506A907A3ECE7DF11FC1F23BE31AD9CAC
MeshManagerApi: MeshNetwork pdu sent: 0x00410D41CB18DF861DFFFBE537C111979E99E96205FAB21B08
MeshManagerApi: Received network pdu: 0x0041DAB4321664F7727E67FC379EDDA82024E09F15C300A4C75938469D89
MeshManagerApi: MeshNetwork pdu sent: 0x004196909F76310C3E32CDDDC1F4F6777EC9FEF103
MeshManagerApi: Received network pdu: 0x004153DD885356B9A3CF4B0B350F649C5E630204BD6BB7D738FA1F6E1782
MeshManagerApi: Received network pdu: 0x004187EFB8026192D27E23F9152FE380209FA1656107D4BC951D
MeshManagerApi: Received network pdu: 0x0041AF2A3CBAFA4C4FA1169F825E5D9E0BC73E52D9BCA0B5F43D
MeshManagerApi: Received network pdu: 0x00413185E343CD92BC8A37E24DB1F4FBB19A660C1664
MeshManagerApi: MeshNetwork pdu sent: 0x00411CCF0DB5FA64B7F45960CD825B208ABB600CA480
MeshManagerApi: Received network pdu: 0x0041359DDCEC8FDA661B6E8BDCB606BA4837F3D25F83
MeshManagerApi: MeshNetwork pdu sent: 0x00410D1C394AB065D36DC09003AD870D5C1DD63254005E8D1DA317042996
MeshManagerApi: MeshNetwork pdu sent: 0x0041DC582BBE560F62DE65A08E56EDE4BE02E7D03C0745D42785FE41C04E
MeshManagerApi: Received network pdu: 0x0041C2C04061204D53DCC783FCEA2DBF78E27944CB5B68D399
MeshManagerApi: Received network pdu: 0x004109C6BC59BBA401C0E13A622EC122756A7F64D4A7B34ED9

I believe this is a exchange I need to do before I can do other things.

I hope someone can help me out, I am new to this, I usually program just games in Unity :)

Parents
  • Hi

    Basically upon provisioning a mesh node you need to configure the newly provisioned device so that it can be controllable. The logs that you have filtered out are related to this, so far you've done correctly by validating the secure network beacon. The rest of the messages are sent by the mesh app to configure the node as I have mentioned above. THe app sends a CofigCompositionDataGet which returns a ConfigCompositionDataStatus message that contains the composition of the node i.e. number of elements, number of SIG/vendor models and features supported by the node etc. Once the composition of the node is known, you can start by adding application keys to the node which you can bind to a model(s) in order to be able to send messages to control them. This would be minimal configuration steps to get a node up and running. I would also recommend going through the bluetooth mesh specification if you have no already and may be look at some of our examples (Light Server) from the nRF5 Mesh SDK or nRF Connect SDK to try configuring and setting up a node.

    Hope this helps.

  • Ohh thank you for your quick reply! Slight smile I will take a closer look at the Bluetooth Mesh Specifications and take a look at the light server example.

Reply Children
Related