These are chat archives for esp8266/Arduino

1st
Feb 2016
Ivan Kravets
@ivankravets
Feb 01 2016 00:14
Dear PlatformIO users, PLEASE READ THIS (URGENT) platformio/platformio#490
Stavros Korokithakis
@skorokithakis
Feb 01 2016 01:05
hey @ivankravets, does pubsubclient supporting library.json mean that we'll automatically get updated to the master branch?
Ivan Kravets
@ivankravets
Feb 01 2016 01:19
@skorokithakis hey ;) yes, but don't forget to control that version field is up to date
Stavros Korokithakis
@skorokithakis
Feb 01 2016 01:20
hmm, so how does it work? every commit with that version gets updated to it?
what happens if there are 10 commits for version 2.5, say
Aditya Tannu
@AdySan
Feb 01 2016 05:02
I have a very weird wireshark problem, when I restart my ESP board, I see the broadcast and multicast packets. But after that I don't see any packets going to the router, when I'm sure there's activity going on. It was working just fine, not sure what changed. Even tried wireshark on another computer in WLAN monitor mode.
Aditya Tannu
@AdySan
Feb 01 2016 05:08
I'm probably just using the wrong filter, when there's no filter, I think I see all traffic. Any idea whats the best way to filter a specific ESP's traffic? mac?
VNArmy
@VNArmy
Feb 01 2016 06:22
I've got SPI1 interface Error!, anyone have a clue what I've done wrong ?
With Arducam?
Mario Mikočević
@mozgy
Feb 01 2016 07:29
@VNArmy yep, with arducam
tzapu
@tzapu
Feb 01 2016 09:02
@ / all could WiFi.begin() also remember static ip and gw if previously set?
in my tests so far, it seems to forget them after a restart
@mozgy check connection and CS pin def?
i only got that message when the cam was connected wrong
i would get the Can't find OV2640 module! message all tthe time
even though the cam was working
Mario Mikočević
@mozgy
Feb 01 2016 09:05
I get cam detected ..
tzapu
@tzapu
Feb 01 2016 09:05
it seems the pid was 0x41 instead of 0x42 as in all the examples
VNArmy
@VNArmy
Feb 01 2016 09:20
The camera work well with the examples.
But when the camera has been fail, I got the SPI1 error.
I bought 3 of Arducam and one Arducam fail :(. 2 others work well.
tzapu
@tzapu
Feb 01 2016 09:22
@mozgy there s some weirdness with these cams, if those messages are to believed, it means in your case, it can connect to the i2c interface, but not the spi one
VNArmy
@VNArmy
Feb 01 2016 09:23
@mozgy there s some weirdness with these cams, if those messages are to believed, it means in your case, it can connect to the i2c interface, but not the spi one
Right.
@ / all could WiFi.begin() also remember static ip and gw if previously set?
I don't test with arduino but with Open SDK, there's no command for saving the static IP. They only remember the SSID and Password.
VNArmy
@VNArmy
Feb 01 2016 09:28
Each time ESP8266 restart, it call the DHCP command automatically.
tzapu
@tzapu
Feb 01 2016 09:43
yeah… long shot i guess… i hoped that when he redid the ESP8266WiFi lib, maybe @Links2004 saw something that could achieve this
Me No Dev
@me-no-dev
Feb 01 2016 10:14
hey guys :) here goes a stupid question
can someone give me a good way to crash my ESP?
Chris Elsworth
@celsworth
Feb 01 2016 10:14
remove all caps
Me No Dev
@me-no-dev
Feb 01 2016 10:15
i need to take some screenshots and I need my ESP to spew some stack trace
@celsworth do not want to ruin it :D
Chris Elsworth
@celsworth
Feb 01 2016 10:15
power it up on a bench supply limiting it to 100mA
it really hates that :)
Me No Dev
@me-no-dev
Feb 01 2016 10:15
:D
Chris Elsworth
@celsworth
Feb 01 2016 10:17
I guess a crash wouldn't include a wdt reset? cos that'd be easy
Me No Dev
@me-no-dev
Feb 01 2016 10:17
it will not give stack trace
i need exception
I have an idea
new cbuf -> delete cbuf -> write to cbuf
Mario Mikočević
@mozgy
Feb 01 2016 10:31
@me-no-dev overcommit stuff on heap
Me No Dev
@me-no-dev
Feb 01 2016 10:37
EspExceptionDecoder.png
got it :)
Chris Elsworth
@celsworth
Feb 01 2016 10:38
umm_malloc :D
that in master now?
Me No Dev
@me-no-dev
Feb 01 2016 10:38
in mine :D
Chris Elsworth
@celsworth
Feb 01 2016 10:38
ah ;)
see sdk 1.5.2 too?
Me No Dev
@me-no-dev
Feb 01 2016 10:39
nope
Chris Elsworth
@celsworth
Feb 01 2016 10:39
few days ago
Me No Dev
@me-no-dev
Feb 01 2016 10:39
anything special?
Chris Elsworth
@celsworth
Feb 01 2016 10:39
os_timer_arm fix, apparently
oh I meant to look up what byte 114 of esp_init_data_default does
and what the hell is airkiss, google doesn't help :D
Me No Dev
@me-no-dev
Feb 01 2016 10:41
SDIO is interesting
but SDIO runs on the flash pins so... no clue how that will work
Chris Elsworth
@celsworth
Feb 01 2016 10:41
is that the previously unused boot mode
Me No Dev
@me-no-dev
Feb 01 2016 10:42
they mention also support for HSPI flash
so maybe a combination of the two and that boot mode
you need to store the app somewhere
but I always had the understanding that SDIO mode does not need flash and lets you access the registers directly from a master device (use as wifi card for computer)
tzapu
@tzapu
Feb 01 2016 10:52
also wps functions wifi_wps_enable() … etc
those are interesting
Me No Dev
@me-no-dev
Feb 01 2016 10:52
those are in 1.5.1
aren't they?
tzapu
@tzapu
Feb 01 2016 10:52
uh, they were mentioned
maybe just for AT
Stavros Korokithakis
@skorokithakis
Feb 01 2016 10:53
hey guys
tzapu
@tzapu
Feb 01 2016 10:53
if they are in 1.5.1 are they exposed in the core?
Stavros Korokithakis
@skorokithakis
Feb 01 2016 10:53
i have this code to run as the first thing on boot and it's causing a watchdog reset, anybody know why?
    for (int i=0; i<16; i++) {
        pinMode(i, OUTPUT);
        digitalWrite(i, LOW);
    }
