Comments (7)
Hi @JPast ,
If the message is printed in transparent transmission mode, It confuses message with data.
Maybe we can post an event in at_status_callback
, then you add code to check it, and print a message or control a gpio.
from esp-at.
Hi @xcguang ,
thank you for your answer.
This would be a solution for my problem. It would be nice to have two events to handle in at_status_callback
. One for a lost WiFi-Connection and another one for a lost TCP-Connection.
How long would it take to implement this events in libat_core.a?
from esp-at.
Hi @JPast ,
We will think about it after the New Year's day. If there is any update, we will reply here.
from esp-at.
Hi @JPast ,
We have added some cb for connection, please try it if possible. The attachment is the at lib for test.
And now, you have to define esp_at_custom_net_ops_struct
by yourself.
typedef struct {
int32_t (*recv_data)(uint8_t*data,int32_t len);
void (*connect_cb)(void);
void (*disconnect_cb)(void);
} esp_at_custom_net_ops_struct;
bool esp_at_custom_net_ops_regist (int32_t link_id,esp_at_custom_net_ops_struct* ops);
void test_connect_cb(void)
{
printf("test_connect_cb\r\n");
}
void test_disconnect_cb(void)
{
printf("test_disconnect_cb\r\n");
}
void at_task_init(void)
{
......
esp_at_custom_net_ops_struct custom_net_ops = {
.recv_data = NULL,
.connect_cb = test_connect_cb,
.disconnect_cb = test_disconnect_cb
};
......
esp_at_module_init (CONFIG_LWIP_MAX_SOCKETS - 1, version); // reserved one for server
free(version);
esp_at_custom_net_ops_regist(0,&custom_net_ops); // MUST after esp_at_module_init
......
}
from esp-at.
Hi @xcguang,
I implemented this code and the at_lib_test_core in the newest AT-Command-Core-Version. The compilation and flashing worked without failure.
Unfortunately this solution approach doesn`t fit well. When I start TCP-Connection with AT+CIPSTART="TCP","192.168.101.110",1000,5 and build up a transparent transmission test_connect_cb is printed out. But when I shut up the WIFI-AP or stop the TCP-Server-Socket, nothing happens. The text test_disconnected_cb is first printed out when I trigger to stop transparent transmission by sending “+++”. I want to detect an missing connection without leaving transparent transmission mode. Is it possible to print out test_disconnected_cd when TCP-Connection is lost while transparent transmission mode is enabled?
Thank you for your help.
JPast
from esp-at.
Hi @JPast ,
Sorry for inconvenient.
You are right, it should print disconnect and connect message whether transparent transmission or normal mode.Please try again using the attachment.
libat_core.a.zip
from esp-at.
Hi @xcguang,
thank you for your help. This libat_core.a is working fine.
from esp-at.
Related Issues (20)
- AT+MDNS does not produce the expected record HOT 1
- Allow BLE deinit HOT 2
- Add connectable property to BLE Scan result HOT 4
- BLE broken pipe unrecoverable HOT 2
- Cannot build due to WARNING: Component "espressif/mdns" not found HOT 3
- AT+BLESCAN error, with name/mac filter. release/4.0.0.0 with ble command support HOT 5
- Is it possible to disable some GATTS using at.py Tool GATTS Configuration? HOT 2
- Enabling flash encryption with ESP-AT result in a missing partition error. HOT 1
- Writing GATT characteristic with variable size will result in characteristic being truncated HOT 3
- AT Firmware does not build when using Bluedroid for ESP32-C6 HOT 3
- hello,ESP32C3 AT+RFPOWER指令设置BLE从机的发射功率设置失败,看起来和[Neslon07](https://github.com/Neslon07)提出的issue很像,使用的是esp-at v3.2.0.0版本的代码。 HOT 1
- Is the WT32-S1 still supported? HOT 6
- Disabling the default AP with SSID of esp_xxxxxx HOT 2
- No way to get HTTP Error code HOT 1
- Packet loss in TCP HOT 3
- AT 固件 BLE 连接断开原因 HOT 2
- AT command answer too fast loosing start characters HOT 6
- How does modem wake up from light sleep mode. HOT 5
- How to switch to SSL in an open TCP connection HOT 7
- ESP32 WROOM v3.2.0.0 release does not build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-at.