mhamilt / maxmsp-ble

A BLE Object for Max
GNU General Public License v3.0
13 stars 2 forks source link

Subscribe using UUID instead of device numer #21

Open simo792 opened 2 years ago

simo792 commented 2 years ago

It would be nice to to able to do subscribe (of future write) using the device UUID instead of having to use device index, just like it happens with the "connect" massage. This is because the index always changes, while the UUID stays fixed. So for example instead of: device 0 subscribe 0000A010-5761-7665-7341-7564696F4C74 0000A015-5761-7665-7341-7564696F4C74 I would be able to use the message: device 61D668FC-1734-4240-B928-D3A56EA60B18 subscribe 0000A010-5761-7665-7341-7564696F4C74 0000A015-5761-7665-7341-7564696F4C74

mhamilt commented 2 years ago

Since this ties in with #20 , @simo792 would you be happy doing some testing once I've made some changes? Any update probably won't percolate out to Max Package Manager fo a little while.

simo792 commented 2 years ago

Yes I'd be happy to

mhamilt commented 2 years ago

@simo792 Release https://github.com/mhamilt/maxmsp-ble/releases/tag/0.1-alpha.7 covers a little of this issue plus some other fixed for macOS. it would be great if you were still okay to test this.

simo792 commented 2 years ago

It is indeed working fine on MacOS 10.15.7, Max 8.2.1. I can connect, subscribe and write using either the index number assigned during the scan, or the UUID. I think the new syntax makes sense. Here's the patch I've tested succesfully.


----------begin_max5_patcher----------
1024.3ocuX00iahCE84jeEVnJsuDhvFaCYeKsyVs8gU6Cq5SUUi.haFOKXGY
LSR2p9eeM1jNejDBShGdgDtbgiOG66ki4GSmDjK2wpC.+N3KfIS9wzISrgZC
Lo67IAUY6JJypsoETHqpXBcvL20zrcZa7kkk.8cLPEqtNaMqFHjaAakp+Ej+
cPSMWrF74O+oa1eekbAqP1Hr2LpK3FEq17ryzbo31imQlt3Nyy5VEqP6F1DR
77nYfXb6QHIxdhID3qc2inohKJYZ63G9XPYidezntn7UVtHyuObQPaneNcZ6
gYWo372pNIfKVw1ALfyTyA+ISw.e52p.0Lst8ps5mKi6ap0.onfA1x02AxDl
35YfRV1CsIlA9Faq41JjhU0.sDX9iQszfb12jlGpQEW0lmz7DU+ZJ4nZO8zJ
KlRrZZB4IRaZxUKsIWhzJXaM26AJ6F9FFfDEEbZZDmhmSlAPwVZPrGQnSwBz
QYA7PVDmrGSWd5uug4.LH.7UOyPTzfnXDskbTnunHcjnnh+XQyQnGD6lzHVh
Ei5mdCdcXbzEsProJmoN+jQWYiqp40NZQGNZgjGwTkUwzL0sLQVdI6oz6vIp
Yff7Lw5KaBqq0wAyXElNQ8oAPXRKsWLHIXvqGS87xwSwtsJtlAdGDXp5hVFA
iBIITXXBkRBShwl+QnX5B5GweHAuOIXuIQ5q7EEmZUnE102DruzKzHoW6e6y
6fCfjXWOpDOwQ7Hww5l75BEO+UutfzWRmWuhcFaHdqHhLpEQT3MTZ5G+PHzv
8PLBGE99EnzvahWRn+wRZz6goibYVpUISR7kfBSG4xrgnomWFvXWOGuUHB8r
LbJyz+U1JV6lJ9GdkTv.KUqyDbAuGF6nZ7hX66k6pjhtd+CPOZj8+JmWWxMF
96qGJLZwbj0aA8x8xdLuE8zEc1aWmTu2b3J6014ZII0asF7sAZsb85R14Md4
doA5WGeMqzOlQhjKx6Yqq92FZhgskx9lkoiKKOUAhhsQpNiaJm.31fNwWsvQ
ilYphLQ+7qacbGA81FZGm8yZxILu20uo1uYU29ZSryku1sHFej1Mmjdk7Zca
m7m86ynrEZ6mF5EeNP6nuM9y0gZYipX+iuayYfGIvJVslKreIumjCzkyQU5g
hCYjvACGKfFIbZ+fUmEHhO.hN.fdwnQpVwT11ru8PiNNxvqC4QZVDMj5LD1G
HMj0Kw9.nwpB.MR3.GqdgP5XAzP55heKpqFDxunr2SMSZ2UD.dNni7g7N.ff
GVS6dmc1lMOvT0cYawv3.4doUARmYOkKbmZcJYLX9.ee9VyEAYJiCEswdRix
NtB1QcdACpjFsTzv6lIMry.o0AjvXQtdSliHViRS+4z+G.KlfEA
-----------end_max5_patcher-----------
mhamilt commented 2 years ago

Perfect, I just need to implement this on windows and can close this issue