GithubHelp home page GithubHelp logo

atproto's Introduction

Build status

AT protocol library and firmware

This is an attempt to implement DCE and DTE sides of an AT protocol, mostly based on Recommendation V.250. The code has two parts: a platform-independent code for basic DCE/DTE functions, and target-specific commands that control WiFi, TCP/IP, etc. The main target for DCE is an ESP8266 chip, but it is easy to add other targets as well, or pull the platform-independent code into another project.

The AT commands supported by the ESP8266 target are described here.

What works so far:

  • DCE (i.e modem side) only. Haven't started working on DTE (host) side.
  • Parsing and handling of basic and extended syntax commands and S-parameters
  • Response formatting option (ATV)
  • Echo (ATE)
  • Result code suppression (ATQ)
  • Baud rate setting (AT+IPR) saved to flash
  • Reset (ATZ)
  • Chip id (AT+GSN) and version (AT+GMR) queries
  • Wifi commands (CWLAP, CWJAP, CWSAP, CWSTAT, CWLIF)
  • Wifi connection status reports (+CWSTAT:)
  • Commands to get IP and MAC address for AP and STA (CIPAP?, CIPSTA?, CIPAPMAC?, CIPSTAMAC?)
  • Domain names resolution (CIPRESOLVE)
  • TCP/UDP socket context create/release (CIPCREATE, CIPCLOSE)
  • TCP/UDP client connect/disconnect (CIPCONNECT, CIPDISCONNECT)
  • Send/receive data (CIPSENDI, CIPRD)

Next up:

  • TCP/UDP server
  • MQTT
  • Pass-through mode for TCP/UDP connections
  • More unit tests
  • Handling of malformed input (besides returning ERROR)
  • DTE part of the business

Many commands that return ERROR print error reason when debug output is enabled. To enable debug output, issue AT+IDBG=1 command.

Prebuilt firmware for ESP8266

If you don't want to go through the build process described below (though I advise you do), get the prebuilt binaries on my website.

Make

ESP8266

  • Install/compile the toolchain. Check the ESP8266 community wiki for instructions.
  • Get the ESP8266 SDK version 0.9.3.
  • Adjust XTENSA_TOOCHAIN, XTENSA_LIBS, SDK_BASE, ESPTOOL directories in target/esp8266/target.mk
  • Apply the diff in target/esp8266/c_types.h.diff to include/c_types.h in the SDK so that it doesn't redefine types from stdint.h.
  • Run make clean all TARGET=esp8266
  • The firmware will be generated in bin/0x00000.bin and bin/0x40000.bin

Host

There are some unit tests for target-independent code that run on PC. Doing make test will build the tests and run them. Don't forget to make clean before you make test if you have built for ESP8266 before that, or the linker will complain about unsupported object file format.

License

BSD. See the LICENSE file.

I use Catch for unit tests (it's in include/catch.hpp), see header for it's own license.

atproto's People

Contributors

igrr avatar jaseg avatar

Watchers

 avatar  avatar

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.