Conversation
|
Thanks for your contribution to line-things-starter. This board seems great to test LINE Things features for developers. Anyway, could you tell me more details about this board?
|
cpulabs
left a comment
There was a problem hiding this comment.
Did you check it? New version has no advertising packet. and can not connect from LINE app.
| LBLEPeripheral.notifyAll(notifyCharacteristic); | ||
| delay(50); | ||
| } | ||
| } |
| #include <LBLE.h> | ||
| #include <LBLEPeriphral.h> | ||
|
|
||
| #define BUTTON_PIN (6) |
There was a problem hiding this comment.
Make uniform as other sketches
| #define BUTTON_PIN (6) | |
| // User service UUID: Change this to your generated service UUID | |
| #define USER_SERVICE_UUID "91E4E176-D0B9-464D-9FE4-52EE3E9F1552" | |
| // User service characteristics | |
| #define WRITE_CHARACTERISTIC_UUID "E9062E71-9E62-4BC6-B0D3-35CDCD9B027B" | |
| #define NOTIFY_CHARACTERISTIC_UUID "62FBD229-6EDD-4D1A-B554-5C4E1BB29169" | |
| // PSDI Service UUID: Fixed value for Developer Trial | |
| #define PSDI_SERVICE_UUID "E625601E-9E55-4597-A598-76018A0D293D" | |
| #define PSDI_CHARACTERISTIC_UUID "26E2B12B-85F0-4F3F-9FDD-91D114270E6E" | |
| #define BUTTON_PIN (6) |
| LBLECharacteristicInt notifyCharacteristic("62FBD229-6EDD-4D1A-B554-5C4E1BB29169", LBLE_READ | LBLE_WRITE); | ||
|
|
||
| LBLEService psdiService("E625601E-9E55-4597-A598-76018A0D293D"); | ||
| LBLECharacteristicInt psdiCharacteristic("26E2B12B-85F0-4F3F-9FDD-91D114270E6E", LBLE_READ); |
There was a problem hiding this comment.
We have to set PSDI as unique device id.
I will use LBLE.getDeviceAddress().toString() for PSDI.
| LBLECharacteristicInt psdiCharacteristic("26E2B12B-85F0-4F3F-9FDD-91D114270E6E", LBLE_READ); | |
| LBLECharacteristicString psdiCharacteristic(PSDI_CHARACTERISTIC_UUID, LBLE_READ); |
| LBLECharacteristicInt writeCharacteristic("E9062E71-9E62-4BC6-B0D3-35CDCD9B027B", LBLE_WRITE); | ||
| LBLECharacteristicInt notifyCharacteristic("62FBD229-6EDD-4D1A-B554-5C4E1BB29169", LBLE_READ | LBLE_WRITE); | ||
|
|
||
| LBLEService psdiService("E625601E-9E55-4597-A598-76018A0D293D"); |
There was a problem hiding this comment.
| LBLEService psdiService("E625601E-9E55-4597-A598-76018A0D293D"); | |
| LBLEService psdiService(PSDI_SERVICE_UUID); |
| int nButtonChanged = 0; | ||
| int bOn = 0; | ||
| LBLEUuid serviceUuid("91E4E176-D0B9-464D-9FE4-52EE3E9F1552"); | ||
| LBLEService userService("91E4E176-D0B9-464D-9FE4-52EE3E9F1552"); |
There was a problem hiding this comment.
| LBLEService userService("91E4E176-D0B9-464D-9FE4-52EE3E9F1552"); | |
| LBLEService userService(USER_SERVICE_UUID); |
| int bOn = 0; | ||
| LBLEUuid serviceUuid("91E4E176-D0B9-464D-9FE4-52EE3E9F1552"); | ||
| LBLEService userService("91E4E176-D0B9-464D-9FE4-52EE3E9F1552"); | ||
| LBLECharacteristicInt writeCharacteristic("E9062E71-9E62-4BC6-B0D3-35CDCD9B027B", LBLE_WRITE); |
There was a problem hiding this comment.
| LBLECharacteristicInt writeCharacteristic("E9062E71-9E62-4BC6-B0D3-35CDCD9B027B", LBLE_WRITE); | |
| LBLECharacteristicInt writeCharacteristic(WRITE_CHARACTERISTIC_UUID, LBLE_WRITE); |
| LBLEUuid serviceUuid("91E4E176-D0B9-464D-9FE4-52EE3E9F1552"); | ||
| LBLEService userService("91E4E176-D0B9-464D-9FE4-52EE3E9F1552"); | ||
| LBLECharacteristicInt writeCharacteristic("E9062E71-9E62-4BC6-B0D3-35CDCD9B027B", LBLE_WRITE); | ||
| LBLECharacteristicInt notifyCharacteristic("62FBD229-6EDD-4D1A-B554-5C4E1BB29169", LBLE_READ | LBLE_WRITE); |
There was a problem hiding this comment.
| LBLECharacteristicInt notifyCharacteristic("62FBD229-6EDD-4D1A-B554-5C4E1BB29169", LBLE_READ | LBLE_WRITE); | |
| LBLECharacteristicInt notifyCharacteristic(NOTIFY_CHARACTERISTIC_UUID, LBLE_READ | LBLE_WRITE); |
|
|
||
| LBLEPeripheral.begin(); | ||
| LBLEAdvertisementData advertisement; | ||
| advertisement.configAsConnectableDevice("MT7697",serviceUuid); |
There was a problem hiding this comment.
| advertisement.configAsConnectableDevice("MT7697",serviceUuid); | |
| advertisement.configAsConnectableDevice("MT7697", serviceUuid); |
| LBLEPeripheral.addService(userService); | ||
|
|
||
| psdiService.addAttribute(psdiCharacteristic); | ||
| LBLEPeripheral.addService(psdiService); |
There was a problem hiding this comment.
Set actual PSDI
| LBLEPeripheral.addService(psdiService); | |
| LBLEPeripheral.addService(psdiService); | |
| psdiCharacteristic.setValue(LBLE.getDeviceAddress().toString()); |
Co-Authored-By: Hirotaka Kawata <hktechno@hotmail.com>
|
Could you commit my suggestion for merge? |
I want to add a new device Mediatek MT7697 support for LINE Things Starter.