Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Þórhallur Sverrisson
@thorhs
I’m going to dig up the other wifi and give it a whirl
br
brb
Þórhallur Sverrisson
@thorhs
First test indicates the 5 minute issue is related to ESP softAP to ESP client
I have not run the same two ESPs through the huawei router for close to 10 minutes now without issues...
kathir51
@kathir51
@Links2004 if i want to build arduino ide from source what are essential tools required ? i have ant , tool.jar
kathir51
@kathir51
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
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
@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
@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
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
@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
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

@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
@Links2004 I tried same alogritham used in Arduino L:ibrary
Victor Aprea
@vicatcu
hi
anybody home?
xbary
@xbary
Hi, Yes .... working
patjazz
@patjazz
esp12.svg
Markus
@Links2004
@kathir51 have you wifi_station_connect(); in your code?
kathir51
@kathir51

@Links2004 yes .But to the surprise the same code using extern "C" works in arduino ide extern "C" {

include "osapi.h"

include "ets_sys.h"

include "mem.h"

include "os_type.h"

include "user_interface.h"

include "gpio.h"

include "espconn.h"

include "c_types.h"

}

struct ip_info ipconfig,ip;

enum status { WL_DISCONNECTED = 0, WL_CONNECTED = 1, WL_NO_SSID_AVAIL = 2, WL_CONNECT_FAILED = 3 , WL_IDLE_STATUS =5 };

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;

}
void ICACHE_FLASH_ATTR
user_init(void)
{
Serial.begin(115200);
Serial.print("wifi connecting\r\n");
os_printf("wifi connecting\r\n");
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);
ETS_UART_INTR_DISABLE();
wifi_station_set_config(&stationConf);
wifi_station_connect();
ETS_UART_INTR_ENABLE();
wifi_station_dhcpc_start();
while (status() != WL_CONNECTED) {
//for(int i=0;i<10;i++)
delay(500);
Serial.printf(".");
}
os_printf("wifi connected\r\n");
Serial.print("wifi connected\r\n");
char kat[40];
wifi_get_ip_info(STATION_IF, &ipconfig);
sprintf(kat,"IPaddress: %u %u %u %u",IP2STR(ipconfig.ip.addr);
Serial.print(kat);

}

//Do nothing function

void setup() {
// put your setup code here, to run once:
user_init();
}

void loop() {
// put your main code here, to run repeatedly:
// user_init();
}

sticilface
@sticilface
Is anyone willing to share a web server example with a SPIFFS file manager viewer, and file uploader? not wanting to re-invent the wheel. playing with the SD example, but there is no web front end for it?
Me No Dev
@me-no-dev
there is
:)
it's in the folder were the sketch is
iggr recently shared a rework of my SPIFFS sketch that we had back ago
but you need to get the contents to the spiffs
has a file browser/uploader/editor in one located at http://ip-of-esp/edit
Me No Dev
@me-no-dev
listing files seem to not be working and starting "/" needs to be removed from the path in handleFileRead
the rest seems working
Me No Dev
@me-no-dev
here is a fixed version with instructions on how to upload the contects
should maybe go into the examples
Me No Dev
@me-no-dev
@igrr I have a verry interesting problem uploading larger files to the SPIFFS
if the file is larger than 226KB, I get at very particular points wrong bytes
those are exactly the next byte after 226KB, 364KB, 728KB and I imagine every 364KB after that
offsets correctpond to 0x38801, 0x5B001, 0xB6001, ... so on
Me No Dev
@me-no-dev
and the wrong byte is usually only missing the first bit (if it's set)
$ cmp -l map.png ~/Downloads/map.png 
 231425 145 144
 372737 265 264
 745473 135 134
kathir51
@kathir51
h i to all Developers. As acadamic interest I want to debug some information from ARDUINO-ESP package Since from version 1.6.4 Board manager only controls package installation . So i installed previous version 1.63 and put Arduino-espcore in the hardware folder created in the arduino folder as per insrtruction below Create a folder named hardware in your Sketchbook folder, usually:
Linux: ~/Sketchbook
OS X: ~/Documents/Arduino
Windows: ~/My Document/Arduino
Download a release
Extract release
Place esp8266com folder in hardware folder created in step 1.
Start or restart the Arduino IDE I followed the above steps. When i compile ESPWIFI.SERVER it gives error " ESP8266Wifi.h" not found No such file or directory . But it is available in lib folder of esp8266 core Can any one help me?
Me No Dev
@me-no-dev
so you put the esp arduino files in your sketchbook/hardware folder?
sticilface
@sticilface
@me-no-dev that looks great cheers. Will give it a go. Thanks.
sticilface
@sticilface
Got it kind of working, but or some reason files ending in .html don't load when clicked on. if i try to create a .htm file, it fails saying file exists, and then loads the html file.
sticilface
@sticilface
I'm liking the editor.. v smooth
Michael Miller
@Makuna
@igrr Another person (@patjazz) found that calling ESP.getCpuFreqMHz() in the setup section returning 80mhz and calling it in the loop section returns 160mhz when he has it set it 160mhz. Is there a reason for this?