These are chat archives for esp8266/Arduino

10th
Jun 2016
Stavros Korokithakis
@skorokithakis
Jun 10 2016 00:06
Ah, because the source voltage is equal to the gate? So this is a pmos
Martin Ayotte
@martinayotte
Jun 10 2016 00:38
No, it's Nmos
Stavros Korokithakis
@skorokithakis
Jun 10 2016 08:39
Oh hmm
Clemens Kirchgatterer
@everslick
Jun 10 2016 09:04
WiFi.hostByName() blocks rather long, is there an API to shorten the timeout?
Clemens Kirchgatterer
@everslick
Jun 10 2016 09:10
hmpf, it even seems to cache the failed request. so when internet comes back it still cannot resolve the host name.
Sven Eliasson
@comino
Jun 10 2016 12:31

Hey,
Im trying to write a unit test for the MD5Builder in the core.
Its using the precompiled axtls -> "#include "md5.h"

Unit tests are using g++ and I cant link it with libaxtl.a, it throws "skipping incompatible".
I guess thats a fundamental problem at testing axltls ( @igrr )

(cause its compiled with the xtensa.. )
Someone any ideas?
Lars Englund
@larsenglund
Jun 10 2016 13:07
Hi, I'm having a strange boot problem with the ESP.. I have a ESP12-F module on a PCB with the same USB power & lipo charge circuit as the Sparkfun ESP Thing, when I plug in USB power the ESP boots just fine but when I only plug in the battery it won't boot up..
When I plug in the USB I get this:
and when I plug in the battery I get this:
CH1 is VCC, CH2 is CH_PD, CH3 is RST, CH4 is GPIO0
Lars Englund
@larsenglund
Jun 10 2016 13:12
Also, if I plug in the battery and the USB and to a reset it boots and runs fine, I can then remove the USB and it keeps running fine from the battery until I do another reset (with a hardware button that pulls RST low)
The voltage looks very solid with the battery, I would expect a drop in voltage if there was a lack of current to boot up properly, right?
But the lack of oscillation on GPIO0 tells me something is not right.. besides the fact that it's not booting up ofc :P
Any one have any thoughts on what to try out to isolate the problem?
Me No Dev
@me-no-dev
Jun 10 2016 13:14
yeah... really strange
Sven Eliasson
@comino
Jun 10 2016 13:16
Im actually not realy sure if the voltage will realy drop in case you are at the current limit
Lars Englund
@larsenglund
Jun 10 2016 13:16
The battery I'm using is a Nokia BL-5C
Sven Eliasson
@comino
Jun 10 2016 13:18
okay that should be able to drive more than 100mA
Lars Englund
@larsenglund
Jun 10 2016 13:18
Sven Eliasson
@comino
Jun 10 2016 13:20
Its sparkfuns schematic, right?
Lars Englund
@larsenglund
Jun 10 2016 13:20
Yep
Well, copied the battery and ldo stuff from it and the usb interface from the nodemcu devkit
The battery charging is working just fine to
Sven Eliasson
@comino
Jun 10 2016 13:21
so you are sure its charged?
Lars Englund
@larsenglund
Jun 10 2016 13:21
Yes
Started at 3.88V when I began experimenting yesterday
and left it plugged in overnight and this morning the charging LED showed it was fully charged and it shows just short of 4.2V
Sven Eliasson
@comino
Jun 10 2016 13:25
I wonder why RST is rising that slow - VCC has to charge 2.2µF and is much quicker
Lars Englund
@larsenglund
Jun 10 2016 13:26
Just to be sure I tried replacing the battery with a 4.5V exernal power source but got the same result
Yeah, they should be almost the same right?
The 10k shouldn't introduce any time difference and the capacitance of the RST pin should be very small
Sven Eliasson
@comino
Jun 10 2016 13:28
The only difference I see that a logical "high" on RST takes some ms longer than with USB
y
but should be fine...
And if you supply with a higher voltage for the external power supply?
Lars Englund
@larsenglund
Jun 10 2016 13:32
5V yields the same results..
And to make it even stranger: if I bypass the LDO and plug in 3V directly to VCC on the ESP it still wont boot..
Sven Eliasson
@comino
Jun 10 2016 13:34
So only via USB its working?
Lars Englund
@larsenglund
Jun 10 2016 13:35
To boot yes, but once it has booted I can unplug the USB and it keeps running from battery
But if I press reset when only on battey it won't boot up again
Clarification: when plugging in an external 3.3V source directly to the ESP VCC pin I get the exact same graph as when plugging in the battery or any other power source to the battery connector
Me No Dev
@me-no-dev
Jun 10 2016 13:40
could it maybe have to do with the fact that DTR and RST are connected to the serial chip which isnot powered unless on USB?
Sven Eliasson
@comino
Jun 10 2016 13:40
yeah that could be right
but why does RTS rises still to high
wait you oszilloscope is monitoring RTS not RESET
Me No Dev
@me-no-dev
Jun 10 2016 13:42
graph does look good
Lars Englund
@larsenglund
Jun 10 2016 13:42
Hmm.. you mean that it could be pulling GPIO0 high?
or low I mean..
@comino CH3 is RESET
Sven Eliasson
@comino
Jun 10 2016 13:46
realy pretty strange :/
Lars Englund
@larsenglund
Jun 10 2016 13:47
Which can get connected to RTS when DTR goes high
But I kindof wan't @me-no-dev to be right since it's the only straw I've been able to grasp so far :)
Would putting 10K pulldowns on RTS and DTR eliminate any potential inteferance from the CH340G?
Me No Dev
@me-no-dev
Jun 10 2016 13:52
maybe :) can you stick the probes on the DTR/RTS/GPIO0 and RESET?
Lars Englund
@larsenglund
Jun 10 2016 13:53
yeah, just gotta solder some wires onto the pins
CH1 is RTS and CH2 is DTR..
Doesn't look like pulldowns would do any good... :(
Sven Eliasson
@comino
Jun 10 2016 14:01
the one rising is CH2? hard to distinguishe the colors
Lars Englund
@larsenglund
Jun 10 2016 14:03
Nope, CH2 is the turquise that stays at 0
together with the yellow CH1
@me-no-dev do you remember what the threshold logic voltage for the ESP is?
Lars Englund
@larsenglund
Jun 10 2016 14:08
(from our interrupt debugging)
Me No Dev
@me-no-dev
Jun 10 2016 14:08
nope :)
can you zoom and take images with both situations?
maybe something happens fast around that spot again?
Lars Englund
@larsenglund
Jun 10 2016 14:09
There is a little noise on RTS for about 200us when plugging in, reaching about 600mV
Hmm.. when plugging in the USB both RTS and DTR go high
and stay there
Soldering pullups for a test.. if this works i will kiss you @me-no-dev
Me No Dev
@me-no-dev
Jun 10 2016 14:13
:D
Lars Englund
@larsenglund
Jun 10 2016 14:13
Well, buy you a beer atleast :)
Lars Englund
@larsenglund
Jun 10 2016 14:23
Hmm.. putting 10k pullups on them makes the scope show CH1(RTS) as 1.2V and CH2(DTR) as 5.8V when plugging in the 4.1V battery...?
that shouldn't be possible?
Sounds far fetched that it started acting like a boost converter :P
Me No Dev
@me-no-dev
Jun 10 2016 14:24
where did you pull them up to?
VIN or VCC?
Lars Englund
@larsenglund
Jun 10 2016 14:24
The VCC-pin of the ESP
So the output of the LDO
But I guess we have atleast confirmed that the problem stems from RTS and DTR being low/floating when they should be high, question is how to solve it..
Strange the pullups didn't work..
Lars Englund
@larsenglund
Jun 10 2016 14:31
So you've earned half a beer or a hug @me-no-dev ;)
Me No Dev
@me-no-dev
Jun 10 2016 14:31
hahahahah
we have beer in 3 liter bottles here
can I have half of that?
Lars Englund
@larsenglund
Jun 10 2016 14:32
Hehe, sure thing :)
Me No Dev
@me-no-dev
Jun 10 2016 14:32
I'll draw the schematic here and try to figure out what is going on
Lars Englund
@larsenglund
Jun 10 2016 14:32
I can send you the kicad file if that helps
Me No Dev
@me-no-dev
Jun 10 2016 14:33
nah :) i'm looking at the picture, it's enough
I was thinking something else....
didn't RX need to be pulled up for boot?
Lars Englund
@larsenglund
Jun 10 2016 14:35
RXD on the ESP?
Me No Dev
@me-no-dev
Jun 10 2016 14:36
yes
Me No Dev
@me-no-dev
Jun 10 2016 14:38
does reset go up before gpio0?
Lars Englund
@larsenglund
Jun 10 2016 14:40
nope..
(shows plugging in USB to the unmodified circuit)
(succesful boot)
CH3 is RESET
Lars Englund
@larsenglund
Jun 10 2016 14:50
Hmm.. measuring with a multimeter shows 1.3V on both RTS and DTR when being pulled up
Guess that means they are being pulled down with about 9K?
Helio Machado
@crushedice2000
Jun 10 2016 14:51
@Links2004 or another user of your web sockets library: What address should I use to connect to the WS server? I'm using var connection = new WebSocket('ws://192.168.1.1'); but it doesn't seem to work.
Lars Englund
@larsenglund
Jun 10 2016 14:51
Putting a stronger pullup might work but would draw alot of current..
Me No Dev
@me-no-dev
Jun 10 2016 14:51
default examples run on port 81 so ws://ip:81
no something else is wrong
you didn't send close image of a failed boot (like the above)
Me No Dev
@me-no-dev
Jun 10 2016 14:54
looks good
Helio Machado
@crushedice2000
Jun 10 2016 14:54
@me-no-dev: Thanks! Now I can connect!
Lars Englund
@larsenglund
Jun 10 2016 14:56
Hmm, changing to 4.7K pullups (from 10K) only raised the voltage to 1.6V (from 1.3V)
Helio Machado
@crushedice2000
Jun 10 2016 15:05
@me-no-dev: Another question: Now I get the connection event on the ESP, however when I send connection.send("Hola"), the receive event doesn't fire up.
I don't mean that it happens only with "Hola" (Hello in Spanish). It happens with any string.
The first two lines of the event:
void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t length) {
  Serial.printf("WS: [%u]: raw: type %d: %s\n", num, type, payload);
Maybe is the web browser the malfunctioning part? Maybe is a Layer-8 error?
Me No Dev
@me-no-dev
Jun 10 2016 15:08
do you call websocket.handle() or equivalent in the loop?
Helio Machado
@crushedice2000
Jun 10 2016 15:09
@me-no-dev: Async. However, the same function works for the connect event.
Me No Dev
@me-no-dev
Jun 10 2016 15:09
no clues then... was working last time I checked
Helio Machado
@crushedice2000
Jun 10 2016 15:10
@me-no-dev: I suspect that the JS side is wrong. I'll try to do some modifications and report back
Me No Dev
@me-no-dev
Jun 10 2016 15:11
there is little that you can mess up in js for sending
Helio Machado
@crushedice2000
Jun 10 2016 15:21
@me-no-dev: readyState is 3 (closed).
sticilface
@sticilface
Jun 10 2016 17:13
a little of topic... but I'm a bit stuck. I need to run a script of some sorts, to jsonify the file names and locations of several files (and files within subfolders), generating an MD5 checksum along the way and save it as a file... what is the best way to go about this (I have very little bash, and only c++ experience), would be great if this could run on travis. I'm wondering about python.. (but never used it).... thought i'd throw it out there.. thanks in advance
Lars Englund
@larsenglund
Jun 10 2016 19:24
@me-no-dev did you think of a way to solve my problem? I can only think of ways that involve redesigning the pcb which I'd rather not.. (like putting two mosfets in that connect RTS and DTR only if the USB voltage is present)
Maybe lifting the RTS and DTR pins and putting a diode in before the pullups could work?
To not allow the ch340g to sink the pullup voltage
Martin Ayotte
@martinayotte
Jun 10 2016 21:24
@larsenglund , it is a strange issue. Comparing your schematic with the one for wemos-d1-mini, the last one has the ch340 powered by the 3V, so powered even if no USB connected. Did you try that to confirm the issue ?
adding MOSFET to cut DTR/RTS is a good idea !