These are chat archives for esp8266/Arduino

7th
Dec 2015
onkelfunny
@onkelfunny
Dec 07 2015 07:25
Hello. Has someone a solution to log the Serial output to a file in the spiffs?
Endre Karlson
@ekarlso
Dec 07 2015 08:16
@onkelfunny are you norwegian ?
Endre Karlson
@ekarlso
Dec 07 2015 09:34
@igrr does the ssl stuff support ECDSA ?
Ivan Grokhotkov
@igrr
Dec 07 2015 09:58
No only RSA i think.
and RC4, which should be disabled :)
Markus
@Links2004
Dec 07 2015 10:03
RC4 is enabled oO, yes better remove it.
Endre Karlson
@ekarlso
Dec 07 2015 10:06
@igrr what's the reason for converting to DER format ?
Hassanbenlebsir
@Hassanbenlebsir
Dec 07 2015 10:11
good morning all i'm still working on my rfid and esp8266 and what i'm trying to do is when it's the first time that the person is scanning his card it should creat a client and send a msg to the server and when it's the second time it should not creat a new client but just sending a msg saying that the client saying his has been deconnected
here is my code i don't know what i'm doing wrong
the first msg is been sent but the second not
Markus
@Links2004
Dec 07 2015 10:28
you create the WiFiClient object inside the loop function, this means it only exists during the loop.
at the end of the loop it will be deconstructed (destroyed) so the connection will be closed.
you need to place the WiFiClient client; outside of the loop function
Hassanbenlebsir
@Hassanbenlebsir
Dec 07 2015 10:30
so i'll create a function that create 'wificlient' and call it when i need to to create a 'wificlient' object
Markus
@Links2004
Dec 07 2015 10:31
no
Ivan Grokhotkov
@igrr
Dec 07 2015 10:32
@ekarlso that's the native binary format for axTLS. i think there is also a function to parse PEM, but it's not enabled.
btw goto is not a good idea.
Markus
@Links2004
Dec 07 2015 10:41
i think that dummy = readCard[i]; shut be readCard[i] = 0x00 or it will not do anything useful.
Hassanbenlebsir
@Hassanbenlebsir
Dec 07 2015 10:42
yeah i'll change goto i'll use switch case instead
but i set byte dummy = 0x00;
Markus
@Links2004
Dec 07 2015 10:43
yes and then your order is wrong you load the card value in dummy
i think that is what you need then:
readCard[i] = dummy;
Hassanbenlebsir
@Hassanbenlebsir
Dec 07 2015 10:44
yeah you're right
thanx
Endre Karlson
@ekarlso
Dec 07 2015 11:01
any of you tested http://platformio.org/ ?
Hassanbenlebsir
@Hassanbenlebsir
Dec 07 2015 11:11
@Links2004 when i go to the first case to connect to the server and send the connect message it does that but it doesnt send the message it waits till the connection is closed from the second case it's like the connection must be closed in loop before it can send any messages
Markus
@Links2004
Dec 07 2015 11:13
no the connection not need to be closed. if you have a connection you can send messages as long the connection is open.
Endre Karlson
@ekarlso
Dec 07 2015 11:17
is OTA update faster then traditional over the usb adapter updates ?
Markus
@Links2004
Dec 07 2015 11:17
yes
Endre Karlson
@ekarlso
Dec 07 2015 11:18
but how do you compile the iomage then in the IDE ?
Markus
@Links2004
Dec 07 2015 11:18
press compile?
Hassanbenlebsir
@Hassanbenlebsir
Dec 07 2015 11:18
yes
Endre Karlson
@ekarlso
Dec 07 2015 11:19
does that actually make a image file ? ^
Markus
@Links2004
Dec 07 2015 11:19
yes, OTA is also fully integrated, in the upload button ;)
https://github.com/esp8266/Arduino/blob/master/doc/ota_updates/ota_updates.md
Endre Karlson
@ekarlso
Dec 07 2015 11:20
any example sketch that uses ota with https ?
Hassanbenlebsir
@Hassanbenlebsir
Dec 07 2015 11:20
that's what i was thinking but the first message doesnt get sent until a scan the card the second time then the first and the second message pops up
Markus
@Links2004
Dec 07 2015 11:21
https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266httpUpdate/examples/httpUpdate/httpUpdate.ino
OTA over http/https not working with the upload button but you can use compile to get the binary.
Endre Karlson
@ekarlso
Dec 07 2015 11:22
@Links2004 k
Markus
@Links2004
Dec 07 2015 11:23
@Hassanbenlebsir try to add client.setNoDelay(true); after the connect if.
Endre Karlson
@ekarlso
Dec 07 2015 11:24
how do I get the hostname of my esp ?
Markus
@Links2004
Dec 07 2015 11:25
WiFi.hostname();
Endre Karlson
@ekarlso
Dec 07 2015 11:25
kewl @Links2004
@Links2004 why the redefinition of the Serial ?
Markus
@Links2004
Dec 07 2015 11:31
its easy to switch between Serial and Serial1 this way.
I use always Serial1 for debug out and upload.
Endre Karlson
@ekarlso
Dec 07 2015 11:32
are there two serials on the ESP ? :P
didn't know !
Markus
@Links2004
Dec 07 2015 11:32
Serial1 is TX only but perfect for debugging
Hassanbenlebsir
@Hassanbenlebsir
Dec 07 2015 11:40
@Links2004 it's still waiting for me to scan the card two times to sent the two messages
Hassanbenlebsir
@Hassanbenlebsir
Dec 07 2015 11:45
@Links2004 i'll find a solution you just have to client.println(); after you send the message
i've*
Endre Karlson
@ekarlso
Dec 07 2015 11:54
does each ESP chip have a unique identifier of sorts?
rudi48
@rudi48
Dec 07 2015 12:02
Serial.print("Chip ID: 0x");
Serial.println(ESP.getChipId(), HEX);
beikeland
@beikeland
Dec 07 2015 12:24
as i noted the other day, its only the last three bytes of the mac address, and i have modules with more than 1 oui for the first three bytes. So it may not be unique with just the getChipId()
Endre Karlson
@ekarlso
Dec 07 2015 12:41
so it's only the MAC that's unique on the ESP ?
Chris Elsworth
@celsworth
Dec 07 2015 13:09
they seem to have changed the OUI recently
don't know if they reset the chip id as well, if not then there will be no dupes
the odds of you getting two that collide are pretty small anyway ;)
beikeland
@beikeland
Dec 07 2015 13:13
if the new OUI is Espressif then they're very unlikely to not reset the chipId as they will not be allowed a 3rd OUI before they document they've used a significant portion of their previusly alloted OUIs. What that means in the real world i don't know.
And yes, the likelyhood is miniscule, but using the MAC address should be safe if you can handle 6 bytes instead of 3.
Steve Nelson
@zenmanenergy
Dec 07 2015 14:03
@torntrousers thank you for trying. That’s actually encouraging. I guess it has something to do with my system.
Hassanbenlebsir
@Hassanbenlebsir
Dec 07 2015 14:15
sorry for this question but guys what is the name of the port charger that all android phones
beikeland
@beikeland
Dec 07 2015 14:33
The full technical name would be Female Micro-USB Type B. but commonly just micro usb.
Steve Nelson
@zenmanenergy
Dec 07 2015 14:34
what’s the difference between the DIO and QIO flash mode? I’ve tried both on an esp01 board and don’t see a difference.
Hassanbenlebsir
@Hassanbenlebsir
Dec 07 2015 14:40
@beikeland thanx
Markus
@Links2004
Dec 07 2015 15:26
@zenmanenergy QIO gets 4 bits per Clock and DIO gets 2 bits, so QIO is faster.
Steve Nelson
@zenmanenergy
Dec 07 2015 15:27
Ok. Is there a situation when going slower with DIO is better?
Markus
@Links2004
Dec 07 2015 15:28
only if you try to free the 2 pins, but this is not well tested.
Steve Nelson
@zenmanenergy
Dec 07 2015 15:29
ok, I don’t even know what 2 pins you’re talking about, so I’m clearly not trying to free them! ha. I’ll stick with QIO. thanks Links
Markus
@Links2004
Dec 07 2015 15:30
pin_functions
in theory GPIO9 + 10
Steve Nelson
@zenmanenergy
Dec 07 2015 15:32
alright, well that answers that. I’m certainly not trying to do that.
torntrousers
@torntrousers
Dec 07 2015 15:50
Is there a way to tell if an ESP module has QIO or DIO? Also, it seems to run ok if a sketch is uploaded with either mode so how does that work - I'd have thought it shouldn't work at all if its some hardware thing?
beikeland
@beikeland
Dec 07 2015 15:58
I'd guess its a matter of how many(data) pins are routed to the flash chip. if only 2, you'd see issues with qio, but if 4 both should work.
Markus
@Links2004
Dec 07 2015 16:05
QIO = quad I/O
blob
yes all ESP modules i have ever seen are routed for quad.
you can read out the current mode by ESP.getFlashChipMode();
Endre Karlson
@ekarlso
Dec 07 2015 16:12

