mediatek-labs / arduino-add-on-for-linkit-sdk Goto Github PK
View Code? Open in Web Editor NEWArduino board support package for LinkIt 7697
Home Page: https://docs.labs.mediatek.com/resource/linkit7697-arduino/en
Arduino board support package for LinkIt 7697
Home Page: https://docs.labs.mediatek.com/resource/linkit7697-arduino/en
There are cases where additional Serial ports are needed:
UART0
) is used for debugging though USB serial port.UART1
shares the bootstrap pin, which must not be pulled-up during bootstrapping. This causes issues when connecting UART1 to UART devices, which is default to idle HIGH.Therefore, providing a SoftwareSerial library can be helpful for users when connecting to external UART devices.
When the user name contains space, e.g. C:\Users\User Name\AppData\Local\Arduino15\packages\
, the mt76x7 upload tool fails to upload to LinkIt 7697.
correct typos in
char* WiFiDrv::getSSIDNetworks(uint8_t networkItem)
uint8_t WiFiDrv::getEncTypeNetworks(uint8_t networkItem)
int32_t WiFiDrv::getRSSINetworks(uint8_t networkItem)
https://github.com/michaelchien1972/Arduino-Add-On-for-LinkIt-SDK/tree/michaelchien1972-patch-2
https://github.com/michaelchien1972/Arduino-Add-On-for-LinkIt-SDK/tree/michaelchien1972-patch-3
https://github.com/michaelchien1972/Arduino-Add-On-for-LinkIt-SDK/tree/michaelchien1972-patch-4
Hi all,
I notice that MT7697 SDK have sleep function
so maybe Arduino API can add a sleep() function to reduce power consumption
here is the function at /core/arduino/delay.c
void sleep(uint32_t ms){
if(hal_sleep_manager_init() == HAL_SLEEP_MANAGER_ERROR)
{
// Check the log for error handling.
return;
}
if(hal_sleep_manager_is_sleep_locked())
{
printf("Cannot enter the sleep mode, as the sleep is locked\n");
}else
{
if (hal_sleep_manager_set_sleep_time(ms) == HAL_SLEEP_MANAGER_OK)
{
hal_sleep_manager_enter_sleep_mode(HAL_SLEEP_MODE_SLEEP);
}
}
}
When trying to enable the notification on the Android with my own code, it failed, and the problem is related to the descriptor not found for the characteristic, the APP "nRF Connected" can't enabled the notification too.
In the following code snippet, the read operation succeeds, while the write operation fails - even the UUID attribute is indeed having a WRITABLE permission.
char a = client.readCharacteristicInt("00010203-0405-0607-0809-0A0B0C0D2B11");
// write
int mm = client.writeCharacteristicInt("00010203-0405-0607-0809-0A0B0C0D2B11",6);
Currently there are two channel type:
Need MCS team to define more channel types to cover common cases for MCS, e.g. Integer/GPS/Game Controller/...etc.
The PS2X library is convenient for support wireless PS2 controllers. Currently it relies on some APIs that are only available to AVR platforms. It would be nice if LinkIt 7697 can support such library.
Currently it always takes ~3 seconds for WiFiClient.connect() to return. It seems that the delay()
logic always results in a 1 second delay.
There are 2 issues:
By turning on the debug log in adaptor_layer.c
we can see that it's an access violation that caused the system to halt.
while doing the upload process, the IDE will prompt message: java.io.IOException: Cannot run program "/Users/mtk01643/Library/Arduino15/packages/LinkIt/tools/flash_tool/1.0.0/upload.py": error=13, Permission denied.
It looks like the permission of upload.py is incorrect.
Currently it seems LBLECharacteristic does not support notification
Notification allow central side receive notification of value change.
Ex. 7697 side (as peripheral) simply to update weather informations and Mobile side (as central) to receive notification and process.
When enabled the "aggressively cache compiled code" (new feature of 1.8.2, default is "On") in the preference menu, when open a new window by selecting a new example, will have compile error when compiling the code.
Error Code:
arm-none-eabi-gcc: error: C:\Users\mtk00612\AppData\Local\Temp\arduino_build_72054/core/syscalls.c.o: No such file or directory
Issue report URL (in Chinese): http://scolin912.blogspot.tw/2018/01/linkit-7697-ibeacon-scan.html
In ard_mtk.c, get_scan_list()
strlen((char*)ptr->bssid) would be zero if the BSSID starts with 0x00.
The default PIN7 (= USER LED) is high, it shall be in low state
already submit patch to fix it, and support dhcpd (dhcp daemon)
https://github.com/michaelchien1972/Arduino-Add-On-for-LinkIt-SDK/tree/patch-4
https://github.com/michaelchien1972/Arduino-Add-On-for-LinkIt-SDK/tree/patch-5
https://github.com/michaelchien1972/Arduino-Add-On-for-LinkIt-SDK/tree/patch-6
After fixing the notification for Android, the Linkit 7697 BLE Characteristic has no response to the write request, the code from the SimplePeripheral sample below switchCharacteristic.isWritten() never returns true...
if (switchCharacteristic.isWritten()) {
const char value = switchCharacteristic.getValue();
switch (value) {
case 1:
digitalWrite(LED_BUILTIN, HIGH);
break;
case 0:
digitalWrite(LED_BUILTIN, LOW);
break;
default:
Serial.println("Unknown value written");
break;
}
}
nRF Connect tool on Android
Hi All,
I notice that LinkIt 7697 + Arduino IDE without SOFTAP function.
If possible, please add a SOFTAP function on Arduino IDE.
Scenario:
Maybe we need three function like below:
Many thanks. ^ ^
Hi, guys,
Just bought a LinkIt 7697 dev board. Trying the AP sample without modifications, I get AP to be boradcasted. However, connecting to it - Android 7 and Windows 10 (with and without static IP), does nothing.
Serial.println(0.3f); // OK, output "0.30"
Serial.println(String(0.3f)); // NG, output ""
Reference: https://labs.mediatek.com/en/faq/FAQ18719
pins_arduino.h
missing in variants/linkit_7697
Maybe arduino_pins.h
is misnamed?
Scenario: Attach A0
pin to a voltage divider circuit with ~100K Ohm resistors.
Problem: The voltage drops to 0 when attaching pin A0
Pin/port/register macros not defined in cores/Arduino.h
, including:
digitalPinToPort
portOutputRegister
digitalPinToBitMask
Found while trying to use Adafruit_SSD1351
OLED display library:
https://github.com/adafruit/Adafruit-SSD1351-library
Hello,
I am using TLSClient + PubSubClient for AWS IoT MQTT Client.
And I found TLSClient.available() stop for 4 secs on mbedtls_ssl_read() function.
Hi it looks nice project ^_^
Any plan to add OTA support library / SPIFFS or equivalent library? or any library to bring LinkIt at same level as ESP8266/ESP32 ?
Or is there any detailled documention about SDK / memory mapping to help to port them ?
I have a project currently using ESP8266 and soon ESP32 and I would love to support LinkIt board as well 😸
Thanks
Both ESP32 and nRF8001/nR51822 have libraries that support BT-HID,
Is Linkit-7697 planning to support BT-HID?
Cannot connect to another Wi-Fi access point after disconnect() from previous one.
There are HW watch dog functionality in MT7697, but it is not exposed to Arduino.
D2/P2 (GPIO0)
becomes OUTPUT HIGH during board startup, before sketch runs. This may cause some issues when attaching D2 to some outpu devices such as switch or LED.
When using this library: https://github.com/ZinggJM/GxEPD
The SPI (Software) library does not act normally.
Issues including:
beginTransaction()
endTransaction()
pairs#define SPI_HAS_TRANSACTION 1
Currently, the MCS controller data channel, such as MCSControllerOnOff
does not provide set()
to update the data channel value. In some scenarios, such as synchronizing a physical switch with its network counterparts, we need to change the value in MCS from Arduino side.
This feature request is adding a new set()
method to all the MCSController
classes.
the analogChannel
pin variable should use [14, 17]
range.
The following example does not work on BSP v0.9.6:
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT); // remote this line and this example works.
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
pinMode(LED_BUILTIN, OUTPUT);
analogWrite(LED_BUILTIN, 255); // turn the LED on (HIGH is the voltage level)
delay(300); // wait for a second
analogWrite(LED_BUILTIN, 0); // turn the LED off by making the voltage LOW
delay(300); // wait for a second
analogWrite(LED_BUILTIN, 255); // turn the LED on (HIGH is the voltage level)
delay(300); // wait for a second
analogWrite(LED_BUILTIN, 0); // turn the LED off by making the voltage LOW
delay(300); // wait for a second
}
Should first parameter be const in WiFi.begin API ?
+ int begin(const char* ssid, const char *passphrase);
- int begin(char* ssid, const char *passphrase);
WiFiClient does not support https
It always takes ~4 seconds for WiFiClient::available()
to become true
. This is strange since the server already gave response.
There are compile warnings while compile the core lib
Upload integer, hex and string data points 13 times for each and got socket.connect() failed, socket.status()=0 in "bool MCSDevice::_uploadDataPoint(const String& params)" method.
the baud rate 921600 is not supported by default, because the bug of the code in the UARTClass.cpp, but this bug can be fixed by replacing the function "uart_translate_baudrate(const uint32_t baudrate)" with the following code:
static hal_uart_baudrate_t uart_translate_baudrate(const uint32_t baudrate)
{
switch(baudrate)
{
case 300:
return HAL_UART_BAUDRATE_300;
case 1200:
return HAL_UART_BAUDRATE_1200;
case 2400:
return HAL_UART_BAUDRATE_2400;
case 4800:
return HAL_UART_BAUDRATE_4800;
case 9600:
return HAL_UART_BAUDRATE_9600;
case 19200:
return HAL_UART_BAUDRATE_19200;
case 38400:
return HAL_UART_BAUDRATE_38400;
case 57600:
return HAL_UART_BAUDRATE_57600;
case 115200:
return HAL_UART_BAUDRATE_115200;
case 921600:
return HAL_UART_BAUDRATE_921600;
default:
return HAL_UART_BAUDRATE_MAX;
}
return HAL_UART_BAUDRATE_MAX;
}
Missing keyword settings in keywords.txt
Some drivers such as Adafruit DHT library relies on macros such as clockCyclesPerMicrosecond
. Request to add these macros to the LinkIt 7697 Arduino BSP.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.