[ESP8266] UART-TCP Passthrough Demo
[ESP8266] UART-TCP Passthrough Demo
Postby ESP_Faye » Tue Nov 17, 2015 11:46 am
Here is a demo of UART-TCP passthrough mode based on ESP8266_NONOS_SDK.
If using ESP8266_NONOS_SDK_V1.5.0 or later version, please add "-lcrypto" in 'LINKFLAGS_eagle.app.v6" area of Makefile.
Enjoy!
附件为基于 ESP8266_NONOS_SDK 的 UART-TCP 透传实现示例,仅供参考。
如果使用 ESP8266_NONOS_SDK_V1.5.0 或之后版本,请在示例的 Makefile 中 'LINKFLAGS_eagle.app.v6" 区域增加 "-lcrypto" 。
感谢您对 ESP8266 的关注!
If using ESP8266_NONOS_SDK_V1.5.0 or later version, please add "-lcrypto" in 'LINKFLAGS_eagle.app.v6" area of Makefile.
Enjoy!
附件为基于 ESP8266_NONOS_SDK 的 UART-TCP 透传实现示例,仅供参考。
如果使用 ESP8266_NONOS_SDK_V1.5.0 或之后版本,请在示例的 Makefile 中 'LINKFLAGS_eagle.app.v6" 区域增加 "-lcrypto" 。
感谢您对 ESP8266 的关注!
- Attachments
-
- ESP8266_NONOS_SDK_UART_TCP_Passthrough_Demo.zip
- (40.42 KiB) Downloaded 5607 times
-
- Posts: 3
- Joined: Mon Nov 16, 2015 4:04 pm
Re: [ESP8266] UART-TCP Passthrough Demo
Postby yuanjie1590 » Fri Feb 19, 2016 5:13 pm
为什么我使能station模式后,这个demo程序崩溃呢???
在user_init()里面
我先是修改模式
//wifi_set_opmode(SOFTAP_MODE); // softap mode
wifi_set_opmode(STATIONAP_MODE); //Set softAP + station mode
// set softap config
os_memset(&apConfig,0x0,sizeof(apConfig));
apConfig.authmode = AUTH_OPEN;
apConfig.channel = 0;
apConfig.max_connection = 1;
apConfig.ssid_len = os_strlen(TRANS_SSID);
os_strncpy(apConfig.ssid,TRANS_SSID,os_strlen(TRANS_SSID));
wifi_softap_set_config(&apConfig);
wifi_set_event_handler_cb(wifi_event_handler_cb); // monitor wifi state
然后在这里写的station配置
///////////////////////////////////
// Wifi configuration
char ssid[32] = "xxxxx";
char password[64] = "xxxxx";
struct station_config stationConf;
os_memset(stationConf.ssid, 0, 32);
os_memset(stationConf.password, 0, 64);
//need not mac address
stationConf.bssid_set = 0;
//Set ap settings
os_memcpy(&stationConf.ssid, ssid, 32);
os_memcpy(&stationConf.password, password, 64);
wifi_station_set_config(&stationConf);
在user_init()里面
我先是修改模式
//wifi_set_opmode(SOFTAP_MODE); // softap mode
wifi_set_opmode(STATIONAP_MODE); //Set softAP + station mode
// set softap config
os_memset(&apConfig,0x0,sizeof(apConfig));
apConfig.authmode = AUTH_OPEN;
apConfig.channel = 0;
apConfig.max_connection = 1;
apConfig.ssid_len = os_strlen(TRANS_SSID);
os_strncpy(apConfig.ssid,TRANS_SSID,os_strlen(TRANS_SSID));
wifi_softap_set_config(&apConfig);
wifi_set_event_handler_cb(wifi_event_handler_cb); // monitor wifi state
然后在这里写的station配置
///////////////////////////////////
// Wifi configuration
char ssid[32] = "xxxxx";
char password[64] = "xxxxx";
struct station_config stationConf;
os_memset(stationConf.ssid, 0, 32);
os_memset(stationConf.password, 0, 64);
//need not mac address
stationConf.bssid_set = 0;
//Set ap settings
os_memcpy(&stationConf.ssid, ssid, 32);
os_memcpy(&stationConf.password, password, 64);
wifi_station_set_config(&stationConf);
-
- Posts: 1
- Joined: Tue May 03, 2016 10:59 pm
Re: [ESP8266] UART-TCP Passthrough Demo
Postby jeremyd2019 » Tue May 03, 2016 11:18 pm
What's the license on this sample code? I'm not seeing any obvious notices in the downloaded zip file. I am thinking about using this sample as a basis for my development, because the uart driver code in the nonos sdk (at least versions 1.5.2 and 1.5.3) has comments indicating that it is GPL(v3), which is not exactly conducive to being linked into non-free software (see http://www.gnu.org/licenses/gpl-faq.en.html#LinkingWithGPL). The version of the uart code in this sample does not claim to be GPL. While I've not yet decided on a license for my code, I want to keep my options open.
-
- Posts: 6
- Joined: Thu Sep 01, 2016 2:55 pm
Re: [ESP8266] UART-TCP Passthrough Demo
Postby wangyi4422 » Tue Sep 27, 2016 3:59 pm
为什么会编译不通过呢?
Nothing to be done for `FORCE'.
Nothing to be done for `FORCE'.
Who is online
Users browsing this forum: No registered users and 3 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.