These are chat archives for esp8266/Arduino

8th
Jan 2016
PyB
@PyBerger
Jan 08 2016 13:35
Yesterday did some other tests. I managed to get it work again with security. But for the first connection to work there is a need for may beb,twenty
Trials... Once 1st connextion is done then it works flawlessly. Never succeeded without security
Do we have ways to enable traces in the SDK software ? Running out of ideas...
Markus
@Links2004
Jan 08 2016 13:37
strange will add some more debug info for WiFi and will try implement some SDK config overriding.
hope this helps us to track it down, hard to debug when i not get the error.
can you reproduce the error on more then one ESP?
FWeinb
@FWeinb
Jan 08 2016 13:46
Is someone using this board too? I can't find a pinout anywhere.
Markus
@Links2004
Jan 08 2016 13:47
have it here but not used it yet.
FWeinb
@FWeinb
Jan 08 2016 13:48
I have no idea where things are attached.
Aditya Tannu
@AdySan
Jan 08 2016 13:48
I just ordered it a few weeks ago
Markus
@Links2004
Jan 08 2016 13:49
it should have the same pins used as the yellow dev bord from china
Aditya Tannu
@AdySan
Jan 08 2016 13:49
It's nice for low power stuff, you can get rid of the serial IC when you don't need it
One USB is only for power
Markus
@Links2004
Jan 08 2016 13:50
#define LED_RED     15
#define LED_GREEN   12
#define LED_BLUE    13
and the photo resistor at the ADC
FWeinb
@FWeinb
Jan 08 2016 13:50
Thanks. And the button?
Aditya Tannu
@AdySan
Jan 08 2016 13:50
Oh so it's not a neopixel)
Harrison Mclean
@h4rm0n1c
Jan 08 2016 13:51
I wonder what the circuit is for the ldr on those dev boards.
Would be good to know
Markus
@Links2004
Jan 08 2016 13:52
no idea where de buttons are, but a multi meter shut give the answer fast.
Harrison Mclean
@h4rm0n1c
Jan 08 2016 13:52
*photo resistor
FWeinb
@FWeinb
Jan 08 2016 13:53
I don't even have a multi meter... I am totally new to this stuff.
Aditya Tannu
@AdySan
Jan 08 2016 13:53
Haha, get a soldering iron when you order one too.
Just in case
FWeinb
@FWeinb
Jan 08 2016 13:54
I do have a soldering iron.
Aditya Tannu
@AdySan
Jan 08 2016 13:54
The button trace should be visible under the PCb
You can even see some in the photos
So gpio4
FWeinb
@FWeinb
Jan 08 2016 13:56
Awesome! Thanks
Markus
@Links2004
Jan 08 2016 13:57
on the other board are reset + gpio0
reset is that one by the ldr
FWeinb
@FWeinb
Jan 08 2016 14:05
These dev boards are just so cheep, to bad that it doesn't fit on a breadboard.
FWeinb
@FWeinb
Jan 08 2016 16:11
@AdySan How are you programming the board? Do you always attach/deattach the display?
I wish they had extended the pins on the programmer...
Aditya Tannu
@AdySan
Jan 08 2016 16:22
Oh you mean in the wemos d1 mini or this witty two layer board?
FWeinb
@FWeinb
Jan 08 2016 16:28
The witty two layer board.
Aditya Tannu
@AdySan
Jan 08 2016 16:35
Ah I don't have that one yet, I'm just using the wemos mini d1 right now. They're deceptively similar looking
FWeinb
@FWeinb
Jan 08 2016 16:36
I am using a nodeMCU. But I liked the form factor of the Witty board.
Aditya Tannu
@AdySan
Jan 08 2016 16:40
I only ordered it because it has the serial chip on the other board, so if you remove the second layer, you can use it for deep sleep battery operated sensors
with nodeMCU there's too many things constantly drawing current
FWeinb
@FWeinb
Jan 08 2016 16:42
Good point.
tzapu
@tzapu
Jan 08 2016 17:50
guys, i am trying the new debug menu, but can t seem to get anything showing
selected serial in menu, and have inited serial in code
can see my serial messages, with println, but none of the core ones
also, probably more for @Links2004 if i start the sketch and set directly WiFi.mode(WIFI_AP); it all starts great, but i can t seem to connect to the access point, or get immediately disconnected. If i add a WiFi.mode(WIFI_STA); in front of it all, it works as intended. I am not sure if this is just my setup or not yet..
Helio Machado
@crushedice2000
Jan 08 2016 17:55
@tzapu: Sorry, I can't help you because now I'm doing a hardware project and I've not updated the ESP8266Arduino module. The only advice I can give you is to put @/all in your comment to ping all the savvy people here. :worried:
Markus
@Links2004
Jan 08 2016 17:56
@tzapu you habe set the port and the level?
tzapu
@tzapu
Jan 08 2016 17:56
thanks @crushedice2000 . i d leave it in case anyone sees it, not all that urgent now as i m about to turn in so don t wanna be spamming people :P
yes
screenshot comming
coming*
using latest github btw
and was trying to debug the WIFI_STA/ AP thing i mentioned above
Markus
@Links2004
Jan 08 2016 17:58
when you have Serial.begin(.....) in you setup is should bring debug messaged.
tzapu
@tzapu
Jan 08 2016 17:59
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println();
that s from my sketch
and my only debug are my own prints
ah, this is with arduino ide 1.6.6 , if it matters
Markus
@Links2004
Jan 08 2016 18:00
WiFi it self has not many debug yet but i start adding stuff for debugging the AP problems will push it to my git.
tzapu
@tzapu
Jan 08 2016 18:01
well, thing is i m getting no messages at all... and i am intiating an ap, dns server, etc
also tried with all
debug level: all
still nothing
Markus
@Links2004
Jan 08 2016 18:02
can you post one compiling line to see if the defines are in the command line.
in your cases there need to be a -DDEBUG_ESP_PORT=Serial
tzapu
@tzapu
Jan 08 2016 18:04
hmm
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
just started gettign these
when i didn t output anything
Markus
@Links2004
Jan 08 2016 18:04
that is debug :)
tzapu
@tzapu
Jan 08 2016 18:04
yup
let me enable my prints again as well
maybe my firmware was not uploading or something
hmm
so, with WiFiManager, i m running my own loop in the lib
to listen for http requests, dns, etc
would that kill the debug?
i am yielding in it
Markus
@Links2004
Jan 08 2016 18:07
no, the debug uses Serial.printf and prints out stuff when needed.
more WiFi AP debug:
Links2004/Arduino@dec6739
tzapu
@tzapu
Jan 08 2016 18:11
ok, pulled in your debug branch
restarted ide
uploading
and works, bloody marvelous
WM: WM: Configuring access point...
WM: OnDemandAP
[AP] softap config unchanged
WM: AP IP address:
WM: 192.168.4.1 WM: HTTP server started
*WM: start loop
maybe new line after debug?
Markus
@Links2004
Jan 08 2016 18:14
yes will add
tzapu
@tzapu
Jan 08 2016 18:15
WOOOOOWWWW
you just saved me a load of hassle
the http server debug, is exactly what i wanted to look at next, to see why so many requests,
it s soooooo simple now
Markus
@Links2004
Jan 08 2016 18:16
thats the idea, now every developer can take a first look easily
tzapu
@tzapu
Jan 08 2016 18:16
yeah, amazing
so, if i were to have my lib throw messages on this debug
to support this new debug fucntionality
i assume it wouldn t get it s own level
in the arduino ide menu
tzapu
@tzapu
Jan 08 2016 18:17
what/how would it show up as?
Markus
@Links2004
Jan 08 2016 18:18
the basic infos are there.
tzapu
@tzapu
Jan 08 2016 18:18
yup, so i would do this
#ifdef DEBUG_ESP_PORT
#define DEBUG_MSG(...) DEBUG_ESP_PORT.printf( __VA_ARGS__ )
#else
#define DEBUG_MSG(...) 
#endif
but under which level would the messages show up?
Markus
@Links2004
Jan 08 2016 18:20
its independent of the level, then its aktive when the Debug port is set
tzapu
@tzapu
Jan 08 2016 18:20
debug port : serial and debug level: none ?
ah ha
ok
so they appear all the time, if debug port is set
Markus
@Links2004
Jan 08 2016 18:20
yes
tzapu
@tzapu
Jan 08 2016 18:20
nice, nicer than setting a flag
Markus
@Links2004
Jan 08 2016 18:20
and not require changing the board.txt
tzapu
@tzapu
Jan 08 2016 18:21
cool, will move to that then once it gets released to the masses
as in final 2.1.0
or maybe sooner :P
Markus
@Links2004
Jan 08 2016 18:21
you can use it now to, it will work in every build, but its only in the menu for rc1 and up
tzapu
@tzapu
Jan 08 2016 18:22
thanks @Links2004 now to try and ivestigate the issue that started this thread :P
Markus
@Links2004
Jan 08 2016 18:22