void getDeviceId(char* id) {
uint8_t mac[8];
WiFi.macAddress(mac);

char identifier [17] = {};
sprintf(identifier, "esp-ctrl-%s");
strcat(id, identifier);
}

why does that only show the mac ?
beikeland
@beikeland
Dec 07 2015 16:17
while we're on the topic of mac adresses and uniqueness its worth noting that the second-least-significant bit of the most significant byte indicates wheather or not the mac address is universally administered and locally administered.
Endre Karlson
@ekarlso
Dec 07 2015 16:18
@beikeland what to use as a unique id then ?
Markus
@Links2004
Dec 07 2015 16:18
@ekarlso your "sprintf" miss the parameter
sprintf(identifier, "esp-ctrl-%s-%s", id, WiFi.macAddress().c_str());
or shut id be the output?
beikeland
@beikeland
Dec 07 2015 16:22
@ekarlso my point was that if that bit is set high, then you could risk duplicates as its a user assigned value. if its low, then it should be unique from the manufacturer.
@ekarlso although there isn't much stopping a user from spoofing a "unique" adress, but thats a different problem i guess :)
Hassanbenlebsir
@Hassanbenlebsir
Dec 07 2015 16:29
is it safe to cennect the nodemcu esp8266 to 5v?
i know the esp alone is 3.3v but if its on the nodemcuboard is it then safe to connect it to a 5v using the serial output
Aditya Tannu
@AdySan
Dec 07 2015 16:32
@Links2004 How to you connect to Serial1 for debugging? Simply FTDI connected to those pins?
beikeland
@beikeland
Dec 07 2015 16:41
@Hassanbenlebsir no, there are only series resistors between the onboard usb->serial chip and the esp. the pins are directly routed to the esp according to the schematic So the only pin that can take more than 3.3V is the 5V pin.
( https://raw.githubusercontent.com/nodemcu/nodemcu-devkit/master/Documents/NODEMCU_DEVKIT_SCH.png )
Markus
@Links2004
Dec 07 2015 17:13
@AdySan yes FTDI RX connected to GPIO2
d-anders
@d-anders
Dec 07 2015 18:04
@skandragon are you using raw tcp?
d-anders
@d-anders
Dec 07 2015 18:11
if you do i guess you will want to check if wificlient.available()>=5 and only then read 5 bytes from it asuming you always need 5 bytes etc.
btw, is there a good reader for gitter? i find the webinterface hard to read if i have a lot of unread info
Michael Graff
@skandragon
Dec 07 2015 18:38
@d-anders I'm using what I would consider normal level TCP. :)
d-anders
@d-anders
Dec 07 2015 18:39
ok, so no http
and you want to read for example 5 bytes at a time?
to parse as something?
Markus
@Links2004
Dec 07 2015 18:41
@d-anders gitter has a IRC interface too https://irc.gitter.im/
Michael Graff
@skandragon
Dec 07 2015 18:42
I am just going to write a method that basically implements a "read_fully()" style of interface, so I can just use it everywhere I want to read exactly a known quantity. So many internet protocols in binary form are basically a <length> followed by <bytes> of length items, it's always frustrating that so few interfaces have it built in.
d-anders
@d-anders
Dec 07 2015 18:42
i dont get it
read_fully cant be implemented if you dont know how the data is sent?
Michael Graff
@skandragon
Dec 07 2015 18:43
read() reads whatever is available. a read_fully() sort of call ensures that all the bytes desired are read before it returns (except when there is an actual TCP level error like a closed socket)
d-anders
@d-anders
Dec 07 2015 18:44
if you know the protocol (which you may define) then it is easy to implement read_fully
Michael Graff
@skandragon
Dec 07 2015 18:44
read_fully() usually takes the same arguments as read() -- a buffer to write into and a length to read.
d-anders
@d-anders
Dec 07 2015 18:44
you mean read_minimum(num, byte*)?
Markus
@Links2004
Dec 07 2015 18:44
Michael Graff
@skandragon
Dec 07 2015 18:45
It's semantics are identical to read() except that under non-exceptional cases, it always returns exactly what is wanted.
d-anders
@d-anders
Dec 07 2015 18:45
ok, i missunderstood the name
if all you want to do is read atleast n bytes it is easy to do
umm, i mean exactly n bytes or zero if not enough are available
Michael Graff
@skandragon
Dec 07 2015 18:46
I know it's easy do do. I'm arguing that we should not have to constantly write it over and over again.
The damned Arduino libraries should provide it.
Markus
@Links2004
Dec 07 2015 18:47
I can add it there ;)
Michael Graff
@skandragon
Dec 07 2015 18:47
I was about to ask, if I add it to ESPWiFi, would it be pulled up? :)
Chris Elsworth
@celsworth
Dec 07 2015 18:47
meh. we're starting down a road of forking Arduino here.
at what point does this project stop being a port of Arduino when you start adding things that can't be found in core Arduino
Michael Graff
@skandragon
Dec 07 2015 18:48
No, we're not. We're adding it to one library, not to the core, but I do think Stream is the place it should be added, so...
I'm also likely to submit it to Arduino core.
Markus
@Links2004
Dec 07 2015 18:48
@celsworth we already have ;) we have many functions that the avr Arduino not supports
Michael Graff
@skandragon
Dec 07 2015 18:48
I just don't know how they'd take it.
Chris Elsworth
@celsworth
Dec 07 2015 18:48
:thumbsup:
Michael Graff
@skandragon
Dec 07 2015 18:49
I'm a veteran of a million socket-using programs. Whoever wrote the Arduino code is ... well, let's just say it's limited in usefulness.
Chris Elsworth
@celsworth
Dec 07 2015 18:50
yeah. I've been tempted more than once to just start using the native esp sdk because of Arduino's socket code :(
but losing all the thousands of libraries that people ahve written to talk to SPI devices etc is a bit too much to bear ;)
Markus
@Links2004
Dec 07 2015 18:51
full ack on this, the first Arduino socket stuff where for the w5100 and there the network stack where in the chip.
the API where designed for usage with this one chip, and leeks some usefull features.
Chris Elsworth
@celsworth
Dec 07 2015 18:51
I think the project should keep a full compatibility layer with real Arduino but maybe there could be a ESPWiFiForPeopleWhoKnowWhatTheyAreDoing? ;)
Michael Graff
@skandragon
Dec 07 2015 18:51
I have about a dozen W5100s here in my parts storage. heh.
@celsworth there's a big difference in replacing the socket code with something better and totally walking away from the other Arduino libraries.
Chris Elsworth
@celsworth
Dec 07 2015 18:52
sure, thats why I'm suggesting the former :)
Michael Graff
@skandragon
Dec 07 2015 18:53
Plus, so long as it supports Stream as its heart, it may still be close enough to work for most Arduino libraries.
d-anders
@d-anders
Dec 07 2015 18:53
yeah i remember there was some slight problems when i used enc28j60 instead of w5100 a few years back
Michael Graff
@skandragon
Dec 07 2015 18:53
I support Arduino's goals -- make it stupid easy to write simple code for these things. But I disagree that they should hide things like return values. Those are important.
Markus
@Links2004
Dec 07 2015 18:53
the goal of the project is to have a full compatiple API to the "AVR" arduino stuff,
but we not let us limit by this, if we need a new function to provide better usage then we will add it.
Michael Graff
@skandragon
Dec 07 2015 18:54
I'm still not fully convinced the ESP low-level TCP code isn't flawed...
Markus
@Links2004
Dec 07 2015 18:54
by using a enc28j60 the stack will run on the AVR so more control there.
by low-level you mean lwip port from espressif?
Michael Graff
@skandragon
Dec 07 2015 18:55
yea
d-anders
@d-anders
Dec 07 2015 18:56
any codebase trying to implement (full) tcp/ip is likely to have some flaws. remeber trumpet winsock? :)
Chris Elsworth
@celsworth
Dec 07 2015 18:56
ooh pinout of esp32 posted
Michael Graff
@skandragon
Dec 07 2015 18:56
Barely, but I've written TCP stacks before, so I know just about all the edge cases.
Markus
@Links2004
Dec 07 2015 18:57
there where some work going on the remove all the espressif stuff and only keeping the needed stuff but it seams there is longer nothing happend.
Chris Elsworth
@celsworth
Dec 07 2015 18:57
so much adc :D
Michael Graff
@skandragon
Dec 07 2015 18:57
@d-anders, you remember the Richard Stevens book "Unix Network Programming"?
Chris Elsworth
@celsworth
Dec 07 2015 19:00
I have his other one, "Advanced Programming in the UNIX Environment" :)
Michael Graff
@skandragon
Dec 07 2015 19:00
I found a major flaw in his description of an edge case in TCP, where the state diagram was wrong. I committed a fix to NetBSD, which FreeBSD and eventually OpenBSD took up as well. Whee :) I love low level stuff, but today I prefer to hang around in Ruby, where I'm about as far from a low level interface as I can get.
d-anders
@d-anders
Dec 07 2015 19:00
havent read it. i dont have a lot of experience either with tcp/ip or the socket layer. when you asked in the chat i missunderstood your question and thought you were asking how to do what you wanted
Chris Elsworth
@celsworth
Dec 07 2015 19:00
@skandragon snap, <3 ruby :D
Michael Graff
@skandragon
Dec 07 2015 19:03
Today's project is to get my holiday light display going. So far, I have a Ruby script feeding data to the ESP, and I'm actually running dangerously there... I have the lights updating in a timing-sensitive way without disabling interrupts. So far, it's working...
Chris Elsworth
@celsworth
Dec 07 2015 19:03
until an interrupt comes along? :)
Michael Graff
@skandragon
Dec 07 2015 19:04
I actually have a logic analyzer checking the bit patterns and thus far, not a single glitch in almost 18 hours of continuous running.
Chris Elsworth
@celsworth
Dec 07 2015 19:04
how sensitive is sensitive? I wonder how long an interrupt can take, worst case.. I've not needed to disable them yet
but I don't do much that needs anything faster than a few ms resolution so far ;)
Michael Graff
@skandragon
Dec 07 2015 19:04
10us ticks basically.
a 0 bit is a 30us block of low, high, high (10us each). A 1 is low, low, high. However, I think the lights are more forgiving than people give them credit for, and so long as the time is ABOUT 30us, and the low -> high transition occurs on the right side of the half way mark, they are fine.
More importantly, there are no visual artifacts like a light that didn't change, or one that changed incorrectly.
d-anders
@d-anders
Dec 07 2015 19:08
is it one of those strips where all leds are controlled independently?
Michael Graff
@skandragon
Dec 07 2015 19:08
yes
GE35 lights, from GE. They are different than the other strips of lights where you clock out all the data to each light and then send a latch command.
d-anders
@d-anders
Dec 07 2015 19:09
i have been thinking of buying one of those. rgb with 256 leves each?
Michael Graff
@skandragon
Dec 07 2015 19:09
These only have 12 bits of color, so 4 bits each color.
d-anders
@d-anders
Dec 07 2015 19:09
ok
Michael Graff
@skandragon
Dec 07 2015 19:09
Sort of.
It's really odd how they do it. There's 4 bits for each color of RGB, but then there's 8 bits of intensity overall. Although the intensity ranges from 0 (entirely off) to 0xCC for some reason.
d-anders
@d-anders
Dec 07 2015 19:10
how often can (or must?) you send new data to it?
Michael Graff
@skandragon
Dec 07 2015 19:10
Right now, I have 306 bulbs, each update takes 820uS per bulb including quiet time.
d-anders
@d-anders
Dec 07 2015 19:11
ok. and they stay at the same value if you dont update?
Michael Graff
@skandragon
Dec 07 2015 19:11
The bulb remains in its state unless changed, so for things like "just be orange" I don't need to update them more than once, but I may still do it a few times in case of glitches with timing, if I run into them.
d-anders
@d-anders
Dec 07 2015 19:11
or do you need to constanly resend?
Michael Graff
@skandragon
Dec 07 2015 19:12
I have 6 independent strands, each one is on a different output pin. Right now the code I have only clocks out to one strand at a time, so we're talking 250 ms or 4 updates/sec max.
I'm about to dig into the next phase, where I queue up all updates I want, and clock them out to the strands in parallel, so my update speed then becomes equal to the longest strand length, or 36 bulbs.
d-anders
@d-anders
Dec 07 2015 19:13
ok, i guess you usually have no need for higher freq unless you want to some really funky animated patterns
Michael Graff
@skandragon
Dec 07 2015 19:13
That means 29.520 ms updates, or over 30 updates/sec
I'm going to look into the direct port register access that has a "set these bits" and "clear these bits" interface.
I can pre-compute the bit pattern, and just store the two register values for what I want to set or clear, or just store one value and compute them both from that (with a mask)
Chris Elsworth
@celsworth
Dec 07 2015 19:20
yeah that is quite a lot faster aiui
d-anders
@d-anders
Dec 07 2015 19:42
read a bit about those strips, are you using one with the ws2812b controller? @skandragon
Michael Graff
@skandragon
Dec 07 2015 19:44
No, the GE35 bulbs are entirely different.
d-anders
@d-anders
Dec 07 2015 19:44
ok
i think i will get one of those with the ws2812b controller
Michael Graff
@skandragon
Dec 07 2015 19:56
Those are also hard to drive from an ESP.
I think you want ones that are driven by an WS2801
d-anders
@d-anders
Dec 07 2015 19:57
yeah, so it seems. i find a jungle of sort-of-working implementations
Michael Graff
@skandragon
Dec 07 2015 19:57
WS2801 is SPI, which means timing is entirely not an issue.
d-anders
@d-anders
Dec 07 2015 20:02
yeah, sounds good
looks like those cost a bit more (no surprise)
Michael Graff
@skandragon
Dec 07 2015 20:03
They do, for several reasons. One, they are external to the LEDs themselves, whereas the ws2812b can be included in the LED component directly and still maintain a low pin count.
I have 15 WS2812-based strips here I got for $1.00 each from a closing Radio Shack... I have yet to connect them up.
If/when I do, I'll drive them from an Arduino.
Markus
@Links2004
Dec 07 2015 20:05
WS2812 can be driven by I2S by DMA over the ESP ;)
Michael Graff
@skandragon
Dec 07 2015 20:06
nice.
I wonder if I can do that with these GE bulbs.
The timing is very similar.
Markus
@Links2004
Dec 07 2015 20:07
one moment have the link stored some where, have 10m WS8212 here but not build the project yet.
d-anders
@d-anders
Dec 07 2015 20:07
sounds cool links
Michael Graff
@skandragon
Dec 07 2015 20:08
The GE bulb's timing is 10uS long at its heart, where the WS8212 appears to be 2.5 uS for an entire bit... So that's a lot faster to drive and a lot more sensitive to timing I suspect.
d-anders
@d-anders
Dec 07 2015 20:11
sounds good. maybe ill have to do some tacky lighting
Michael Graff
@skandragon
Dec 07 2015 20:12
The bit patterns trick is exactly what I was going to do to drive parallel strings of lights here :)
It basically encodes 4 bits of transmission into 16 bits of output data.
brutzler
@brutzler
Dec 07 2015 20:14
nodemcu.jpg
anybody has experience with a ili9341 display? I have one with 2.2"
what lib is working? Have seen one from sermus and one from sandeepmistry
SPI uses MOSI/MISO/CS...
When I look at the pinout of a NodeMCU-module, there are two kinds of theese pins. 4 on the right side, and 4 on the left side. Can I use both?
Michael Graff
@skandragon
Dec 07 2015 20:14

