Giter Site home page Giter Site logo

mediatek-labs / arduino-add-on-for-linkit-sdk Goto Github PK

View Code? Open in Web Editor NEW
34.0 34.0 33.0 10.36 MB

Arduino board support package for LinkIt 7697

Home Page: https://docs.labs.mediatek.com/resource/linkit7697-arduino/en

Makefile 14.93% Perl 0.37% C++ 15.90% C 61.46% Assembly 7.18% Shell 0.15%
arduino arduino-boards arduino-ide board-support

arduino-add-on-for-linkit-sdk's People

Contributors

evenchange4 avatar pablosun avatar shihhsuan avatar smallptsaimtk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arduino-add-on-for-linkit-sdk's Issues

Support Software Serial

There are cases where additional Serial ports are needed:

  • Serial (UART0) is used for debugging though USB serial port.
  • The pins of 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.

Fix function typos in LWiFi library

Adding Sleep API

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);
        }
    }
}

Bluetooth LE notification not working

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.

LBLECentral read/write characteristic occasionally fails

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);

PS2X Library Support

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.

WiFiClient.connect is slow

Currently it always takes ~3 seconds for WiFiClient.connect() to return. It seems that the delay() logic always results in a 1 second delay.

LBLE hangs after repeatedly scan() and connect()

There are 2 issues:

  • disconnect() are not implemented
  • the system hangs after scan() and connect() several times

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.

Arduino IDE upload failed on macOS

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.

[Feature request] Notification support of LBLECharacteristic

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.

Arduino IDE 1.8.2 : "Aggressively Cache Compiled Code" will cause compile error.

image

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

image

BLE Characteristic not handling write request?

Reproduce Steps

Error & Expected Results

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;
}
}

Environment

nRF Connect tool on Android

  • Arduino BSP Version: 0.10.13
  • OS(Windows/macOS/Linux):
  • Additional external peripherals:

Could you please add SOFTAP function on Arduino IDE?

Hi All,
I notice that LinkIt 7697 + Arduino IDE without SOFTAP function.

If possible, please add a SOFTAP function on Arduino IDE.

Scenario:

  1. LinkIt 7697 turn to AP mode.
  2. Smartphone --> setting --> wifi --> connect with LinkIt 7697.
  3. Smartphone's APP send socket include my AP SSID and PASSWORD to LinkIt 7697.
  4. LinkIt 7697 turn to station mode and setting SSID and PASSWORD connect to internet.

Maybe we need three function like below:

  1. Set LinkIt 7697 AP SSID and PASSWORD for client to connect.
  2. Stop LinkIt 7697 AP mode.
  3. Turn on LinkIt 7697 station mode.

Many thanks. ^ ^

Linkit 7697 in AP mode not accepting connections

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.

TLSClient.available() is very slow

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.

Roadmap / Documentation ?

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

Can support BT-HID Device?

Both ESP32 and nRF8001/nR51822 have libraries that support BT-HID,
Is Linkit-7697 planning to support BT-HID?

P2 (GPIO0) becomes HIGH during startup

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.

SPI Library Compatibility

When using this library: https://github.com/ZinggJM/GxEPD
The SPI (Software) library does not act normally.

Issues including:

  • Does not support multiple beginTransaction() endTransaction() pairs
  • Does not allow frequency adjustment
  • Does not define #define SPI_HAS_TRANSACTION 1

Allow users to explicitly set MCS controller data channel value

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.

`analogWrite()` stops working after `pinMode()` is called

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
}

UART baud rate 921600 not supported bug

Reproduce Steps

Error & Expected Results

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;

}

Environment

  • Arduino BSP Version: 0.10.12
  • OS(Windows/macOS/Linux): Windows
  • Additional external peripherals:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.