if you add

#define DEBUG_ESP_PORT Serial

above the ifdef its fine.

tzapu
@tzapu
Jan 08 2016 18:23
but other people using the library won t know how to enable/disable the debug without modifying the lib i guess
Markus
@Links2004
Jan 08 2016 18:24
yes, for this I have the define as note in the code :)
since the menu not needed any more.
tzapu
@tzapu
Jan 08 2016 18:25
thanks
yup
now the issue, since you are here, if you ve got a sec :P
using your new super debug
it seems that when i set an access point
directly
i get this
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 5
wifi evt: 6
Markus
@Links2004
Jan 08 2016 18:26
DHCP not started ?
tzapu
@tzapu
Jan 08 2016 18:26
and device will now connect to said access point
will NOT
the ap itself gets an ip
WM: Configuring access point... WM: OnDemandAP
[AP] softap config unchangedWM: AP IP address: WM: 192.168.4.1
*WM: HTTP server started
if i throw a WiFi.mode(WIFI_STA); before WiFi.mode(WIFI_AP); it all works fine
Markus
@Links2004
Jan 08 2016 18:27
@PyBerger has a similar problem.
working on some tests code for it.
since i get it not here. will push the code soon to my debug branch
tzapu
@tzapu
Jan 08 2016 18:29
with WiFi.mode(WIFI_STA); in front
the debug looks like
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 5
New client
so no wifi evt: 6 whatever that is
have pushed the test code
tzapu
@tzapu
Jan 08 2016 18:33
reason not authtificated, maybe i messed the ap creation somehow then :)
will try test
side point, do i need to restart arduino ide when updating the core
?
Markus
@Links2004
Jan 08 2016 18:35
not sure, using eclipse there its detected.
but i think the arduino IDE does a full compile every time.
tzapu
@tzapu
Jan 08 2016 18:36
so
i am on your version
because i m getting the new lines in debug output
it doesn t seem to be a dhcp issue in my version
WM: HTTP server started WM: start loop
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 5
New client
method: GET url: /hotspot-detect.html search:
headerName: Host
headerValue: captive.apple.com
headerName: Connection
headerValue: close
headerName: User-Agent
headerValue: CaptiveNetworkSupport-325.10.1 wispr
args:
Request: /hotspot-detect.html
Arguments:
request handler not found
*WM: Request redirected to captive portal
wifi evt: 7
wifi evt: 7
wifi evt: 6
as it even manages to trigger of a http request before killing me off
lemme double check something
ok
tzapu
@tzapu
Jan 08 2016 18:41
new info
if i set a password on the ap as well, it doesn t accept it
if i set before WiFi.mode(WIFI_STA); everything works fine, with apssword and all
when i don t get through, or disconnected it get wifi evt: 6
Markus
@Links2004
Jan 08 2016 18:43
you mean the AP not change it config?
do you get softap config unchanged?
tzapu
@tzapu
Jan 08 2016 18:43
[AP] softap config unchanged
Markus
@Links2004
Jan 08 2016 18:43
yes
tzapu
@tzapu
Jan 08 2016 18:44
i didn t look between changing sta and non sta
let me see
should it?
the softap config in essence is unchanged
and i am not changing that
the only thing i m changin in my code
is having or not WiFi.mode(WIFI_STA); before WiFi.mode(WIFI_AP);
and the same behaviour happens with both a secured and unsecured AP config
Markus
@Links2004
Jan 08 2016 18:45
will change something one moment..
tzapu
@tzapu
Jan 08 2016 18:45
cheers
PyB
@PyBerger
Jan 08 2016 18:46
@tzapu Yep seems a similar problem.
@Links2004 I only have 1 esp board
Markus
@Links2004
Jan 08 2016 18:48
is pushed, may the SDK is simple stupid
tzapu
@tzapu
Jan 08 2016 18:49
pushed also to debug branch?
Markus
@Links2004
Jan 08 2016 18:50
yes
Helio Machado
@crushedice2000
Jan 08 2016 18:50
@Links2004: I've done your schematic and it works! Great! Thank you very much!
tzapu
@tzapu
Jan 08 2016 18:50
@PyBerger not sure about your issue, you mentioned not getting an ip, i also have this issue open maybe your issue looks like that esp8266/Arduino#1292
Helio Machado
@crushedice2000
Jan 08 2016 18:50
The only thing that I cant' get is to power off completely the lamp using PWM
tzapu
@tzapu
Jan 08 2016 18:50
@Links2004 the yield? :P
Rocco Musolino
@roccomuso
Jan 08 2016 18:51
Guys has anyone ever tried to connect esp8266/arduino to a Raspberry pi?
Markus
@Links2004
Jan 08 2016 18:51
@roccomuso have here an AP open for ESPs via pi
Helio Machado
@crushedice2000
Jan 08 2016 18:52
Also the capacitor seems to do nothing.
Markus
@Links2004
Jan 08 2016 18:52
@crushedice2000 the power supply is not designed for that. normally the dimmer cuts the power off.
Rocco Musolino
@roccomuso
Jan 08 2016 18:52
@Links2004 what i'm trying to do is a serial connection between esp and RPi
but i've noticed that serial console usually "blocks" the serial ports.
Markus
@Links2004
Jan 08 2016 18:52
@roccomuso both habe 3.3V IO level, see no problem there.
Rocco Musolino
@roccomuso
Jan 08 2016 18:53
I'm using the USB interface.
Markus
@Links2004
Jan 08 2016 18:54
if you add a Serial USB adapter linux will not used it for a concole,
how the problem looks like?
Rocco Musolino
@roccomuso
Jan 08 2016 18:55
The problem is, i'm using the node-serialport module for Node.js trying to connect thorugh the USB the device to the RPI.
tzapu
@tzapu
Jan 08 2016 18:55
@Links2004 still seems to disconnect me with wifi evt: 6
Rocco Musolino
@roccomuso
Jan 08 2016 18:55
But i'm getting the Error: Cannot open ttyAMA0
Markus
@Links2004
Jan 08 2016 18:55
ttyAMA0 is not the serial USB adapter its the Serial interface on the pins
search for a other tty interface in /dev/
Rocco Musolino
@roccomuso
Jan 08 2016 18:56
:O
Markus
@Links2004
Jan 08 2016 18:56
@tzapu any more debug messages?
Rocco Musolino
@roccomuso
Jan 08 2016 18:56
some useful commands to list usb devices?
PyB
@PyBerger
Jan 08 2016 18:56
@tzapu not exactly like 1292 as I have the correct IP address for the AP (I mean not 0.0.0.0), really seem to be a dhcp stuff. Also u r right I don't get an wfi evt 6 on my side
tzapu
@tzapu
Jan 08 2016 18:57
well, i seem to have more event 7 and 5
Markus
@Links2004
Jan 08 2016 18:57
@roccomuso lsusb but in your case ls /dev/tty*
tzapu
@tzapu
Jan 08 2016 18:57
also manage to squeeze a request or 2 before
it crashes
Markus
@Links2004
Jan 08 2016 18:57
@PyBerger can you test my debug branch too ? https://github.com/Links2004/Arduino/tree/debug
tzapu
@tzapu
Jan 08 2016 18:58
 Starting
