Hey Mauro, I thought:
how hard can it be to find out how to control those relays?
Turns out:
quite hard :-(
DSD Tech seem to have no documentation about controlling their relay boards. They do tell you how to connect to the boards using generic BLE apps, but they then seem to expect that you'll be using their Android/iOS app to control the relays.
I started thinking that maybe they are using the general I/O pins (16 to 19) of the BLE module, but then I found this:
Ali Expresss: DSD TECH 2 Channels Bluetooth Relay module
which quietly mentions (perhaps accidentally ;-)
and so what I infer from that is:
To switch a relay on or off, send a 4-byte command packet in the format:
Byte 1 = Sync/Header = A0 (hexadecimal) = 160 (decimal)
Byte 2 = Relay Number : 01 = first relay, 02 = second relay (and etc for > 2 relays, presumably)
Byte 3 = Relay State : 00 = off, 01 = on
Byte 4 = Checksum = sum of preceding bytes (eg, Channel 2 OFF = A0 + 02 + 00 = A2)
Note that it is NOT ASCII, so don't ye be adding end-of-line characters (although it'll probably still work even if you do, thanks to the Sync/Header byte)
Given that it's a one-way protocol (or at least, that's all we currently need) then you can ignore the part in the previous post about enabling notifications.
All you have to do is send your 4-byte commands to characteristic FFE1 which is under the FFE0 service that you've already discovered, if I understand your opening post correctly.
What could possibly go wrong?!?!