tzapu
@tzapu
Feb 01 2016 10:53
writing to a pin you shouldn t? naughty naughty ... jk
Stavros Korokithakis
@skorokithakis
Feb 01 2016 10:54
probably
but which pin?
tzapu
@tzapu
Feb 01 2016 10:54
well, 16 tries to find out
Stavros Korokithakis
@skorokithakis
Feb 01 2016 10:54
haha
tzapu
@tzapu
Feb 01 2016 10:54
or divide and conquer, probably 4-6 tries
:)
Stavros Korokithakis
@skorokithakis
Feb 01 2016 10:54
yep
what the hell? it won't go into flash mode now
Me No Dev
@me-no-dev
Feb 01 2016 10:56
which pin? all from 6 to 11 :D
tzapu
@tzapu
Feb 01 2016 10:56
some floating gpio decided to float another way?
Me No Dev
@me-no-dev
Feb 01 2016 10:56
you set the FLASH pins to OUTPUT
Stavros Korokithakis
@skorokithakis
Feb 01 2016 10:56
damn :(
so i have to not use 6-11?
Me No Dev
@me-no-dev
Feb 01 2016 10:57
yes
Chris Elsworth
@celsworth
Feb 01 2016 10:57
remember 1/3 are serial too.
Stavros Korokithakis
@skorokithakis
Feb 01 2016 10:58
ouch, you're right
Chris Elsworth
@celsworth
Feb 01 2016 10:58
and 16 can be special if you've got it hooked up to RST
so yeah, really, a loop over them all isn't good :)
Stavros Korokithakis
@skorokithakis
Feb 01 2016 10:58
as for that, i don't
yay :P
doesn't initializing serial set them back to input?
i'm resetting them first thing
Chris Elsworth
@celsworth
Feb 01 2016 10:59
calls uart_init, so possibly
Stavros Korokithakis
@skorokithakis
Feb 01 2016 11:00
alright, code fixed
now to figure out how to flash it
ah, alright, using a different usb port worked
tzapu
@tzapu
Feb 01 2016 11:05
@me-no-dev seems they are there since sdk 1.2.0 the wps stuff :P
Mario Mikočević
@mozgy
Feb 01 2016 11:17
heheh, got few PCBs made with 1206, oh boy those are HUGE now
Stavros Korokithakis
@skorokithakis
Feb 01 2016 11:31
@mozgy huge? why?
Mario Mikočević
@mozgy
Feb 01 2016 11:35
after working a lot with 0805 .. ;)
Stavros Korokithakis
@skorokithakis
Feb 01 2016 11:41
ah true
andig
@andig
Feb 01 2016 14:40
Asking again: I'd like to know if I can save data to SPIFFS after SPIFFS has been updated via OTA.
E.g. Would it be possible to write data from RAM to the freshly updates spiffs during the ota.onEnd() event? Would it need any re-starting spiffs? Looking for a way here to update file while keeping config data intact.
Me No Dev
@me-no-dev
Feb 01 2016 15:03
you need to remount SPIFFS
unmount then mount again
andig
@andig
Feb 01 2016 15:23
@me-no-dev how would I do that? Only high-level exposed function is FS.begin().
close() from FSImpl.h?
Me No Dev
@me-no-dev
Feb 01 2016 15:25
there is close for file
do not see one for FS
yeah... it needs it maybe :) but @igrr is the architect of the FS
Ivan Grokhotkov
@igrr
Feb 01 2016 15:37
i didn't think about this use case :) yeah, it needs an unmount
Me No Dev
@me-no-dev
Feb 01 2016 15:38
ideally should be unmounted on update start and remounted on success or formatted on error
andig
@andig
Feb 01 2016 15:50
that would be... wonderful. I'd like to updat SPIFFS without using user-generated config information.
Markus
@Links2004
Feb 01 2016 16:13
@tzapu the SDK dont store the IP / gw settings its up to the user to do.
@me-no-dev FAIL: *(NULL) = 0xFA11;
Chris Elsworth
@celsworth
Feb 01 2016 16:21
does that even compile? :)
oh you mean use an actual null pointer, not literally NULL, ok :)
Markus
@Links2004
Feb 01 2016 16:23
you can try to access 0x00000000 --> NULL the compiler will allow it
Chris Elsworth
@celsworth
Feb 01 2016 16:23
that doesn't build for me
Markus
@Links2004
Feb 01 2016 16:23
may a cast to void * is nedded
since NULL has no type
Chris Elsworth
@celsworth
Feb 01 2016 16:24
ah ok
*((int *)NULL) = 0xFA; - this builds
Markus
@Links2004
Feb 01 2016 16:24
yes and 100% stack dump guaranty
Chris Elsworth
@celsworth
Feb 01 2016 16:24
yep :D
Chris Elsworth
@celsworth
Feb 01 2016 16:31
300 open issues now :/
do you guys need help cleaning up the older abandoned issues, or?
Ivan Grokhotkov
@igrr
Feb 01 2016 16:48
eventually i would like to migrate all "troubleshooting" and "question" type of issues to a Q&A platform similar to StackOverflow
this would bring down the total number of issues to something reasonable
Maybe next time i have a bad day I'll go berserk and close 100-something issues with "won't fix" resolution...
Mario Mikočević
@mozgy
Feb 01 2016 17:38
@VNArmy thanks for the CS hint, found the culprit, it works now
Mario Mikočević
@mozgy
Feb 01 2016 17:47
@igrr "won't fix" is good way of dealing with it :)
Helio Machado
@0x2b3bfa0
Feb 01 2016 17:57
@igrr: Maybe a proposal on Area51? :alien: :smiling_imp: :smile:
Martin Ayotte
@martinayotte
Feb 01 2016 20:42
Yesterday, I've played for the first time with the ADC :-) ... I'm questioning myself about ADC_MODE macro : is this macro only redefining/overwriting existing get_adc_mode ? The same question could be asked for another topic : RF_MODE seems to redefining the get_rf_mode ? it is really not clear in the SDK docs ... :-(
d-anders
@d-anders
Feb 01 2016 20:49
github should have a downvote system, enough downvotes and the issue is closed as 'wont fix' :)
airkiss sounds very applr-ish, but maybe isnt?
Martin Ayotte
@martinayotte
Feb 01 2016 20:55
Here is the conclusion I made about ADC_MODE in the forum : http://www.esp8266.com/viewtopic.php?f=13&t=7908&p=40194#p40194
Maybe some new functions should be added to Arduino ESP core so that ugly coding can be done more nicely ... my 2 cents ;-)
andig
@andig
Feb 01 2016 21:11