*WM: 
*WM: Configuring access point... 
*WM: OnDemandAP
[AP] softap config unchanged
wifi evt: 7
wifi evt: 7
*WM: AP IP address: 
*WM: 192.168.4.1
*WM: HTTP server started
*WM: start loop
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 5
wifi evt: 5
wifi evt: 5
wifi evt: 5
wifi evt: 5
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 5
New client
method: GET url: /hotspot-detect.html search: 
headerName: Host
headerValue: captive.apple.com
headerName: Connection
headerValue: close
headerName: User-Agent
headerValue: CaptiveNetworkSupport-325.10.1 wispr
args: 
Request: /hotspot-detect.html
 Arguments: 
request handler not found
*WM: Request redirected to captive portal
New client
method: GET url: / search: 
headerName: Host
headerValue: 192.168.4.1
headerName: Connection
headerValue: close
headerName: User-Agent
headerValue: CaptiveNetworkSupport-325.10.1 wispr
args: 
Request: /
 Arguments: 
*WM: Handle root
New client
method: GET url: /hotspot-detect.html search: 
headerName: Host
headerValue: captive.apple.com
headerName: Accept
headerValue: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
headerName: Accept-Language
headerValue: en-us
headerName: Connection
headerValue: keep-alive
headerName: Accept-Encoding
headerValue: gzip, deflate
headerName: User-Agent
headerValue: Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13C75
args: 
Request: /hotspot-detect.html
 Arguments: 
