Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
brutzler
@brutzler
@me-no-dev : coming back to your 99%
the trick with ArduinoOTA.setPort(80); is not working without IDE-changes.
I had to edit the platform.txt:
tools.espota.upload.pattern="{cmd}" "{path}/espota.py" -i "{serial.port}" -p 80 -f "{build.path}/{build.project_name}.bin"
otherwise there is a "no answer"
But after this changes I was always succesfull on uploading. Only with a http-server on port 80. This was enough to recognize the board in the Arduino IDE.
I tried to change the IP of my ESP between the uploads. The IDE was always loosing the port. And I had to restart it, that there was a rescan.
Thought there is a rescan durin open IDE every x minutes, but I din't see this.
brutzler
@brutzler
EDIT:
To be honest, I was not always succesfull on uploading:
Only the very first time, the ESP stucks:
Progress: 99%
Progress: 100%
End
 ets Jan  8 2013,rst cause:2, boot mode:(1,6)
 ets Jan  8 2013,rst cause:4, boot mode:(1,6)
wdt reset
Me No Dev
@me-no-dev
@brutzler that first digit inthe boot mode is looking not OK
having some hardware pulling down on your GPIOs?
brutzler
@brutzler
Yep, there is a I2C-levelshifter on D5 and D7. Added just today.
Normally the booting looks like this:
Progress: 99%
Progress: 100%
End
 ets Jan  8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
@cp:0
ld
But as I told. This was only the very first time, After this I made about 20 flash cycles. And always working fine.
Markus
@Links2004
may same as here #1017
brutzler
@brutzler
@me-no-dev : You once told me there is a rescan of the IP devices from the IDE every 10 minutes. Can not see this right now. (IDE 1.6.5 + 2.0.0-rc1)
Only get a rescan on restarting the IDE
Me No Dev
@me-no-dev
there is a bug with the IDE itself
loses devices after certain time
untill they merge my current request I'm not about to make a new one
brutzler
@brutzler
ok, but not the loosing is what I am complaining. The IDE is not scanning active.
Me No Dev
@me-no-dev
it is, just not after some time
Markus
@Links2004
?
Me No Dev
@me-no-dev
wrong keyboard.. :)
brutzler
@brutzler
@me-no-dev: you are sure, that the IDE is scanning? I flashed my NodeMCU with a new IP. After this the Ethernet-port dissapeared. I waited one hour, and no new ethernet-port was shown in the port-Menu. After closing the IDE an restarting, the ethernet-port was shown, as expected.
Therefore it looks like there is always only a scan on starting the IDE, and not cyclic. Perhaps I will sniff a little bit with wireshark, to figure this out.
Or is this behaviour because I do not have a TCP-server running on port 8266. As discussed, I have only running a http-server (80).
But why does the IDE find the board on startup? Thats illogical....
Me No Dev
@me-no-dev
I had some debug printouts while I was developing the OTA parg of the IDE and saw it scanning
brutzler
@brutzler
ok, believe you, but I see different. Can you tell me at what time-lag the IDE is scanning?
Me No Dev
@me-no-dev
it should be 2 minutes or so
I know it because I have changed board parameters and have seen them propagate to the IDE
brutzler
@brutzler
And what is the IDE scanning for? a special port?
Helps me to setup the filter of Wireshark
Me No Dev
@me-no-dev
IDE is using mDNS to discover devices that expose particular service
_arduino._tcp in out case
then gets all devices that andswer and goes from there
brutzler
@brutzler
think I will have to learn a little bit about mDNS
Me No Dev
@me-no-dev
the answer contains the IP of the dvice, the name and port
and I really need to buy a new keyboard
brutzler
@brutzler
And for this its enough only to include the <ESP8266mDNS.h>?
I do not see any other specific call in the BasicOTA example
In the DNS_SD_Arduino_OTA there was
   MDNS.begin(host);
   MDNS.addService("arduino", "tcp", aport);