In the case of GE lights, without using DMA (which I may change to if I can!) I know this pattern is what I will follow:

(1) Set all bits low
(2) Set all bits either high or low depending on if I'm sending a 0 or a 1
(3) Set all bits high

Where is the documentation on how the DMA engine works? Can I have multiple DMA engines running on either a 8-bit wide data path or 8 different pins with different data?
brutzler
@brutzler
Dec 07 2015 20:16
ahh ... your own repo?
different to the two I talked about?
Markus
@Links2004
Dec 07 2015 20:17
yes using it vor VNC ;) has many speed optimizations
brutzler
@brutzler
Dec 07 2015 20:17
VNC? what exactly?
Markus
@Links2004
Dec 07 2015 20:18
its running a VNC client for the doorbell, it shows the image of a R-PI cam
Rocco Musolino
@roccomuso
Dec 07 2015 20:19
Hello everyone!
brutzler
@brutzler
Dec 07 2015 20:19
ah, big brother is watching....
Markus
@Links2004
Dec 07 2015 20:19
Michael Graff
@skandragon
Dec 07 2015 20:20
@Links2004 thanks. I'm guessing for the WS8212, only the data line is connected, and the DMA engine clock line is ignored then, and the data transmit speed is set such that the entire bit is transmitted in that 2.5 uS window.
brutzler
@brutzler
Dec 07 2015 20:20
@Links2004 is there somewhere defined how to connect? using HCS & H... or CS & ...
d-anders
@d-anders
Dec 07 2015 20:21
haah, vnc on esp8266, nice
Markus
@Links2004
Dec 07 2015 20:22
i have stated to make a library out of it but work is far from done,
I need to sort out the license stuff too.
Rocco Musolino
@roccomuso
Dec 07 2015 20:23
Hi guys, just one question, someone can point me out a snippet of code that create an access point on the esp8266 with arduino firmware, and then i can connect to the AP from a smartphone put on a 'form' some kind of credentials to make the esp8266 connects to a wifi... My idea is to have a configurable esp8266 without hardcoding the wifi credentials on the sketch.
brutzler
@brutzler
Dec 07 2015 20:32