request handler not found
*WM: Request redirected to captive portal
New client
method: GET url: / search: 
headerName: Host
headerValue: 192.168.4.1
headerName: Accept
headerValue: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
headerName: Accept-Language
headerValue: en-us
headerName: Connection
headerValue: keep-alive
headerName: Accept-Encoding
headerValue: gzip, deflate
headerName: User-Agent
headerValue: Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13C75
args: 
Request: /
 Arguments: 
*WM: Handle root
wifi evt: 6
wifi evt: 7
wifi evt: 7
wifi evt: 7
Markus
@Links2004
Jan 08 2016 18:58
@tzapu can you test a other device to connect to the AP?
tzapu
@tzapu
Jan 08 2016 18:59
i ll try the debug to see if same
same both on phone and laptop
Rocco Musolino
@roccomuso
Jan 08 2016 19:00
blob
Markus
@Links2004
Jan 08 2016 19:00
strange, unfortunately the SDK not gives a reason for the disconnect, in STA mode it does but not for AP mode...
Rocco Musolino
@roccomuso
Jan 08 2016 19:00
@Links2004 pasted to you the ls /dev/tty* output
Markus
@Links2004
Jan 08 2016 19:01
@roccomuso may ttyprintk
tzapu
@tzapu
Jan 08 2016 19:02
from laptop
 Starting
*WM: 
*WM: Configuring access point... 
*WM: OnDemandAP
[AP] softap config unchanged
*WM: AP IP address: 
*WM: 192.168.4.1
*WM: HTTP server started
*WM: start loop
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 5
wifi evt: 5
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 5
wifi evt: 6
Rocco Musolino
@roccomuso
Jan 08 2016 19:02
@Links2004 disconnecting the USB that ttyprintk still persist.
tzapu
@tzapu
Jan 08 2016 19:02
guys, thank you very much for your help, i m turning in for today
Rocco Musolino
@roccomuso
Jan 08 2016 19:03
@Links2004 perhaps through the lsusb command i've found this: Bus 001 Device 005: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Markus
@Links2004
Jan 08 2016 19:03
@roccomuso plug the USB and then run dmesg may there is no driver loaded for it
Rocco Musolino
@roccomuso
Jan 08 2016 19:04
[284088.361529] usb 1-1.2: new full-speed USB device number 6 using dwc_otg
[284088.489201] usb 1-1.2: New USB device found, idVendor=0403, idProduct=6001
[284088.489234] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[284088.489251] usb 1-1.2: Product: FT232R USB UART
[284088.489267] usb 1-1.2: Manufacturer: FTDI
[284088.489283] usb 1-1.2: SerialNumber: A500Y0P2
if I try to list the usb serial port with the node-serialport script, it shows me just ttyAMA0
tzapu
@tzapu
Jan 08 2016 19:09
g'night, will read tomorrow to see if there are more develpments :P
developments *
Markus
@Links2004
Jan 08 2016 19:09
@tzapu gn
@roccomuso tested it with my pi and a FT232R is listed as /dev/ttyUSB0
Rocco Musolino
@roccomuso
Jan 08 2016 19:10
@Links2004 hmm what would you suggest?
Markus
@Links2004
Jan 08 2016 19:11
do you run the commands as root?
Rocco Musolino
@roccomuso
Jan 08 2016 19:11
yes
could be a power issue? i don't think..
might be worth trying with an arduino uno?
Markus
@Links2004
Jan 08 2016 19:13
no idea, should work.
some uno have ftdi some a atmega16
Rocco Musolino
@roccomuso
Jan 08 2016 19:14
let me say that now i've connected an Arduino nano (which is then connected to esp-01 etc... )
so the RPI can't found my arduino nano
let's try with arduino uno
PyB
@PyBerger
Jan 08 2016 19:16
@Links2004 Will test the branch later tonight - not close to my setup now.
Rocco Musolino
@roccomuso
Jan 08 2016 19:18

