These are chat archives for esp8266/Arduino

19th
Oct 2015
kathir51
@kathir51
Oct 19 2015 00:39
@Links2004 if i want to build arduino ide from source what are essential tools required ? i have ant , tool.jar
kathir51
@kathir51
Oct 19 2015 05:41
Can any one tell essential tool requird to build ARDUINO IDE from source .I have ant and tool.jar installed . Any other tools required such as wget , git
tzapu
@tzapu
Oct 19 2015 09:49
git and some java runtime i think would be needed, and i think you just need to try it and fix errors when they show. that s how i did it anyway. it was relatively painless
Markus
@Links2004
Oct 19 2015 15:31
@kathir51 the basics are written here: https://github.com/arduino/Arduino/wiki/Building-Arduino
why you want to build the IDE from src?
kathir51
@kathir51
Oct 19 2015 19:19
@Links2004 That is only acadamic interest . I encountered a problem while compiling native c code using xtensa tool chain with make file the wifi is in idle condition only . unable to come from that . my basic code is uart_init(BIT_RATE_115200,BIT_RATE_115200);wifi_set_opmode( STATION_MODE );
char ssid[32] = "Benjamin";
char password[64] ="4522641400abc";
struct station_config stationConf;
stationConf.bssid_set = 0; //need not check MAC address of AP
os_memcpy(&stationConf.ssid, ssid, 32);
os_memcpy(&stationConf.password, password, 64);
wifi_station_set_config(&stationConf);
wifi_station_dhcpc_start();
kathir51
@kathir51
Oct 19 2015 19:25
int status = wifi_station_get_connect_status(); i am getting always state =0; even for correct and wrong ssid and password I am unable solve what mistake in the code . I made conter verification from ARDUINO source code mine is same as their. compiling is success with make file I used SDK 1.4.0 Even i revert back to SDK 0.9.3 SAME
kathir51
@kathir51
Oct 19 2015 19:31
@tzapu Thanks for your information @kathir51
@Links2004 That is only acadamic interest . I encountered a problem while compiling native c code using xtensa tool chain with make file the wifi is in idle condition only . unable to come from that . my basic code is uart_init(BIT_RATE_115200,BIT_RATE_115200);wifi_set_opmode( STATION_MODE );
char ssid[32] = "Benjamin";
char password[64] ="4522641400abc";
struct station_config stationConf;
stationConf.bssid_set = 0; //need not check MAC address of AP
os_memcpy(&stationConf.ssid, ssid, 32);
os_memcpy(&stationConf.password, password, 64);
wifi_station_set_config(&stationConf);
wifi_station_dhcpc_start();int status = wifi_station_get_connect_status(); i am getting always state =0; even for correct and wrong ssid and password I am unable solve what mistake in the code . I made conter verification from ARDUINO source code mine is same as their. compiling is success with make file I used SDK 1.4.0 Even i revert back to SDK 0.9.3 SAME
Markus
@Links2004
Oct 19 2015 19:53
this is "normal" the SDK needs some time to connect if it not go really fast you get 0.
have you tried adding a while similar to
https://github.com/esp8266/Arduino/blob/esp8266/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient.ino#L31-L34
kathir51
@kathir51
Oct 19 2015 21:00

@Links2004 here is my function enum status { WL_DISCONNECTED = 0, WL_CONNECTED = 1, WL_NO_SSID_AVAIL = 2, WL_CONNECT_FAILED = 3 , WL_IDLE_STATUS =5 };

//void to_scan(void) { wifi_station_scan(&config,scan_done); }
uint8 status()
{
int status = wifi_station_get_connect_status();

if (status == STATION_GOT_IP)
  return WL_CONNECTED;
else if (status == STATION_NO_AP_FOUND)
  return WL_NO_SSID_AVAIL;
else if (status == STATION_CONNECT_FAIL || status == STATION_WRONG_PASSWORD)
  return WL_CONNECT_FAILED;
else if (status == STATION_IDLE)
  return WL_IDLE_STATUS;
else
  return WL_DISCONNECTED;

} int x=status();
os_sprintf(info1,"state : %d \r\n", x);
putrsUART(info1);
while (status() != WL_CONNECTED) {
for(int i=0;i<10;i++)
os_delay_us(5000);
putrsUART(".");
}
putrsUART("wifi connected");
char kat[40];
wifi_get_ip_info(STATION_IF, &ipconfig);
os_sprintf(kat,"IPaddress: %u %u %u %u",IP2STR(&ipconfig.ip));
putrsUART(kat);

@Links2004 I tried as you said using while as shown above no use I used sameESP8266. begin code IN ARDUINO
@Links2004 I verified the chip with arduino esp libray functioning well
kathir51
@kathir51
Oct 19 2015 21:07
@Links2004 I tried same alogritham used in Arduino L:ibrary