Skip to content

Seeed-Studio/seeed-ambd-sdk

 
 

Repository files navigation

Seeed RTL87XX AT firmware Build Status

Introduction

This RTL87XX AT firmware export a AT command interface through hardware SPI/UART port to MCU.
But current only works for RTL8720DN/RTL8720DM.

With those AT commands, the MCU could scan/connect WiFi APs, connect Internet/Intranet through the APs, or act as a TCP server (Web Server, Telnet Server, etc).

How to compile on Ubuntu Bionic

  • Clone this repo
    cd; git clone -b AT https://github.com/Seeed-Studio/seeed-ambd-sdk.git
  • Prepare gcc compiler
    cd seeed-ambd-sdk
    GCC_URL="http://files.seeedstudio.com/arduino/tools/arm-none-eabi/asdk-6.4.1-linux-newlib-build-2773-i686.tar.bz2"
    GCC_TOOL="project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain/asdk/$(basename $GCC_URL)"
    curl -fsSL $GCC_URL -o $GCC_TOOL

    # This gcc is x86 version, for X86_64 machine, install package libc6-i386
    sudo apt update
    sudo apt install libc6-i386
  • Start compiling
    make -C project/realtek_amebaD_va0_example/GCC-RELEASE/project_lp
    make -C project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp CONFIG_WIFI_COUNTRY=RTW_COUNTRY_US CONFIG_WIFI_CHANNEL_PLAN=0x25
Country CONFIG_WIFI_COUNTRY CONFIG_WIFI_CHANNEL_PLAN
United States RTW_COUNTRY_US 0x25
Japan RTW_COUNTRY_JP 0x27
  • Check images compiled
    Three binary files (km0_boot_all.bin, km4_boot_all.bin, km0_km4_image2.bin) must be exist if compiling successful.
    ls -l project/realtek_amebaD_va0_example/GCC-RELEASE/project_lp/asdk/image/km0_boot_all.bin
    ls -l project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/image/km4_boot_all.bin
    ls -l project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/image/km0_km4_image2.bin

How to burn images to RTL87XX chip

Refer to Wio-Terminal-Network-Overview to update to Wio Terminal.
Or Step 'Updating the Firmware' in above page to update to other RTL8720D device.

AT command list

WiFi/TCP Command Format Argument/Comment Response
AT AT a dummy command only, could used to get OK response
OK
ATE ATE0/ATE1 ATE0 disable command echo
ATE1 enable command echo
unimplement
OK
AT+GMR AT+GMR Query firmware version OK
AT+GPIO Query: AT+GPIO=R,<port-pin>[,0[,pull-set]]
Set: AT+GPIO=W,<port-pin>,<value>[,pull-set]
Query or set GPIO level
<port-pin>: PA25 if port is A, pin is 25
<value>: could be 0(low) or 1(high)
OK
AT+RST AT+RST Reboot the RTL87XX device OK
AT+CWMODE AT+CWMODE Query or set Wireless mode OK
AT+CWDHCP AT+CWDHCP Query or set DHCP mode OK
AT+CWLAP AT+CWLAP List all scaned AP(Access Points) OK
AT+CWQAP AT+CWQAP Quit connection to AP(Access Points) OK
AT+CWJAP AT+CWJAP Get or set the connection to AP(Access Points) OK
AT+CWSAP AT+CWSAP Get or set this AP(AP in RTL87XX) OK
AT+CIPSTATUS AT+CIPSTATUS Query TCP/UDP connection status OK
AT+CIPSTA AT+CIPSTA Query or set station IP address OK
AT+CIPSTAMAC AT+CIPSTAMAC Query or set station MAC address OK
AT+CIPAP AT+CIPAP Query or set IP address of this AP OK
AT+CIPAPMAC AT+CIPAPMAC Query or set MAC address of this AP OK
AT+CIPDOMAIN AT+CIPDOMAIN Query IP address of a domain name (DNS function) OK
AT+CIPSTART AT+CIPSTART Create a TCP/UDP connection OK
AT+CIPSEND AT+CIPSEND Send data to specific connection peer OK
AT+CIPCLOSE AT+CIPCLOSE Close a specific connection OK
AT+CIPDNS AT+CIPDNS Query or set the DNS address for RTL87XX OK
AT+CIPSERVER AT+CIPSERVER Create a TCP/UDP Server to accept connection from Client OK
BLE Command Format Argument/Comment Response
ATBp ATBp=<start-stop> Start/stop BLE peripheral
<start-stop> could be 0(stop) or 1(start)
OK
ATBc ATBc Start/stop BLE Central OK
ATBS ATBS Scan BT OK
ATBC ATBC Create a GATT connection(connect to remote device) OK
ATBD ATBD Disconnect from remote device OK
ATBK ATBK Reply GAP passkey, config authentication mode OK
ATBG ATBG Get peripheral information OK
ATBI ATBI Get information of connected device OK
ATBY ATBY Reply GAP user confirm OK
ATBU ATBU Update connection request OK
ATBO ATBO Get/clear bond information OK
ATBR ATBR GATT client read OK
ATBW ATBW GATT client write OK
ATBB ATBB Start/stop BT config OK
ATBJ ATBJ Start/stop BT Beacon OK
ATBb ATBb Start/stop BT Airsync config OK
ATBf ATBf Start/stop BLE Scatternet OK

This software AT command 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 Studio is an open hardware facilitation company based in Shenzhen, China.
Benefiting from local manufacture power and convenient global logistic system,
we integrate resources to serve new era of innovation. Seeed also works with
global distributors and partners to push open hardware movement.

Packages

No packages published

Languages

  • C 90.9%
  • C++ 2.6%
  • Assembly 2.2%
  • Shell 1.4%
  • Objective-C 1.1%
  • Makefile 1.1%
  • Other 0.7%