Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:02
  • 12:18
    dsyleixa edited #6661
  • 12:17
    dsyleixa edited #6661
  • 12:17
    dsyleixa edited #6661
  • 12:16
    dsyleixa edited #6661
  • 12:15
    dsyleixa edited #6661
  • 12:11
    dsyleixa edited #6659
  • 12:11
    dsyleixa edited #6659
  • 12:09
    dsyleixa edited #6659
  • 12:06
    dsyleixa edited #6661
  • 12:05
    dsyleixa edited #6661
  • 11:56
    dsyleixa edited #6661
  • 11:55
    dsyleixa opened #6661
  • 11:46
  • 11:38
    dsyleixa edited #6659
  • 11:35
    dsyleixa edited #6659
  • 11:35
    dsyleixa edited #6659
  • 11:15
    johnm545 opened #6660
  • 11:02
    dsyleixa opened #6659
Redferne Bellini
@Redferne
Haha. Was really upset about this last week. Thanks, %Lu to printf a uint64_t. Why in gaawks name is PRIu64 defined as %lu?
Bert Melis
@bertmelis
so it is a bug, or intended? And it's SDK code, not Arduino.
Me No Dev
@me-no-dev
unsigned int on 32 bit system is uint32_t. unsigned long int is uint64_t
Bert Melis
@bertmelis
now I'm completely lost
millis() returns uint32_t which is defined as unsigned long. In this logic, uint64_t is unsigned long long.
Bert Melis
@bertmelis
however, to printf uint64_t I have to use Lu which implicates this is a long double.
Me No Dev
@me-no-dev
uint32_t is unsigned int
int is int32_t (32 bit system)
millis returns unsigned long for compatibility probably
Bert Melis
@bertmelis
I take this from c_types.h:
typedef unsigned int        uint32;
typedef unsigned long long  uint64;
Me No Dev
@me-no-dev
hmmm.. that seems odd
Bert Melis
@bertmelis
same definitions in stdint.h. So it is very odd printf assumes uint64_t is a long double (which is something comepletely different off course)
maybe I'm looking in the wrong place. I looked into the headers at Arduino/tools/sdk/...
david gauchard
@d-a-v
This is not odd to me. On 32 bits archs, int/long are 32 and long long is 64. I just tested it again on the esp. It has to be noted that printf(%) deal with int(%d %i) long(%ld %li) or long long (%lld %lli %Ld %Li) (man printf is not clear, speaking of double for L but also saying it's a synonym of ll which applies to integers). It does not known int_t types. This is why these PRI* macro were introduced, and yes at least PRIu64 prints "lu" too here.
david gauchard
@d-a-v
on 32 and 64 bits archs, we can always cast to (unsigned) int and use %u/id for 32 bits, or cast to (unsigned) long long and use %Lu/id for 64 bits. At least until these PRI* macro are worked-out.
David Albert
@dalbert2

I am working on a wireless bridge device (like Zigbee to WiFi) and believe I need to turn off the WiFi in order to transmit in Zigbee for FCC compliance reasons.

I am disconnecting using the sequence WiFi.disconnect(true); WiFi.mode(WIFI_OFF); WiFi.forceSleepBegin();. I re-enable using WiFi.forceSleepWake(); WiFi.persistent(false); WiFi.mode(WIFI_STA); WiFi.begin(mySsid, myPsk);

This works, but as soon as I re-enabled WiFi, the onSTAGotIP() callback is invoked with a null IP address and it is not invoked again when the IP address is actually received via DHCP. Is this expected behavior or should I file a problem ticket?

Bert Melis
@bertmelis
silly question maybe, but what is the c++ (standard) version of the compiler? Or where can I find out?
Clemens Kirchgatterer
@everslick
somewhere in the tools directory is the toolchain. the compiler takes the command line parameter --version and will happily report its version if asked nicely.
../../Arduino-ESP8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++ --version
xtensa-lx106-elf-g++ (crosstool-NG 1.20.0) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Develo
@devyte
C++11. Be aware that stdlibc++ support is incomplete.
Bert Melis
@bertmelis
thanks, where did you find this info?
Clemens Kirchgatterer
@everslick
sankarsurya
@sankarsurya
if anyone knows the esp32 arduino spi master receive code
Me No Dev
@me-no-dev
@sankarsurya there is no point to ask this again here
do some googling, read some examples... it's pretty straight-forward peripheral
Bert Melis
@bertmelis
Do I understand correctly that os_strcpy or ets_strcpy optimized versions of the standard C function strcpy? (for example, complete list in osapi.h)
Is there any reason to use the non API versions?
Develo
@devyte
@bertmelis I'm not sure about this, but I think they all map to the same underlying function
Ash
@ashthespy
Hi,
Off late, I don't seem to be able to have success with OTA. It starts of fine, but then seems to reset somewhere down the line. This happens at seemingly random percentages 3 -- 58 even with the simple OTA sketch

                 Start

Progress: 0%
Progress: 0%
Progress: 0%
Progress: 0%
Progress: 1%
Progress: 1%
Progress: 1%
Progress: 2%
Progress: 2%
Progress: 2%
Progress: 3%
Progress: 3%
Progress: 3%

Soft WDT reset

ctx: cont
sp: 3fff05e0 end: 3fff08d0 offset: 01b0


>>>stack>>>
3fff0790:  00000000 4000444e 00000001 40100690

3fff07a0:  00000000 4000420c 60000200 3fff2b8c

3fff07b0:  00000100 40004ac0 00000100 002b5000

3fff07c0:  00000100 3fff2b4c 3fffc718 002b5000

3fff07d0:  00001000 00e8a101 40105734 00001000

3fff07e0:  3fff2b4c 3fff2b4c 00003000 3fff2b4c

3fff07f0:  3fffc718 3fff2b4c 40209c48 3ffef8b0

3fff0800:  002b5000 40208712 002b5000 00001000

3fff0810:  00000000 3ffef7c4 3ffef808 40209111

3fff0820:  00000000 3ffef808 3ffef72c 402081e8

3fff0830:  40106f70 00000000 00001388 3ffef8b0

3fff0840:  00000000 3fff28ac 00000000 40107028

3fff0850:  6001a8c0 6001a8c0 3ffef678 40206bff

3fff0860:  3ffef7b0 00000000 00000001 40202aec

3fff0870:  888e8888 88ee88e8 8e8e8e88 3ffef8a4

3fff0880:  3fffdad0 00000000 3ffef72c 4020832a

3fff0890:  4b000000 00000000 3ffef89d 402027a2

3fff08a0:  00000000 00000000 00000001 40209c69

3fff08b0:  3fffdad0 00000000 3ffef89d 40209c94

3fff08c0:  feefeffe feefeffe 3ffef8b0 40100700

<<<stack<<<


 ets Jan  8 2013,rst cause:2, boot mode:(3,6)
Arun Khanchandani
@arunk140
Download the EspException Decoder. That should give you what the stack means.
Holger Lembke
@holgerlembke
  HTTPClient http;

  http.begin("http://localhost/");
  int result = http.POST("hallo");
  String answer = " "+http.getString();  

  Serial.println("result: "+String(result));
  Serial.println("answer: "+answer);

  http.end();
all I get is result=-1
Me No Dev
@me-no-dev
hahahahaha
Holger Lembke
@holgerlembke
Oh. I see.
holgerlembke @holgerlembke stupid
Holger Lembke
@holgerlembke
searching for an hour and when I post it I instantly see the error.....
Me No Dev
@me-no-dev
sorry I could not resist to laugh at it :D
Holger Lembke
@holgerlembke
nono, totally fair reaction
soooo stupid
Me No Dev
@me-no-dev
nah ;) happens to all of us
and it made my day a bit better ;) so it's all good
Holger Lembke
@holgerlembke
dispensing happiness is one of my main tasks
Me No Dev
@me-no-dev
Nice!
make sure you do not use localhost there :D
Michael Miller
@Makuna
speaking of adding happiness to the world, does anyone know of a project that exposes a "dead drop" of funny quotes using an esp8266? I thought I remember one that changed the SSID to display something.
sankarsurya
@sankarsurya
hi, is there any one having a sample code for esp32 udp and tcp multicast server
Michael Miller
@Makuna
@sankarsurya this is the esp8266, not the esp32 gitter channel. Mistake?
sankarsurya
@sankarsurya
sorry
Holger Lembke
@holgerlembke
moin moin