These are chat archives for esp8266/Arduino

29th
Mar 2016
Victor Tseng
@Palatis
Mar 29 2016 00:43
@Makuna this specific behavior makes the Task library difficult to co-work with other libraries.
@Makuna avoid delay() is a good practice, but enforcing it is not a good idea IMHO.
@Makuna I'll look into this and see if there's a way to make the library more flexible after I finish the current project.
Michael Miller
@Makuna
Mar 29 2016 01:10
@Palatis lets discuss this on the Makua/Task gitter channel, I think I am now understanding what you are trying to do and I may have a pretty simple way to do it that works within the Task philosophy.
Victor Tseng
@Palatis
Mar 29 2016 06:06
ahh the java code in esptouch android just...
"what a mess" is the only opinion
cleaned up a bit, will publish to jcenter later.
and the licence kinda suck
Victor Tseng
@Palatis
Mar 29 2016 08:28
can't publish to jcenter due to license issue = =
wtf
Victor Tseng
@Palatis
Mar 29 2016 13:45
so, for those of you who're interested in SmartConfig...
tzapu
@tzapu
Mar 29 2016 14:00
i found it totally unreliable on ios :(
Victor Tseng
@Palatis
Mar 29 2016 14:02
i dunno, I found many "bad practice java codes" inside the library.
haven't really got time to fix them, just a rough clean-up.
tzapu
@tzapu
Mar 29 2016 14:07
yeah, i didn t look into the code much, but how it worked. and it didn t work with anything approaching regularity for me anyway
seemed very much dependant on router (and moon phase :( )
Victor Tseng
@Palatis
Mar 29 2016 14:07
looks like they fixed the router issue in recent commits
sending packet too fast made the router treat the phone as an attacker.
tzapu
@tzapu
Mar 29 2016 14:08
ah ha, ok, thanks for the info, i ll have to take a look at some point again
meh, ios not updated in 5 months
Victor Tseng
@Palatis
Mar 29 2016 14:09
on android, tho, didn't even take a look at ios versions
since i don't have an iDevice
tzapu
@tzapu
Mar 29 2016 14:09
yeah, seems android might be moving better along
latest ios is
Esptouch v0.3.4.3 only support Espressif's Smart Config v2.4
Victor Tseng
@Palatis
Mar 29 2016 14:10
they're having bad practice on making commits
like group a huge change and just do git commit -m "update" -a
tzapu
@tzapu
Mar 29 2016 14:11
:)
seems so
looking at android, it doesn t seem newer
but i m rather sure i tested in the last 5 months or so, and didn t work
meh
yeah, only one comit since i tested
maybe that helps
will have to retest
Victor Tseng
@Palatis
Mar 29 2016 14:14
i dunno, got lots of interesting stuff to do
tried to forge a user_ie and make esp8266 p2p compatible
tzapu
@tzapu
Mar 29 2016 14:15
that sounds…advanced
i thought it aleardy had some stuff in the sdk for peer to peer connectivity
Victor Tseng
@Palatis
Mar 29 2016 14:15
but i guess i need some time to catch-up with the spec...
tzapu
@tzapu
Mar 29 2016 14:15
maybe you can use that
Victor Tseng
@Palatis
Mar 29 2016 14:16
yeah they have register_manufactore_ie_recv_func or something like that
and can register user_ie buffer for beacon and probe req/resp.
just dunno how do i mess around with it
tzapu
@tzapu
Mar 29 2016 14:17
esp now it s called
whatever i saw for peer to peer
Victor Tseng
@Palatis
Mar 29 2016 14:18
i tried to find info about the packet format, but didn't really have a clear idea.
tzapu
@tzapu
Mar 29 2016 14:18
but you probably are wanting something different
Victor Tseng
@Palatis
Mar 29 2016 14:19
i want something like chromecast
tzapu
@tzapu
Mar 29 2016 14:20
but for chromecast you still need to connect to the AP, don t you?
Victor Tseng
@Palatis
Mar 29 2016 14:21
yeah, cuz it wants internet to stream the content.
it's basically for the first time setup.
tzapu
@tzapu
Mar 29 2016 14:21
it creates a hotspot, etc
Victor Tseng
@Palatis
Mar 29 2016 14:22
it creates a wifi-p2p hotspot, has p2p IE in the beacon frame.
and start wps when it receives group assoc request
tzapu
@tzapu
Mar 29 2016 14:24
probably works different on ios as well..
all my interactions with it, requiered me to connect to it s created hotspot
including guest mode
Victor Tseng
@Palatis
Mar 29 2016 14:26
i basically work on android, but according to my colleague who works on ios, he told me that ios doesn't support wifi p2p (at the time we talked, around 1 yr ago).
or at least because he just doesn't know how, anyway...
tzapu
@tzapu
Mar 29 2016 14:27
ah, that would be why then :D
Victor Tseng
@Palatis
Mar 29 2016 14:28
but since jobs is dead, we get all kinds of strange iDevice these days.
i dunno if it supports wifi-p2p now.
tzapu
@tzapu
Mar 29 2016 14:33
if wifi p2p is the same as wifi direct which seems the base for miracast
i guess no, not gonna happen
Ivan Grokhotkov
@igrr
Mar 29 2016 14:50
@andig i have added LwIP binary built with gcc in #1832
to use it instead of Espressif-provided one, you need to replace -llwip with -llwip_gcc in platform.txt, and restart the IDE.
tzapu
@tzapu
Mar 29 2016 15:40
anybody got a simple skematich on how i could use an en channel AO3402, as a switch to turn something on, only when i give a high on a pin ?
whenever i connect it as i think i should, the esp seems to misbehave, i guess current draw too much or something...
Martin Ayotte
@martinayotte
Mar 29 2016 15:45
AO3402 is a simple N-channel MOSFET, so, source must be at GND, drain to the load, gate should have something like 10K pulldown, and when ESP GPIO will goes HIGH, the MOSFET will saturate.
tzapu
@tzapu
Mar 29 2016 15:46
ah ha! so 10k pull down
lemme try
Martin Ayotte
@martinayotte
Mar 29 2016 15:47
Yes ! this is in case the GPIO becomes floating, the gate should not be left floating, otherwise ESR can turn it on ...
d-anders
@d-anders
Mar 29 2016 15:49
and as usual... avoid the "special" pins unless you absolutely need to use them
tzapu
@tzapu
Mar 29 2016 15:50
well, got every single pin used
can t even remember what pin this is
but it worked through a transistor
wanted to try a mosfet :P
Martin Ayotte
@martinayotte
Mar 29 2016 15:52
Special pins such GPIO2/GPIO0 can still be used, but since there default state are pulled-up to HIGH, you then need 2 MOSFET to have then inverted state, meaning HIGH become OFF.
d-anders
@d-anders
Mar 29 2016 15:53
ok. the ones that may cause problems (potentially) are gpio0,2 and 15 if i remember correct
Martin Ayotte
@martinayotte
Mar 29 2016 15:54
GPIO15 is Ok with single MOSFET, since it default state is pulled-down to GND with the same pull-down of the MOSFET
tzapu
@tzapu
Mar 29 2016 16:06
funny enough
this is on gpio 15
Martin Ayotte
@martinayotte
Mar 29 2016 16:09
Lucky guy !
d-anders
@d-anders
Mar 29 2016 16:17
working?
tzapu
@tzapu
Mar 29 2016 16:18
well
yes
seems so
found a 4.7k handy and tried with that
first time i tried
has a massive voltage drop across everything
it went to 2.8v
after a reset, a few attempts, and did not see that voltage drop, and i could configure wifi, take a snapshot, etc
maybe i just touched the wrong thing as it s all a ball of wires on a breadboard
Martin Ayotte
@martinayotte
Mar 29 2016 16:20
the pulldown should not cause any drop. What kind of load do you have on the MOSFET ?
tzapu
@tzapu
Mar 29 2016 16:20
nothing that should trip it
an arducam
and a sd card
but it worked fine after i disconnected/connected the mosfet and restarted,
maybe i touched something wrong
2016-03-29 19.20.17.jpg
easy to do :P
Martin Ayotte
@martinayotte
Mar 29 2016 16:22
what do you means ? you wish to power off arducam with that MOSFET ? then, whole circuit need to be revised. It is not an N-Channel that you need but a P-Channel with completly different wiring.
tzapu
@tzapu
Mar 29 2016 16:22
oh?
yes, i wish to power down the arducam and the sd reader
used a transistor on ground for both sd and arducam
seemed fine
now replaced with the mosfet , also on ground
Martin Ayotte
@martinayotte
Mar 29 2016 16:23
Yes ! the previous wiring is to drive GND to something like Relay. In case of SD or CAM, you wish to control VCC not GND
tzapu
@tzapu
Mar 29 2016 16:23
oh, ok
that s good then
Martin Ayotte
@martinayotte
Mar 29 2016 16:24
P-Channel is then mandatory, with pullup instead of pulldown, GPIO with LOW making it turn ON
tzapu
@tzapu
Mar 29 2016 16:24
oh man, need to shift some stuff around then, to clear a pin for this
can 2 nchannels make a p channel ? :P
didn t buy any p channels
Martin Ayotte
@martinayotte
Mar 29 2016 16:24
Nope !
AO3401
Like brother/sister. one can drive the other if you wish to re-invert GPIO inversion, meaning N-Chan driving the gate of P-Chan
tzapu
@tzapu
Mar 29 2016 16:27
oh boy
time to order then some
and i guess in the mean time
Martin Ayotte
@martinayotte
Mar 29 2016 16:27
In the mean time, do you have small relay ? if yes, keep previous circuit, drive the relay, and relay contact can turn off VCC on SD/CAM
tzapu
@tzapu
Mar 29 2016 16:27
i can try to set it up using a pnp transistor?
only bigger relays around, they are ttl though
Martin Ayotte
@martinayotte
Mar 29 2016 16:28
Yes, if it is saturate enough to not cause to much drop on the SD/CAM VCC
tzapu
@tzapu
Mar 29 2016 16:28
seemed fine when i used npn on ground
Martin Ayotte
@martinayotte
Mar 29 2016 16:29
Keep N-Chan MOSFET to control the base of PNP.
tzapu
@tzapu
Mar 29 2016 16:29
what is the general reason for having to switch vcc on cam/sd?
Martin Ayotte
@martinayotte
Mar 29 2016 16:29
Yes, but for SD/CAM, if you cut the GND, it is not really good way to power them off
tzapu
@tzapu
Mar 29 2016 16:30
so just best practice then
because they are more sensible electronics
Martin Ayotte
@martinayotte
Mar 29 2016 16:31
Still, the data wires are there with the SD not grounded, that can lead to corruption. For CAM it is less of problem, but still not best practice...
tzapu
@tzapu
Mar 29 2016 16:32
ah ha, well that s a good reason then
ordered p channel
thank you for intel, much appreciated
to recap i need to move it on a gpio that needs pull up on boot, have a pull up on it, and switch vcc
by driving pin low
and until mosfet is here i can use a pnp if drop is not too much, which it shouldn t
Martin Ayotte
@martinayotte
Mar 29 2016 16:38
Yes, but the PNP circuit itself will consume current, because of it base pullup need to be shorted to GND by a N-Chan MOSFET to turn PNP off, this means few mA thru this pullup
For temporarly usage, that can still be done.
tzapu
@tzapu
Mar 29 2016 16:39
yeah, temporary, till i receive these
still wanna tinker until the slow boat arrives
:P
Martin Ayotte
@martinayotte
Mar 29 2016 16:40
always good to have both N-Chan and P-Chan ;-)
tzapu
@tzapu
Mar 29 2016 16:40
yeah, someone said last time they are not bothering with p chan
stavros even
so… knowing not that much, i though if others aren t bothering with them, what are the chances i ll need to
:))
there you go, quite high it seems
only i ll have 200 n chan, and 20 p chan
will order more soon :))
if i get used to it
i mentioned arducam again and mozgy didn t react… it s weird
oh well :P
i have to go, g night or g day everyone
and thank you very much @martinayotte @d-anders