@Links2004
[284803.208384] usb 1-1.2: new full-speed USB device number 7 using dwc_otg
[284803.322999] usb 1-1.2: New USB device found, idVendor=2341, idProduct=0001
[284803.323032] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[284803.323048] usb 1-1.2: Product: Arduino Uno
[284803.323065] usb 1-1.2: Manufacturer: Arduino (www.arduino.cc)
[284803.323081] usb 1-1.2: SerialNumber: 752303137333514092E1

But still can't find it through node-serialport or ls /dev/tty*

Markus
@Links2004
Jan 08 2016 19:21
no idea, may update your pi.
Rocco Musolino
@roccomuso
Jan 08 2016 19:21
done already
PyB
@PyBerger
Jan 08 2016 19:33
@Links2004 Will test the branch later tonight - not close to my setup now.
Does not look any better.
Markus
@Links2004
Jan 08 2016 19:34
any debug messages?
PyB
@PyBerger
Jan 08 2016 19:34
Still the same message, and also neither DEBUG_WIFI("[AP] DHCP not started, starting...\n");
nor DEBUG_WIFI("[AP] wifi_softap_dhcps_start failed!\n"); are displayed while I see DEBUG_WIFI("[AP] softap config unchanged\n");
....
.......wifi evt: 7
wifi evt: 7
wifi evt: 7
.wifi evt: 7
station: b4:07:f9:9d:6c:ee join, AID = 1
wifi evt: 5
Markus
@Links2004
Jan 08 2016 19:37
strange, the SDK think the dhcp is running, but you not get a ip.
what is WiFi.softAPIP reporting?
PyB
@PyBerger
Jan 08 2016 19:37
no way to enable traces in sdk ?
192.168.4.1
Markus
@Links2004
Jan 08 2016 19:38
station: b4:07:f9:9d:6c:ee join, AID = 1 is from the SDK more debug you will not get from it.
PyB
@PyBerger
Jan 08 2016 19:38
:(
Markus
@Links2004
Jan 08 2016 19:39
is using softAPConfig does change anything?
PyB
@PyBerger
Jan 08 2016 19:39
from wat I see this is really a dhcp (or something else problem) but not a pure wifi one as all the supplicant steps seem to pass ok
softapconfig - tried yesterday with no luck
will test again
PyB
@PyBerger
Jan 08 2016 19:47
tested with 192.168.2.1 not better
Markus
@Links2004
Jan 08 2016 19:48
do you see a line like dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1) ?
PyB
@PyBerger
Jan 08 2016 19:50
No, but strangely, even with my working setup (1.4.0 SDK) I have never ever seen it...
PyB
@PyBerger
Jan 08 2016 20:17
any idea why I won't see such trace ?
Markus
@Links2004
Jan 08 2016 20:18
have you Serial.setDebugOutput(true);
in you sketch?
PyB
@PyBerger
Jan 08 2016 20:19
of course, if not I wouldn't see the station blabla join AID=1 message - correct ?
Markus
@Links2004
Jan 08 2016 20:20
the debugging menu enables it after the setup run.
but it not aktive during setup
so for SDK messages during setup Serial.setDebugOutput(true); is needed
PyB
@PyBerger
Jan 08 2016 20:22
this is how my sketch is done
 debug_println("Initializing connectivity...");
  debug_println("");

  IPAddress IP_AP(192,168,2,1);
  IPAddress IP_Gateway(192,168,2,1);
  IPAddress IP_Subnet(255,255,255,0);

  Serial.setDebugOutput(true);
  WiFi.mode(WIFI_AP);
  WiFi.softAP(espSSID);
  WiFi.softAPConfig(IP_AP, IP_Gateway, IP_Subnet);
  debug_println("ESP8266 Wi-Fi init done!");
  debug_println("");
  softAPIP = WiFi.softAPIP();
  debug_print("IP address: ");
  debug_println(softAPIP);
  debug_print("SDK Version: ");
  debug_println(system_get_sdk_version());
this is the setup() function
Markus
@Links2004
Jan 08 2016 20:24
then is should be there.
try to add a WiFi.mode(WIFI_OFF); before the WiFi.mode(WIFI_AP);
Rocco Musolino
@roccomuso
Jan 08 2016 20:25
can't figured why rpi doesn't detect USB arduino devices yet
PyB
@PyBerger
Jan 08 2016 20:31
Aaaahhhhh, we may make some progress, now using the following code
``
```
void setup() {
    delay(1000);
    Serial.begin(921600);
 while (!Serial);
 Serial.setDebugOutput(true);
    Serial.println();
    Serial.print("Configuring access point...");
    /* You can remove the password parameter if you want the AP to be open. */
  Serial.println("Setting wifi off");
  WiFi.mode(WIFI_OFF);
  Serial.println("Setting wifi as ap");
  WiFi.mode(WIFI_AP);
    WiFi.softAP(ssid);

    IPAddress myIP = WiFi.softAPIP();
    Serial.print("AP IP address: ");
    Serial.println(myIP);
//    server.on("/", handleRoot);
//    server.begin();
    Serial.println("HTTP server started");
}

I'm getting the following on the terminal window
```

Configuring access point...Setting wifi off
bcn 0
del if1
usl
mode : null
Setting wifi as ap
mode : softAP(1a:fe:34:fc:a8:a7)
[AP] softap config unchanged
[AP] IP config Invalid resetting...
AP IP address: 0.0.0.0

Markus
@Links2004
Jan 08 2016 20:35
strange no error by setting the new IP but you still get 0.0.0.0
PyB
@PyBerger
Jan 08 2016 20:37
my problem is strange since the beginning :smile:
Markus
@Links2004
Jan 08 2016 20:37
true
will add more debug...
is on my debug branch
PyB
@PyBerger
Jan 08 2016 20:39
k tell me when done, and I'll get it
Markus
@Links2004
Jan 08 2016 20:40
its done :)
PyB
@PyBerger
Jan 08 2016 20:40
I tried added an ESP.eraseConfig() - no luck
Markus
@Links2004
Jan 08 2016 20:40
eraseConfig need a reset to take effect.
PyB
@PyBerger
Jan 08 2016 20:44
Configuring access point...
Setting wifi off
bcn 0
del if1
usl
mode : null
Setting wifi as ap
mode : softAP(1a:fe:34:fc:a8:a7)
[AP] softap config unchanged
[AP] IP config Invalid resetting...
[AP] IP config still Invalid?!
AP IP address: 0.0.0.0
HTTP server started
Markus
@Links2004
Jan 08 2016 20:45
no SDK function report a error but 0.0.0.0 is a bad IP!
PyB
@PyBerger
Jan 08 2016 20:45
for sure,
if I use the same sketch but just comment the Wifi.mode(WIFI_OFF) line,
then I get
Configuring access point...
Setting wifi off
Setting wifi as ap
[AP] softap config unchanged
AP IP address: 192.168.4.1
HTTP server started
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
add 1
aid 1
station: b4:07:f9:9d:6c:ee join, AID = 1
wifi evt: 5
which looks much better (I mean the IP address is OK, the Wi-Fi connection seems OK too, but the IP address or dhcp or ... is still a problem)
Markus
@Links2004
Jan 08 2016 20:47
will reset some more dhcp config...
last SDK function i can use for dhcp
PyB
@PyBerger
Jan 08 2016 20:48
I understand
Markus
@Links2004
Jan 08 2016 21:07
ok rework done, is used all dhcp function and try to get the SDK config in a good state, hope it helps.
PyB
@PyBerger
Jan 08 2016 21:09
let me guess u added the lease one ?
Markus
@Links2004
Jan 08 2016 21:09
yes
PyB
@PyBerger
Jan 08 2016 21:11
loading...
qwith WIFI_OFF
onfiguring access point...
Setting wifi off
bcn 0
del if1
usl
mode : null
Setting wifi as ap
mode : softAP(1a:fe:34:fc:a8:a7)
[AP] softap config unchanged
[AP] IP config Invalid resetting...
[AP] IP config Invalid?!
[AP] softAPConfig failed!
AP IP address: 0.0.0.0
without wifi_off
Configuring access point...
Setting wifi off
Setting wifi as ap
[AP] softap config unchanged
AP IP address: 192.168.4.1
HTTP server started
all this drives me nuts
Markus
@Links2004
Jan 08 2016 21:16
me too i not get what goes wrong. every function say all is good but noting work....
PyB
@PyBerger
Jan 08 2016 21:20
and I just tried switching back to 1.4.0....
works flawlessly
could that be the init_rf binary or something that isn't flashed well.
Markus
@Links2004
Jan 08 2016 21:21
the arduino port not need the init_rf
PyB
@PyBerger
Jan 08 2016 21:22
ok, because when switching to 2.1.0 i haven't changed the version of xtensa and esptool
Markus
@Links2004
Jan 08 2016 21:23
xtensa is the compiler and esptool for the upload
PyB
@PyBerger
Jan 08 2016 21:25
yes... was thinking a lash area may not be well erased if using the older version of esptool
very unlikely i agree - butrunning out of ideas...
PyB
@PyBerger
Jan 08 2016 22:16
I'll try to file a post on the espressif BBS to see...
brutzler
@brutzler
Jan 08 2016 22:49
Is a DHT22 working proper at 3,3V with an ESP?
3,3V is at the lower limit of power supply.
Chris Elsworth
@celsworth
Jan 08 2016 22:52
yes, works fine
brutzler
@brutzler
Jan 08 2016 22:52
what pullup: 1k?
Chris Elsworth
@celsworth
Jan 08 2016 22:53
don't think I actually used one :)
just gave it 3.3v, gnd, and then into a gpio directly
brutzler
@brutzler
Jan 08 2016 22:54
ok, thx. Will spend one.
Aditya Tannu
@AdySan
Jan 08 2016 22:59
yes i used pull-up for data pin
brutzler
@brutzler
Jan 08 2016 22:59
what size?
Chris Elsworth
@celsworth
Jan 08 2016 22:59
oh right, I used INPUT_PULLUP on the esp if I remember rightly
Aditya Tannu
@AdySan
Jan 08 2016 23:00
1k i think..
brutzler
@brutzler
Jan 08 2016 23:00
ok, thx
PyB
@PyBerger
Jan 08 2016 23:23
@Links2004 there is an SDK1.5.1 release out... quickly tested it (but with the 2.0.0 base as the merge was easier than with 2.1.0 - they moved back from phy_mode_t to phy_mode enums...)
@Links2004 and guess what it seems to work fine, so there must have been something wrong in 1.5.0...
Chris Elsworth
@celsworth
Jan 08 2016 23:26
that is interesting ^
there's been reports of issues with 1.5.0 for the last few weeks so a 1.5.1 release fairly soon does indicate .0 was broken
Me No Dev
@me-no-dev
Jan 08 2016 23:50
i've been saying it for a while... :D