Statistics: Posted by ESP_Faye — Tue Mar 08, 2016 2:02 pm
Statistics: Posted by Guest — Mon Dec 07, 2015 6:58 pm
Statistics: Posted by Guest — Mon Dec 07, 2015 6:16 pm
Statistics: Posted by Guest — Mon Dec 07, 2015 5:26 pm
Statistics: Posted by Guest — Mon Dec 07, 2015 5:22 pm
Statistics: Posted by Guest — Thu Dec 03, 2015 4:46 pm
Statistics: Posted by Guest — Thu Dec 03, 2015 4:03 pm
Statistics: Posted by ESP_Faye — Tue Nov 17, 2015 12:20 pm
Statistics: Posted by ESP_Faye — Thu Aug 13, 2015 11:00 am
Statistics: Posted by jlbachiochi — Sat Aug 08, 2015 3:28 am
Statistics: Posted by ESP_Faye — Mon Aug 03, 2015 10:25 am
Statistics: Posted by kenn2 — Sun Aug 02, 2015 4:27 am
Statistics: Posted by kenn2 — Sun Aug 02, 2015 4:19 am
Statistics: Posted by Guest — Fri Jul 31, 2015 12:56 pm
Statistics: Posted by Guest — Fri Jul 31, 2015 12:56 pm
Statistics: Posted by Guest — Fri Jul 31, 2015 12:56 pm
Statistics: Posted by Guest — Fri Jul 31, 2015 12:56 pm
Statistics: Posted by Guest — Fri Jul 31, 2015 12:35 pm
Statistics: Posted by Guest — Fri Jul 31, 2015 12:35 pm
Statistics: Posted by TOPARM — Wed Jul 29, 2015 3:20 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 1:07 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 1:07 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 1:06 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 1:06 pm
Code:
void ICACHE_FLASH_ATTR gpio_init(void)
{
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U,FUNC_GPIO15); //GPIO 选择功能
GPIO_DIS_OUTPUT(GPIO_ID_PIN(15)); //配置为输入模式
ETS_GPIO_INTR_DISABLE(); //关闭 GPIO 中断
ETS_GPIO_INTR_ATTACH(GPIO_INTERRUPT,NULL); //注册中断函数
gpio_pin_intr_state_set(GPIO_ID_PIN(15),GPIO_PIN_INTR_NEGEDGE); //下降沿触发
ETS_GPIO_INTR_ENABLE() ; //使能 GPIO 中断
}
Code:
{
GPIO_ConfigTypeDef gpio_in_cfg; //定义 GPIO 初始化结构体
gpio_in_cfg.GPIO_IntrType = GPIO_PIN_INTR_NEGEDGE; //下降沿触发
gpio_in_cfg.GPIO_Mode = GPIO_Mode_Input; //输入模式
gpio_in_cfg.GPIO_Pin = GPIO_Pin_15; //GPIO 选择使能
gpio_config(&gpio_in_cfg); //初始化函数
GPIO_REG_WRITE(GPIO_STATUS_W1TC_ADDRESS, BIT(GPIO_UART_IN_NUM));
gpio_intr_handler_register(interrupt_GPIO_UART); //注册中断函数
_xt_isr_unmask(1 << ETS_GPIO_INUM); //使能 GPIO 中断
}
Statistics: Posted by Guest — Tue Jul 28, 2015 1:03 pm
Code:
void ICACHE_FLASH_ATTR gpio_init(void)
{
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U,FUNC_GPIO15); //GPIO Alternate Function
GPIO_DIS_OUTPUT(GPIO_ID_PIN(15)); //Configure it in input mode.
ETS_GPIO_INTR_DISABLE(); //Close the GPIO interrupt
ETS_GPIO_INTR_ATTACH(GPIO_INTERRUPT,NULL); //Register the interrupt function
gpio_pin_intr_state_set(GPIO_ID_PIN(15),GPIO_PIN_INTR_NEGEDGE); //Falling edge trigger
ETS_GPIO_INTR_ENABLE() ; //Enable the GPIO interrupt
}
Code:
{
GPIO_ConfigTypeDef gpio_in_cfg; //Define GPIO Init Structure
gpio_in_cfg.GPIO_IntrType = GPIO_PIN_INTR_NEGEDGE; //Falling edge trigger
gpio_in_cfg.GPIO_Mode = GPIO_Mode_Input; //Input mode
gpio_in_cfg.GPIO_Pin = GPIO_Pin_15; // Enable GPIO
gpio_config(&gpio_in_cfg); //Initialization function
GPIO_REG_WRITE(GPIO_STATUS_W1TC_ADDRESS, BIT(GPIO_UART_IN_NUM));
gpio_intr_handler_register(interrupt_GPIO_UART); // Register the interrupt function
_xt_isr_unmask(1 << ETS_GPIO_INUM); //Enable the GPIO interrupt
}
Statistics: Posted by Guest — Tue Jul 28, 2015 1:03 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 1:03 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 1:03 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 12:59 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 12:59 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 12:57 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 12:57 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 12:55 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 12:55 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 12:53 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 12:53 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 12:50 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 12:50 pm
Statistics: Posted by Guest — Tue Jul 28, 2015 12:44 pm
Statistics: Posted by ESP_Faye — Mon Jul 20, 2015 2:57 pm
Code:
GET / HTTP/1.1
User-Agent: curl/7.37.0
Host: cn.bing.com
Accept: */*
Statistics: Posted by ESP_Faye — Mon Jun 08, 2015 11:43 am
Statistics: Posted by ESP_Faye — Tue May 26, 2015 4:49 pm
Statistics: Posted by ESP_Faye — Wed Apr 15, 2015 8:08 pm
Statistics: Posted by Espressif_Kelly — Wed Apr 15, 2015 11:20 am
wifi_station_set_reconnect_policy(false); // if the ESP8266 station connected to the router, and then the connection broke, ESP8266 will not try to reconnect to the router.
wifi_station_set_auto_connect(false); //the ESP8266 station will not try to connect to the router automatically when power on until wifi_station_connect is called.
wifi_station_disconnect(); // ESP8266 station disconnects to the router, or ESP8266 station stops trying to connect to the target router.
wifi_station_set_reconnect_policy(false); // 如果 ESP8266 station 已经连接到某路由,但又从该路由上断开连接了,ESP8266 station 不会自动尝试重新连接该路由。
wifi_station_set_auto_connect(false); //ESP8266 station 在上电时不会自动尝试连接路由,需要调用 wifi_station_connect 才会进行连接路由。
wifi_station_disconnect(); // ESP8266 station 断开与某路由的连接,或者 ESP8266 station 停止尝试连接某路由。
Statistics: Posted by ESP_Faye — Fri Apr 03, 2015 3:57 pm
Code:
LOCAL os_timer_t test_timer;
/******************************************************************************
* FunctionName : user_esp_platform_check_ip
* Description : check whether get ip addr or not
* Parameters : none
* Returns : none
*******************************************************************************/
void ICACHE_FLASH_ATTR
user_esp_platform_check_ip(void)
{
struct ip_info ipconfig;
//disarm timer first
os_timer_disarm(&test_timer);
//get ip info of ESP8266 station
wifi_get_ip_info(STATION_IF, &ipconfig);
if (wifi_station_get_connect_status() == STATION_GOT_IP && ipconfig.ip.addr != 0) {
os_printf("got ip !!! \r\n");
} else {
if ((wifi_station_get_connect_status() == STATION_WRONG_PASSWORD ||
wifi_station_get_connect_status() == STATION_NO_AP_FOUND ||
wifi_station_get_connect_status() == STATION_CONNECT_FAIL)) {
os_printf("connect fail !!! \r\n");
} else {
//re-arm timer to check ip
os_timer_setfn(&test_timer, (os_timer_func_t *)user_esp_platform_check_ip, NULL);
os_timer_arm(&test_timer, 100, 0);
}
}
}
/******************************************************************************
* FunctionName : user_set_station_config
* Description : set the router info which ESP8266 station will connect to
* Parameters : none
* Returns : none
*******************************************************************************/
void ICACHE_FLASH_ATTR
user_set_station_config(void)
{
// Wifi configuration
char ssid[32] = SSID;
char password[64] = PASSWORD;
struct station_config stationConf;
//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);
//set a timer to check whether got ip from router succeed or not.
os_timer_disarm(&test_timer);
os_timer_setfn(&test_timer, (os_timer_func_t *)user_esp_platform_check_ip, NULL);
os_timer_arm(&test_timer, 100, 0);
}
/******************************************************************************
* FunctionName : user_init
* Description : entry of user application, init user function here
* Parameters : none
* Returns : none
*******************************************************************************/
void user_init(void)
{
os_printf("SDK version:%s\n", system_get_sdk_version());
//Set softAP + station mode
wifi_set_opmode(STATIONAP_MODE);
// ESP8266 connect to router.
user_set_station_config();
}
Statistics: Posted by ESP_Faye — Fri Apr 03, 2015 3:05 pm
Code:
Fatal exception (28):
epc1=0x4025bfa6, epc2=0x00000000, epc3=0x00000000, excvaddr=0x0000000f, depc=0x00000000
Statistics: Posted by ESP_Faye — Mon Mar 23, 2015 4:44 pm
Code:
void ICACHE_FLASH_ATTR
uart_init(UartBautRate uart0_br, UartBautRate uart1_br)
{
// rom use 74880 baut_rate, here reinitialize
UartDev.baut_rate = uart0_br;
uart_config(UART0);
UartDev.baut_rate = uart1_br;
uart_config(UART1);
ETS_UART_INTR_ENABLE();
// install uart1 putc callback
os_install_putc1((void *)uart1_write_char);
}
Code:
//os_install_putc1((void *)uart1_write_char);
Statistics: Posted by ESP_Faye — Thu Feb 05, 2015 4:41 pm
Statistics: Posted by ESP_Faye — Thu Feb 05, 2015 3:09 pm
Code:
xtensa-lx106-elf-gcc -L../lib -nostdlib -T../ld/eagle.app.v6.new.512.app1.ld -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lc -lgcc -lhal -lphy -lpp -lnet80211 -llwip -lwpa -lmain -ljson -lssl -lupgrade -lsmartconfig user/.output/eagle/debug/lib/libuser.a driver/.output/eagle/debug/lib/libdriver.a -Wl,--end-group -o .output/eagle/debug/image/eagle.app.v6.out
/opt/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .output/eagle/debug/image/eagle.app.v6.out section `.irom0.text' will not fit in region `irom0_0_seg'
collect2: error: ld returned 1 exit status
make: *** [.output/eagle/debug/image/eagle.app.v6.out] Error 1
Code:
irom0_0_seg : org = 0x40201010, len = 0x2B000
Code:
irom0_0_seg : org = 0x40201010, len = 0x2D000
Code:
xtensa-lx106-elf-gcc -L../lib -nostdlib -T../ld/eagle.app.v6.new.512.app1.ld -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lc -lgcc -lhal -lphy -lpp -lnet80211 -llwip -lwpa -lmain -ljson -lssl -lupgrade -lsmartconfig user/.output/eagle/debug/lib/libuser.a driver/.output/eagle/debug/lib/libdriver.a -Wl,--end-group -o .output/eagle/debug/image/eagle.app.v6.out
/opt/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .output/eagle/debug/image/eagle.app.v6.out section `.irom0.text' will not fit in region `irom0_0_seg'
collect2: error: ld returned 1 exit status
make: *** [.output/eagle/debug/image/eagle.app.v6.out] Error 1
Code:
irom0_0_seg : org = 0x40201010, len = 0x2B000
Code:
irom0_0_seg : org = 0x40201010, len = 0x2D000
Statistics: Posted by ESP_Faye — Fri Jan 30, 2015 3:39 pm