Skip to content

Comments

Add "Mediatek MT7697" support#17

Open
lanma wants to merge 7 commits intoline:masterfrom
lanma:master
Open

Add "Mediatek MT7697" support#17
lanma wants to merge 7 commits intoline:masterfrom
lanma:master

Conversation

@lanma
Copy link

@lanma lanma commented May 17, 2019

I want to add a new device Mediatek MT7697 support for LINE Things Starter.

@CLAassistant
Copy link

CLAassistant commented May 17, 2019

CLA assistant check
All committers have signed the CLA.

@hktechn0
Copy link
Contributor

Thanks for your contribution to line-things-starter.

This board seems great to test LINE Things features for developers.
However, we don't have MT7697 board. Also this board doesn't have "TELEC 技術基準適合証明" (Wireless certification in Japan), so I can't try it in Japan. (Because LINE Things development members are in Tokyo office)
So I'm asking our developers in Taiwan/Thai for help. Please just a moment for testing.

Anyway, could you tell me more details about this board?

  1. Is this board supporting any bonding connection?
    Devices for LINE Things must be supported bonding connection for security reason. (But it can be "Just works" bonding mode)
    See Register product information - System requirements for devices for requirements.

  2. Did you try to connect with both iOS and Android phones?

@cosmic-cowboy cosmic-cowboy requested review from cpulabs and teknuze May 21, 2019 12:32
Copy link
Contributor

@cpulabs cpulabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cpulabs cpulabs self-requested a review June 12, 2019 07:17
Copy link
Contributor

@cpulabs cpulabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check it? New version has no advertising packet. and can not connect from LINE app.

Copy link
Contributor

@hktechn0 hktechn0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except small suggestions.
We will merge this when you merge my suggestions.

LBLEPeripheral.notifyAll(notifyCharacteristic);
delay(50);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
}

#include <LBLE.h>
#include <LBLEPeriphral.h>

#define BUTTON_PIN (6)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make uniform as other sketches

Suggested change
#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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to set PSDI as unique device id.
I will use LBLE.getDeviceAddress().toString() for PSDI.

Suggested change
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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
advertisement.configAsConnectableDevice("MT7697",serviceUuid);
advertisement.configAsConnectableDevice("MT7697", serviceUuid);

LBLEPeripheral.addService(userService);

psdiService.addAttribute(psdiCharacteristic);
LBLEPeripheral.addService(psdiService);
Copy link
Contributor

@hktechn0 hktechn0 Jun 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set actual PSDI

Suggested change
LBLEPeripheral.addService(psdiService);
LBLEPeripheral.addService(psdiService);
psdiCharacteristic.setValue(LBLE.getDeviceAddress().toString());

@hktechn0 hktechn0 self-assigned this Jun 13, 2019
Co-Authored-By: Hirotaka Kawata <hktechno@hotmail.com>
@hktechn0
Copy link
Contributor

hktechn0 commented Jul 6, 2019

Could you commit my suggestion for merge?
It seems you commit only README.md suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants