Code Monkey home page Code Monkey logo

esp32_network123's Introduction

对应博文:https://blog.csdn.net/chenbb8/article/details/128134389

这是一个练手的工程,综合了esp32的几个example,写一个简单的透传demo。参考一下某透传模块的指令,提取出以下几条(==每条指令后应该加上换行符,比如"\n"、“\r\n”,否则将不识别==):

  • 扫描AP
指令 ATWS
响应 AP : <num>,<ssid>,<chl>,<sec>,<rssi>,<bssid>
[ATWS] OK
  • 连接到 AP
指令 ATPN=<ssid>,<pwd>
响应 成功
[ATPN] OK
失败
[ATPN] ERROR:<error_code>
error_code 1: 命令格式错误
2: 参数错误
3: 连接 AP失败
4: dhcp 超时
5:无ap信息
  • 建立socket
指令 ATPC=<mode>,<Remote Addr>,<Remote Port>
响应 成功
[ATPC] OK
失败
[ATPC] ERROR:<error_code>
参数 mode:
 0:TCP
error_code 1: 命令格式错误
2: 参数错误
3: 连接 server失败
4: 尚未连接AP
注意 连接成功后直接进入透传模式

环境

操作系统:ubuntu 20.04
虚拟机:VMare Workstation 16
IDE:vscode 1.73.1
vscode插件:Espressif IDF v1.5.1
board:淘宝上的ESP32-S3-DevKitC-1兼容板
外置串口板子:淘宝上的cp2102 6合1串口模块

硬件连接

esp32_TXD:IO4 <-> 串口模块:RXD
esp32_RXD:IO5 <-> 串口模块:TXD

esp32_network123's People

Contributors

chenbb8 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.