GithubHelp home page GithubHelp logo

seeed-studio / seeed-ambd-firmware Goto Github PK

View Code? Open in Web Editor NEW
31.0 19.0 5.0 726 KB

This RTL8720DN firmware export a RPC server interface through hardware SPI/UART port to MCU.

License: MIT License

Shell 0.09% C++ 72.34% C 27.52% PowerShell 0.05%
seeed firmware rpc wifi bluetooth

seeed-ambd-firmware's Introduction

Seeed RTL872X RPC firmware Build Status

Introduction

This RTL87XX RPC firmware export a RPC server interface through hardware SPI/UART port to MCU.

How to compile

Tools

The arduino-cli tool is used to build and upload the RTL8720DN firmware to the Seeed Wio terminal board. Use following link for download and installation procedure:

Sample script is below:

wget https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh
chmod a+x install.sh
sudo BINDIR=/usr/local/bin ./install.sh
sudo rm -rf ~/.arduino15
arduino-cli config init

ArduinoCore

Before compiling the firmware, you need to install the Arduino core of rtl872x ArduinoCore-ambd

  • board index
https://files.seeedstudio.com/arduino/package_realtek.com_amebad_index.json

Sample script is below:

arduino-cli config add board_manager.additional_urls https://files.seeedstudio.com/arduino/package_realtek.com_amebad_index.json
arduino-cli core update-index
arduino-cli core install realtek:AmebaD
rm -rf ~/.arduino15/packages/realtek/hardware/AmebaD/3.0.5
git clone https://github.com/Seeed-Studio/ArduinoCore-ambd ~/.arduino15/packages/realtek/hardware/AmebaD/3.0.5

build

./arduino-build.sh --build

flash

chmod +x build.sh
./build.sh --flash /dev/tty***

This software RPC server section is written by Seeed Studio and is licensed under The MIT License. Check License.txt for more information.

Contributing to this software is warmly welcomed. You can do this basically by forking, committing modifications and then pulling requests (follow the links above for operating guide). Adding change log and your contact into file header is encouraged. Thanks for your contribution.

seeed-ambd-firmware's People

Contributors

0hotpotman0 avatar lynnl4 avatar lyzsuper avatar matsujirushi avatar pillar1989 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

Watchers

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

seeed-ambd-firmware's Issues

Since firmware version 2.0.2 NTP Client not working

In my application on the Wio Terminal
https://github.com/RoSchmi/AzureDataSender_Wio_Terminal
(commit of Nov. 19. 2020, which is working with firmware v2.0.1)
I used a ntp client
https://github.com/sstaub/NTP
with firmware version 2.0.1 and rpcWiFi library.
As far as I could see (without intensive testing) everything worked flawlessly.
After updating the firmware to v2.0.2 and the other libraries to the latest versions as of 18.11.2020 the ntp client doesn't work. (doesn't return from 'ntp.begin()';

请问baud rate是否能提高

Is your feature request related to a problem? Please describe.
之前版本的baud rate为1843200,为什么变成了614400

Describe the solution you'd like
能否发布一个1843200的版本

Describe alternatives you've considered
目前应用的场合传输量稍大,一次传输时间过长

Additional context

Make `rpc_wifi_scan_get_ap_records` take an offset

rpc_wifi_scan_get_ap_records(uint16 number, out binary _scanResult) -> int32

The problem with this is that all implementations need to have a receive buffer thats the size of WL_NETWORKS_LIST_MAXNUM * sizeof(rtw_scan_result_t) (nearly 4k of RAM!). Theres no need for this, if you provide a way to get a subset of the network across multiple RPCs.

It would be nice if I could give an offset to rpc_wifi_scan_get_ap_records to get number entries starting at a particular position offset.

For example, maybe implement it like this?

eRPC:

 rpc_wifi_scan_get_ap_records_with_offset(uint16 number, uint16 offset, out binary _scanResult) -> int32 

Implementation:

