[ESP8266] UART-TCP Passthrough Demo

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

[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 的关注!
Attachments
ESP8266_NONOS_SDK_UART_TCP_Passthrough_Demo.zip
(40.42 KiB) Downloaded 5607 times

yangtao
Posts: 19
Joined: Tue Feb 02, 2016 3:03 pm

Re: [ESP8266] UART-TCP Passthrough Demo

Postby yangtao » Tue Feb 02, 2016 3:04 pm

This is in AP mode.

Will espressif provide station TCP-UART passthrough?

yuanjie1590
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);

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

wangyi4422
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'.

Who is online

Users browsing this forum: No registered users and 3 guests