These are chat archives for esp8266/Arduino

30th
Nov 2016
Shelby Merrick
@forkineye
Nov 30 2016 12:39
is there a reference somewhere that describes the built-in debugging output?
for instance
pm open,type:2 0
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
pm close 7
f r0, scandone
i can gather some of it course
Me No Dev
@me-no-dev
Nov 30 2016 12:59
nope :) all those are closed libs
but you can get what it means if you know enough about wifi and stuff :P
Shelby Merrick
@forkineye
Nov 30 2016 13:01
some are obvious, you all figured out the state line?
Me No Dev
@me-no-dev
Nov 30 2016 13:01
looks like disconnect to me :D
Shelby Merrick
@forkineye
Nov 30 2016 13:02
well, yeah. lol. trying to figure out why though, lol
Me No Dev
@me-no-dev
Nov 30 2016 13:02
2 lines above
beacon timeout
not enough yield or too busy interface
Shelby Merrick
@forkineye
Nov 30 2016 13:02
afterwards, it would attempt to re-connect numerous times and never succeed. i'd reset it and it'd reconnect
Me No Dev
@me-no-dev
Nov 30 2016 13:03
yeah, I have seen that too
I would think it's a bug and something is not cleared on beacon timeout
Shelby Merrick
@forkineye
Nov 30 2016 13:04
like a bug internal to the SDK? aka, something i can do nothing about?
Me No Dev
@me-no-dev
Nov 30 2016 13:04
yes
for me to do something, I need to go to China :D but @igrr could maybe have a look, or tell someone to do it
Shelby Merrick
@forkineye
Nov 30 2016 13:07
guess i could setup a watchdog in the mainloop to check association and software reset?
Rohit Yermalkar
@romuye123
Nov 30 2016 13:16
@romuye123
hi
http://pastebin.com/embed_js/2HNhfLr8
i am using this very simple program to generate CLOCK on 2Mhz
but when i check on oscilloscope it shows a straight line
what should be the mistake i am doing ?
Me No Dev
@me-no-dev
Nov 30 2016 13:21
wow :D many things are wrong
GPIO 11 is one
then you start transaction but send nothing so how do you expect any clock to come out?
no pinMode is needed for SPI
Shelby Merrick
@forkineye
Nov 30 2016 13:22
@me-no-dev is there anyway to get lower level stats, like link layer retries?
Me No Dev
@me-no-dev
Nov 30 2016 13:23
not that I know of
LwIP is as low as you can go
Rohit Yermalkar
@romuye123
Nov 30 2016 13:28
@me-no-dev GPIO 11 is one, i did not get you
Me No Dev
@me-no-dev
Nov 30 2016 13:28
SPI runs on pins 12-15
11 is used by the Flash chip
Rohit Yermalkar
@romuye123
Nov 30 2016 13:29
yes i changed those pins
used 12,13,14,15
Me No Dev
@me-no-dev
Nov 30 2016 13:29
remove them... you do not need to set the pins at all (except the slave select pin)
SPI.begin() does it for you
Rohit Yermalkar
@romuye123
Nov 30 2016 13:29
let me show you my final program
Me No Dev
@me-no-dev
Nov 30 2016 13:30
do you SPI.transfer() in your loop?
Rohit Yermalkar
@romuye123
Nov 30 2016 13:31
yes i do
i have connected ADE7753
Me No Dev
@me-no-dev
Nov 30 2016 13:31
was not shown in the code you posted
Rohit Yermalkar
@romuye123
Nov 30 2016 13:31
was going step by step
Shelby Merrick
@forkineye
Nov 30 2016 13:38
@me-no-dev one more thing. I'm experiencing some severe packet lag times, like it's buffering up in the AP due to retries. I have 16 modules on my AP and randomly will have two or three that do this. Rebooting the AP or module usually fixes it, but it sometimes comes back or happens on another module. I'm thinking it could have something to do with either RF calibration or too high of a speed trying to be negotiated. Here's an example of one, with an average RSSI of -56dbm - http://pastebin.com/P7v3vCDa. You ever experiencing anything like this or have and clues as to the cause?
Me No Dev
@me-no-dev
Nov 30 2016 13:39
never had that many devices at once on my WiFi and I don;t even have that many ESPs so :D
Shelby Merrick
@forkineye
Nov 30 2016 13:41
lol. well, i've had some people experience it with just a few modules so I'm not sure if quantity comes into play. i'm just more likely to notice it. I've read posts about having to re-flash esp_init_data_default.bin when migrating to certain SDK versions. does the Arduino IDE take care of this or is it something I should look into?
I've never noticed it flashed and I don't flash that section in my tool either. Do I need to flash it directly or can I manipulate it purely in RF_PRE_INIT() {} with SDK calls?
Holger Lembke
@holgerlembke
Nov 30 2016 16:12
@forkineye I recently had a class with lots of users playing around with two different Wifi routers. One didn't like this much users connecting/dissconnecting at all, failing misserably. Turning on the brand name router, all was fine. So perhaps?
Shelby Merrick
@forkineye
Nov 30 2016 16:45
@holgerlembke I'm using a Ubiqitui Nanostation locoM2. I've thought about that as well and have tried adjusting some settings on it. Lowering the max link speed seemed to help at first, but the issue started occurring again. Doing more testing now.
Michael Miller
@Makuna
Nov 30 2016 17:51
I have one WiFi AP router that won't even correctly do UDP broadcast; contact the company and they state it works fine; I gave them a sample (and no, it wasn't ESP specific I found out) and they just shutup and won't talk to me anymore. Sigh.
So its useless for CoAP.
Shelby Merrick
@forkineye
Nov 30 2016 17:54
doh
Shelby Merrick
@forkineye
Nov 30 2016 18:31
why did they have to make UDP so reliable with link layer acks? arrrggg!!! i may end up just going back to a nRF24L01 for this
Michael Miller
@Makuna
Nov 30 2016 19:52
So its useless for CoAP.
To clarify, the WiFi AP (a lynksys) I have is useless for CoAP not the ESP.
emrekilic
@emrekilic
Nov 30 2016 20:37
Hi guys. I am using mdns with esp hostname. So i can access my device with http://esp.local/ url. If i have multiple devices in same network what happens? Which device i will access with this url? I didnt test it because i have only one esp :(
Clemens Kirchgatterer
@everslick
Nov 30 2016 21:11
a random one :-D
emrekilic
@emrekilic
Nov 30 2016 21:21
Thanks. So i will append chipId into esp.
For make it unique
Clemens Kirchgatterer
@everslick
Nov 30 2016 21:40
fuck! using WifiClientSecure instead of WiFIClient reduces available RAM by nearly 6KB.
Mark S
@SpankyPantry_twitter
Nov 30 2016 22:22
My code uses WiFiServer to listen on TCP ports. When a client connects, I do WiFiClient serverClient = myServer.available(); and get the IP address of the client using IPAddress sourceAddr = serverClient.remoteIP();. This works in most cases but NOT when the connection in made by nmap. In that case, the IPAddress is 0.0.0.0, always.
Does anyone know how (=where in the code) the IP address is populated? I can see it comes from WiFiServer._client._pcb->remote_ip.addr -- but I can't fathom how it gets there.
(I can see using WireShark that the TCP connections are different... I can describe how, if it helps.)