Running asyncwebserver, serving static content from SPIFFS I'm seing regular crashes:

0x4000dfd9: ?? ??:0
0x4000dfd9: ?? ??:0
0x40219e9f: pp_attach at ??:?
0x40205c54: spiffs_object_read at C:\andi\arduino\hardware\esp8266com\esp8266\cores\esp8266\spiffs/spiffs_nucleus.c:1681

They always point to the same line:

res = _spiffs_rd(
    fs, SPIFFS_OP_T_OBJ_DA | SPIFFS_OP_C_READ,
    fd->file_nbr,
    SPIFFS_PAGE_TO_PADDR(fs, data_pix) + sizeof(spiffs_page_header) + (cur_offset % SPIFFS_DATA_PAGE_SIZE(fs)),
    len_to_read,
    dst);
This is the associated debug output from spiffs just before the crash:
read: load objix page 052e:0000 for data spix:0000
read: offset:%i rd:%i  data spix:0000 is data_pix:00fb addr:00000000
andig
@andig
Feb 01 2016 21:25
The crash seems to happen when the dst parameter of the call is finally 00000000
andig
@andig
Feb 01 2016 21:46
looks like a buffer allocation failure in AsyncResponse that isn't checked.
aug2uag
@aug2uag
Feb 01 2016 22:59
I can verify in my experience with the firmware written using previous build (~Sep 2014, sorry version is not on hand) that SPIFFS was no longer working as expected following recent update. Migrated to EEPROM that seems to be working well now, and was not for me previously.
Stavros Korokithakis
@skorokithakis
Feb 01 2016 23:25
hey guys, i have some code bitbanging some highs/lows on a gpio pin. is there something i can do to help the code run in real-time?
gonsays
@gonsays
Feb 01 2016 23:28
Helo guys, can I somehow use this on Arduino IDE: https://github.com/CHERTS/esp8266-gpio16 ?
Michael Miller
@Makuna
Feb 01 2016 23:31
@skorokithakis bit bang timing can't be guaranteed. You can see my GitHub implementation of NeoPixels that bitbangs (https://github.com/Makuna/NeoPixelBus/blob/master/NeoPixelesp8266.c) and uses the _getCycleCount() to make them pretty accurate. The problem is that there is a WiFi interrupt that screw this up and you can't turn off the interrupts otherwise that same wifi code will not function or even cause the esp to reset. If the timing isn't a problem (like having another pin for a clock) then this method will work fine.
Stavros Korokithakis
@skorokithakis
Feb 01 2016 23:33
@Makuna that's very useful, thank you!
Michael Miller
@Makuna
Feb 01 2016 23:34
@skorokithakis the other possibility is to use the Dma I2s support (same library but the DmaDriven branch) and this works by using hardware support to stream out a buffer (that is filled in a way to simulate your IO pin protocol) without the CPU doing much work.
Stavros Korokithakis
@skorokithakis
Feb 01 2016 23:34
that doesn't sound like it would work as well, i need to keep highs and lows for arbitrary durations
Michael Miller
@Makuna
Feb 01 2016 23:37
another method is to use a timer0, see the included Servo library. The timer0 will call the ISR that then flips bits and sets up the next state and time so very arbitrary ups and downs can be used, but this method isn't very good a small time periods (below 100us).
Stavros Korokithakis
@skorokithakis
Feb 01 2016 23:44
yeah, i sometimes need accuracy as low as 10 us :/
i'm going to just try this method again
i think it's also affected by the fact that i have a very long wire connected
Michael Miller
@Makuna
Feb 01 2016 23:53
@skorokithakis make sure what ever code that does the bitbang is marked for ram using ICACHE_RAM_ATTR AND that said code is not in the ino or cpp file (must be c otherwise the attribute is ignored).
Stavros Korokithakis
@skorokithakis
Feb 01 2016 23:54
hmm, what does that do?
and how can i mark it?
Michael Miller
@Makuna
Feb 01 2016 23:54
(see the code I pointed to above, it does it)
Stavros Korokithakis
@skorokithakis
Feb 01 2016 23:54
ah, thanks
what does ICACHE_RAM_ATTR do?
Michael Miller
@Makuna
Feb 01 2016 23:56
that function will be moved into RAM. Most code sits in flash and will be chached into RAM. This process can take time and will cause timing issues. I have seen as much as 10us arbitrarily inserted into my output (between IO pin up and down) that was caused by that code being brought back into RAM before running.
Stavros Korokithakis
@skorokithakis
Feb 01 2016 23:56
ah, thanks, i'm going to refactor that now
Michael Miller
@Makuna
Feb 01 2016 23:57
functions not marked can be dropped out of RAM.
Stavros Korokithakis
@skorokithakis
Feb 01 2016 23:58
hmm, i moved it to C but it's erroring out in things like LOW, Serial, etc
where are those defined?
Michael Miller
@Makuna
Feb 01 2016 23:59
Also note, Pin IO changes run at 8mhz. This means that even if you had code the looped and just toggled a pin, the pin out could not match as it is updated at a slower rate from the state stored from PIn IO calls.
Me No Dev
@me-no-dev
Feb 01 2016 23:59
no Serial in C ;) use os_printf
Stavros Korokithakis
@skorokithakis
Feb 01 2016 23:59
aw man :(
how about LOW, true/false, etc?