Me No Dev
@me-no-dev
it's now inside ArduinoOTA itself
since it's required for OTA to run
so only the header is enough
call ArduinoOTA.setHostname("blah") before ArduinoOTA.begin() to change it
brutzler
@brutzler
OK. I have seen there is no need for the header, because its already referred in the ArduinoOTA.cpp
Me No Dev
@me-no-dev
it used to be required in order for the IDE to figure out which library to load
not sure if it's still the case
Markus
@Links2004
only for >1.6.6 somewhere there they add dependency check for librarys
Me No Dev
@me-no-dev
good to know
onkelfunny
@onkelfunny

hi @all i have a problem with the eeprom.

  1. flash firmware with eprom.put
struct MyObject{
  float field1;
  byte field2;
  char name[10];
};

void setup() {
MyObject econfig = {
        3.14f,
        65,
        "Working!"
      };
EEPROM.put(0, config);

EEPROM.get(0, econfig);

    Serial.println( "Read custom object from EEPROM: " );
    Serial.println( econfig.field1 );
    Serial.println( econfig.field2 );
    Serial.println( econfig.name );
}
  1. flash firmware only with eprom.get
    ```
    struct MyObject{
    float field1;
    byte field2;
    char name[10];
    };

void setup() {
MyObject econfig;

EEPROM.get(0, econfig);

Serial.println( "Read custom object from EEPROM: " );
Serial.println( econfig.field1 );
Serial.println( econfig.field2 );
Serial.println( econfig.name );

}


The output is:

Read custom object from EEPROM:
0.00
0
```

onkelfunny
@onkelfunny
I tried this examples:
  1. https://www.arduino.cc/en/Reference/EEPROMPut
  2. https://www.arduino.cc/en/Reference/EEPROMGet
    after the second flash the eprom is empty
onkelfunny
@onkelfunny
with EEPROM.begin and EEPROM.commit everything works
Markus
@Links2004
you always need EEPROM.begin and EEPROM.commit
Sven Eliasson
@comino
Does someone else have issues with softAP? I used to work like a charm - now I can not connect with my laptop, but works still with my smartphone. Someone an idea?
(even with AP example)
(stable version it was working, now issues on some devices)
Markus
@Links2004
may its linked to esp8266/Arduino@6be74ec
can you try latest git?
Sven Eliasson
@comino
@Links2004 : Im running current github version - I will test with more devices. Maybe I can localize the issue. I used to work so smooth few weeks ago, so it cant be a big issue.
I = It*
Sven Eliasson
@comino
Oh and - good job with the httpClient :)
onkelfunny
@onkelfunny
@Links2004
is it possible to see wich library throws an error?
Exception (28):
epc1=0x4020c454 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont 
sp: 3fff07f0 end: 3fff0a10 offset: 01a0


>>>stack>>>
3fff0990:  00000001 00000002 3ffef78c 40208143  
3fff09a0:  00000001 3ffef78c 3ffef7a8 40207603  
3fff09b0:  3fffdc20 3ffef78c 3ffef78c 40207403  
3fff09c0:  3fffdc20 00000000 3ffef9d9 40207e0e  
3fff09d0:  3fffdc20 00000000 3ffef700 40207d13  
3fff09e0:  3fff1f38 00000000 40207c3c 40207bec  
3fff09f0:  3fffdc20 00000000 3ffef9d9 4020b35d  
3fff0a00:  00000000 00000000 3ffef9f0 40100114  
<<<stack<<<

 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1264, room 16 
tail 0
chksum 0x42
csum 0x42
~ld
brutzler
@brutzler
@me-no-dev or someone else: talking about mDNS scanning of the Arduino IDE. I let wireshark run (now for 15 min) in the background:
I see on starting of the IDE some Standard query 0x0000 PTR _arduino._tcp.local.... on Port 5353. And my ESP is answering as expected:
But after this there is no further mDNS Query any more :-(
I do not know, why you did see different behaviour on your system...