These are chat archives for esp8266/Arduino

14th
Aug 2016
Clemens Kirchgatterer
@everslick
Aug 14 2016 06:41
all
this is high frequency stuff. grounding is important. in such PCBs there is more then ohms law that counts. :)
Mehrdad K
@mkeyno
Aug 14 2016 07:52
@martinayotte do you know by any chance , is there any similar project for A6 GSM chip same as what Ivan did to ESP8266
Stavros Korokithakis
@skorokithakis
Aug 14 2016 08:38
@mkeyno what's that?
@vlem
Clemens Kirchgatterer
@everslick
Aug 14 2016 08:39
@mkeyno i doubt there ever will be a general purpos firmware for that chip
Stavros Korokithakis
@skorokithakis
Aug 14 2016 08:39
@everslick I see, thank you. I'll ground them all
Clemens Kirchgatterer
@everslick
Aug 14 2016 08:39
GSM modems are usually VERY closed
Stavros Korokithakis
@skorokithakis
Aug 14 2016 08:42
I need a 2 amp voltage regulator for the A6. I'll need to use a TO220, right? Are there SMD LDOs at that current?
Clemens Kirchgatterer
@everslick
Aug 14 2016 08:50
2A ?
you gonna cook with that thing? :)
Stavros Korokithakis
@skorokithakis
Aug 14 2016 08:54
That's what the datasheet requires 🙁
I guess it's peaky
Clemens Kirchgatterer
@everslick
Aug 14 2016 08:59
hmm
Stavros Korokithakis
@skorokithakis
Aug 14 2016 09:04
yeah, i have one of those... i only need to switch 5V down to 3V3 though
hmm, maybe i'll just stick one of those on there anyway
Clemens Kirchgatterer
@everslick
Aug 14 2016 09:08
a 'normal' linear converter might get pretty warm, depending on the average power consumption
Stavros Korokithakis
@skorokithakis
Aug 14 2016 09:11
hmm, even if it's just 5V -> 3.3V?
i'm also trying to decide whether to include my own components for the ESP on the PCB or just solder a WeMos on it and call it a day
@everslick i'm using a mosfet so i can switch the A6 off (it's an nmos between the GND pins of the A6 and actual ground). do you know if that will mess anything up? i can use a PMOS on the 5V rail otherwise
although it seems to work fine for the prototype...
Clemens Kirchgatterer
@everslick
Aug 14 2016 10:05
i would not put anything in the connection to GND, if you really wont to shut it down completly i'd try the PMOS to the VCC first. you have seen that you can enter low power mode with GPIO1 ?
Stavros Korokithakis
@skorokithakis
Aug 14 2016 10:55
i have, but i mostly want this for reset, the low-power mode isn't useful to me if i can't use the serial :/
what's the problem with adding a mosfet to gnd?
Stavros Korokithakis
@skorokithakis
Aug 14 2016 11:01
@everslick also, what would you use if you wanted to use a 18650 battery to power this? so a usb charger/battery combo circuit thing
there's this thing, but i'm not sure if you just connect the battery to your circuit directly afterwards: http://www.ebay.com/itm/DC-4-5-5-5V-USB-Input-1A-Lithium-Battery-Charging-Module-PCB-Board-/311061462245?hash=item486cb53ce5:g:q4YAAOSwbsBXjG2m
Germán Martín
@gmag11
Aug 14 2016 11:13
You can always switch A6 off using power pin, I mean, the one you use to turn it on.
Stavros Korokithakis
@skorokithakis
Aug 14 2016 11:15
@gmag11 you can? how? all i see there is "hold high for 2 sec to boot"
Germán Martín
@gmag11
Aug 14 2016 11:20
Doesn't it switch off if you hold it again?
Stavros Korokithakis
@skorokithakis
Aug 14 2016 11:31
@gmag11 it doesn't seem to, i just left it permanently HIGH
maybe i should add a pullup resistor
Germán Martín
@gmag11
Aug 14 2016 11:33
AT+CPOF switches off module. I haven't measured current in that state
Stavros Korokithakis
@skorokithakis
Aug 14 2016 11:34
ah, and then you can switch it on with the enable?
ah yes, it seems to, thanks
but what's wrong with the mosfet? it seems like a cleaner solution
@gmag11 do you know how to enable the headphone output?
Germán Martín
@gmag11
Aug 14 2016 11:38
@skorokithakis nothing wrong. So you can ensure module does not waste battery at all.
Is headphone
Stavros Korokithakis
@skorokithakis
Aug 14 2016 11:39
@gmag11 yes, exactly, plus it's a more sure-fire way to turn it off, but @everslick has some misgivings, i think
@gmag11 i connect common to ground, and earl/earr to left/right but i only hear some buzzing
Germán Martín
@gmag11
Aug 14 2016 11:39
I've not tested headphone. Isn't it enabled by default?
Probably level is not high enough
Stavros Korokithakis
@skorokithakis
Aug 14 2016 11:42
hmm, i don't see any AT commands to set the level for the headphone, just the loudspeaker (which works fine)
Germán Martín
@gmag11
Aug 14 2016 11:44
AT+CLVL
Stavros Korokithakis
@skorokithakis
Aug 14 2016 11:44
that's the loudspeaker (the second output)
let me try anyway though
Germán Martín
@gmag11
Aug 14 2016 11:45
What are the pins you are using? Rec?
I've just seen it in the docs
Ear pins
Stavros Korokithakis
@skorokithakis
Aug 14 2016 11:51
REC+/-, MIC+/- works fine
EARL/EARR do not
AT+CLVL changes the volume in REC, i just tried it
couldn't get EAR to work, unfortunately
i'm essentially making an A6 breakout board + lib, it seems
Germán Martín
@gmag11
Aug 14 2016 11:57
Docs are not detailed enough. Contact AUTomaker
Sh*t
AiThinker
Stavros Korokithakis
@skorokithakis
Aug 14 2016 12:06
i did :/ no email yet
too bad we have to figure everything out with crappy docs
Germán Martín
@gmag11
Aug 14 2016 12:44
@skorokithakis I've found it. AT+SNFS.
Stavros Korokithakis
@skorokithakis
Aug 14 2016 12:44
ah, no wonder, it's in chinese
fantastic, you're a legend
Germán Martín
@gmag11
Aug 14 2016 12:44
Neither me. Use Google
Stavros Korokithakis
@skorokithakis
Aug 14 2016 12:45
oh, really? what did you google? i tried but found nothing
what an idiot i am
Clemens Kirchgatterer
@everslick
Aug 14 2016 13:21
@skorokithakis regarding mosfet in GND: you just weaken the grounding. you put some resistance in there that will pick up noise. it might still work, very likely it will work, but for a real product, it is just not recommended. the designers of the chip did not make 5 or 6 ground pins just for fun! :) you would have to connect them all together and then funnel it through your poor FET.
Stavros Korokithakis
@skorokithakis
Aug 14 2016 13:22
@everslick you have convinced me, I changed to a PMOS instead. Easier to keep track of, too, since there's only one Vbat connection to connect.
Plus it was a hassle to keep separate grounds for components, this way I can make a ground layer and be done with it. Many advantages overall, thank you.
Clemens Kirchgatterer
@everslick
Aug 14 2016 13:30
yeah, ground plane it is!
Stavros Korokithakis
@skorokithakis
Aug 14 2016 13:57
bleh, the audio is very fiddly... i can't get it to work reliably
the output, at least. presumably the microphone is working properly
Martin Ayotte
@martinayotte
Aug 14 2016 18:45
@me-no-dev , @igrr or any compiler experts, SD.remove() and SD.exist() come in infinite recursion. Do you think it is a compiler issue ? http://www.esp8266.com/viewtopic.php?f=32&t=10755&p=52945#p52945
Stavros Korokithakis
@skorokithakis
Aug 14 2016 20:08
if i have a string like '+CLCC: 1,1,4,0,0,"+420XXXXXXXXX",145', what's the best way to parse it? strtok?
Stavros Korokithakis
@skorokithakis
Aug 14 2016 20:19
why do arduino libraries very rarely use C libraries? for example, i don't know of any regex lib
Martin Ayotte
@martinayotte
Aug 14 2016 20:26
Nick Gammon has one, but I've never try it out : https://github.com/nickgammon/Regexp
Stavros Korokithakis
@skorokithakis
Aug 14 2016 20:30
i just ran into that one myself
nick seems to have a lot of good stuff
his MUD client was the best one, back in the day
Martin Ayotte
@martinayotte
Aug 14 2016 20:31
His BigNumber lib is good.
Stavros Korokithakis
@skorokithakis
Aug 14 2016 20:34
ah, i'll keep that in mind
the regex lib also looks good, although i'm wondering whether it's better to just use sscanf for this
however, i still need to split the input into lines, hmm
Stavros Korokithakis
@skorokithakis
Aug 14 2016 21:05
i have a library that is a single C++ class, and i want to define a struct so i can return call info (number, status, etc). what's the best place to define the struct and constants like CALL_IN_PROGRESS?
Stavros Korokithakis
@skorokithakis
Aug 14 2016 21:15
arduino doesn't include sscanf? :(
Stavros Korokithakis
@skorokithakis
Aug 14 2016 21:22
@igrr i saw sscanf made the repo recently, do you know when it's going to be released?
Stavros Korokithakis
@skorokithakis
Aug 14 2016 21:37
hmm, i tried the latest HEAD in feature/libc and it still won't find sscanf
:(
i guess i'll just have to reimplement it by hand
Martin Ayotte
@martinayotte
Aug 14 2016 22:46
That is because ESP is not linking with libc (it is too huge), the core has it own libc_replacement.
Maybe the sepcific sscanf could be added ... an example of source is available from http://mirror.fsf.org/pmon2000/3.x/src/lib/libc/scanf.c
Martin Ayotte
@martinayotte
Aug 14 2016 23:21
I got it compiled but it crash and the ExceptionDecoder doesn't give me good line number
Stavros Korokithakis
@skorokithakis
Aug 14 2016 23:26
yeah, i tried copying one from somewhere, it sort of worked but it didn't work properly when parsing strings, so it didn't work for me :(
too bad, sscanf is pretty powerful
Stavros Korokithakis
@skorokithakis
Aug 14 2016 23:35
@martinayotte this ticket says it was implemented in PR1752, though: esp8266/Arduino#488