int32_t rpc_wifi_scan_get_ap_records_with_offset(uint16_t number, uint16_t offset, rtw_scan_result_t *_scanResult)
{
  if ((number+offset) > WL_NETWORKS_LIST_MAXNUM || _scanResult == NULL)
  {
    return RTW_ERROR;
  }

  memcpy(_scanResult, _scan_networks[offset], sizeof(rtw_scan_result_t) * number);
  return RTW_SUCCESS;
}

What do you think?

Thanks!
Tom

undefined reference to `mbedtls_entropy_init'

Hi,
I try to build this firmware, but I got below errors.

Error message:

/tmp/arduino-sketch-C406D0E29CF4A95291004F426D0424AB/sketch/src/wifi/wifi_ssl_client.c.o: In function `wifi_start_ssl_client':
/tmp/arduino-sketch-C406D0E29CF4A95291004F426D0424AB/sketch/src/wifi/wifi_ssl_client.c:312: undefined reference to `mbedtls_entropy_init'
/tmp/arduino-sketch-C406D0E29CF4A95291004F426D0424AB/sketch/src/wifi/wifi_ssl_client.c:441: undefined reference to `mbedtls_entropy_func'
/tmp/arduino-sketch-C406D0E29CF4A95291004F426D0424AB/sketch/src/wifi/wifi_ssl_client.c:388: undefined reference to `mbedtls_ssl_conf_psk'
collect2: error: ld returned 1 exit status

Build script:

wget https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh
chmod a+x install.sh
sudo BINDIR=/usr/local/bin ./install.sh
sudo rm -rf ~/.arduino15
arduino-cli config init

arduino-cli config add board_manager.additional_urls https://files.seeedstudio.com/arduino/package_realtek.com_amebad_index.json
arduino-cli core update-index
arduino-cli core install realtek:AmebaD

git clone https://github.com/Seeed-Studio/seeed-ambd-firmware
cd seeed-ambd-firmware
./arduino-build.sh --build

Could you tell me how to fix?

Mechanism for retrieving smaller size scanlist results

Is your feature request related to a problem? Please describe.
wifi_scan_get_ap_records has the ability to choose how many records to retrieve, but it doesn't allow choosing exactly what records to retrieve. Calling it with a value of 1, for example, always returns the first record. In practice this means that the only valid call is to retrieve all records in a single request. When memory constrained (like circuitpython), this means that the serial buffer for receiving rpc messages has to be as large as the largest possible scan results. This seems like a waste of memory.

Describe the solution you'd like
It would be nice to be able to specify a count and an offset, so you could chose to retrieve the results one result set at a time. (or two at a time or whatever)

Describe alternatives you've considered
An alternative might be to keep a current position pointer. After retrieving some block of results, advance the pointer the the next result record. Subsequent calls would then transfer the next block of results, returning error if trying to read past the end of the result list.

Additional context
If either of these ideas seemed reasonable, I would be happy to work up a pull request.

WiFi.scanNetworks() Randomly hangs forever.

Describe the bug
Calling WiFi.scanNetworks(/async/true, /hidden/true, /passive/false, 300); will periodically hang, and never return.
Using Version 2.1.3
I'm using WioTerminal

To Reproduce
Steps to reproduce the behavior:
Compile and load the WiFiScan example.

But I observe the following randomly hangs:

**_Serial.println("scan start");

// WiFi.scanNetworks will return the number of networks found
int n = WiFi.scanNetworks();   
Serial.println("scan done");_**

Also Async mode hangs too.

Expected behavior
A clear and concise description of what you expected to happen.

I would expect this function to always return especially in the Async mode.

Desktop (please complete the following information):

  • OS: [OSX 11.3.1]
  • Browser [safari]
  • Version [14.1]

Additional context
I tried to scan with different intervals, but the demo uses 5 second delay between scans, and that will hang randomly from between 2 min to sometimes running up to 10 min before hanging.

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.