@Links2004 Still the question how to connect the display. In one of the example I found this:

#define TFT_CS 10
#define TFT_DC 9
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC)

How to connect miso/mosi/clk? And wondering, why for CS there is not used GPIO15

Markus
@Links2004
Dec 07 2015 20:34
DC and CS can be used how you like.
miso/mosi/clk are from the Hardware SPI so fix.
esp
brutzler
@brutzler
Dec 07 2015 20:37
OK, do you know what use of the "other" SPI on a NodeMCU? The pins on the left side?
SDI/CMD/SDO/CLK. They are called miso/mosi/clk/cs too
Markus
@Links2004
Dec 07 2015 20:38
they connected to the SPI flash, so not easy usable.
i not recommend to try using them.
i use D12 D13 D14 D4 D5 to connect the display.
and have wired reset of the display to the reset of the ESP to reset it too if I programm.
some time the display get a "freeze" if you reset the ESP in the mid of some command, by the connection this can easy be avoided.
brutzler
@brutzler
Dec 07 2015 20:44
As you see, on a NodeMCU/ESP-12E there is a HCS at GPIO15 (D8). Is this the better choice for CS?
Markus
@Links2004
Dec 07 2015 20:45
i mean D in a ESP12 term ;) so for nodeMCU it will be D1 + D2
d-anders
@d-anders
Dec 07 2015 20:46
@Links2004 do you mean you have a cam connected to the esp8266 and also running vnc so you can connect to it from for example a computer and view the video?
brutzler
@brutzler
Dec 07 2015 20:47
@Links2004 I understood this. But if you look at the NodeMCU-Pinout (few posts above) It looks like there is a hardware-CS at GPIO15. Its painted in the same green color as the other hardware SPI-pins
Markus
@Links2004
Dec 07 2015 20:47
@d-anders no the cam is connected to a raspberry pi where the VNC server runs too.
d-anders
@d-anders
Dec 07 2015 20:48
ah
so you did mean a vnc client on the esp8266
and a display to show it
Markus
@Links2004
Dec 07 2015 20:48
@brutzler the HW chip select is not used, you can use the pin if you like.
yes the ESP8266 runs a VNC client that display it with a ili9341
brutzler
@brutzler
Dec 07 2015 20:54
slowly loosing spare GPIOs.
5 for SPI-display; 2 for I2C.... and some I should not use GPI00/GPIO16.
are GPIO9/10 free for use?
d-anders
@d-anders
Dec 07 2015 20:59
i wonder if a vncserver is feasible on esp8266
Markus
@Links2004
Dec 07 2015 21:03
@brutzler when you set the the flash in DIO mode yes, but it is not well tested.
@d-anders it runs with 15-20 fps based on the wifi quality
(for the client) by the server based on what you want to do, but possible yes.
d-anders
@d-anders
Dec 07 2015 21:13
not sure how useful it would be to have a vnc server :)
Markus
@Links2004
Dec 07 2015 21:15
yes a client make more sense ;)
d-anders
@d-anders
Dec 07 2015 21:15
right now i send data over your websockets to a webgui instead
very lightweight on the esp
a vncserver would be kind of a general solution. quick and cool for lots of stuff but probably never perfect
Markus
@Links2004
Dec 07 2015 21:17
web sounds more general then vnc to me.
Rocco Musolino
@roccomuso
Dec 07 2015 21:18
Hi guys, just one question, someone can point me out a snippet of code that create an access point on the esp8266 with arduino firmware, and then i can connect to the AP from a smartphone put on a 'form' some kind of credentials to make the esp8266 connects to a wifi... My idea is to have a configurable esp8266 without hardcoding the wifi credentials on the sketch.
Endre Karlson
@ekarlso
Dec 07 2015 21:21
any of you got a clue on why
void getDeviceId(char* id) {
char identifier [17] = {};
sprintf(identifier, "esp-ctrl-%s", WiFi.macAddress().c_str());
strcat(id, identifier);
}
blows up ?
I use it like char id[17] = {}; getDeviceId(id);
Markus
@Links2004
Dec 07 2015 21:24
@roccomuso may this helps you: https://github.com/tzapu/WiFiManager
may this implementation is better for you usage:
void getDeviceId(char* id) {
 if(id) {
  sprintf(id, "esp-ctrl-%s", WiFi.macAddress().c_str());
 }
}
brutzler
@brutzler
Dec 07 2015 21:26
@Links2004 found a LED-pin on my display. Do you use it? is this backlight?
Markus
@Links2004
Dec 07 2015 21:26
@brutzler connect it to 3V3, if you want to switch it you need a transistor better a MOSFET.
Rocco Musolino
@roccomuso
Dec 07 2015 21:27
@Links2004 seems exactly what i was looking for, many thanks! Did you ever try it? Does It works reliably?
Markus
@Links2004
Dec 07 2015 21:27
never tried it, only have read about it.
d-anders
@d-anders
Dec 07 2015 21:41
ok, now i want a ov2640 mounted on a servo
Markus
@Links2004
Dec 07 2015 21:53
what interface the ov2640 have?
Endre Karlson
@ekarlso
Dec 07 2015 21:57
is ov2640 hd ?
Endre Karlson
@ekarlso
Dec 07 2015 22:31
@igrr or anyone else, so with the ssl stuff how does one copy the DER format cert so something pasteable ?
brutzler
@brutzler
Dec 07 2015 22:56
@Links2004 cannot compile the lib of your repository. Missing Adafruit_GFX.h!
Even if I download this file and copy it into the lib-folder there r a lot of undifined references :-(
Tried to flash the graphictest.ino example
Endre Karlson
@ekarlso
Dec 07 2015 23:04
hmmms
brutzler
@brutzler
Dec 07 2015 23:25
Isn't the ili9341 not supported any more? because in my staging there is no library for it.
Endre Karlson
@ekarlso
Dec 07 2015 23:29
so there is support now for https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/WiFiClientSecure.cpp#L354-L364 but how does one get the cert into a array of uint8_t ?
sticilface
@sticilface
Dec 07 2015 23:36
Got a question for the networking gurus... i'm running some ws2812s, with a web server and when i make a web request they stop animating for ~2-3 seconds. Only, it seemed like the web request and response were handled much much quicker than this. I've done a TCP dump and this looks like it is the case.. request to response ACK,RST is 68ms.. is this experienced by others too?
I'm thinking something is stopping the loop. I do not know enough about networking to know if what i've posted is all in order? the LEDs are just a proxy for loop execution...
Angus Gratton
@projectgus
Dec 07 2015 23:42
ekarlso: what OS are you on? you can feed the cert file into 'xxd -i' to get C header file syntax, if you're on a platform that has xxd
otherwise, you can put the cert into SPIFFS and use the File interface I think
Endre Karlson
@ekarlso
Dec 07 2015 23:51
@projectgus ubuntu
@projectgus how does a hexdump help in this case ?
sticilface
@sticilface
Dec 07 2015 23:56
ok, sorry about that guys... found the bug!
and it was my code... as usual