In my recent project I want communications between two esp8266 chip without external MCU or router.
To achieve this I have written two different firmware which I'm flashing it to two different chips.
Firmwares are :
1 . Configure esp in "SoftAP" mode, act as TCP server and listen for TCP client connection
2 . configure esp in "STATION " mode, act as a TCP client and tries to connect to TCP server.
I'm facing problem in connection between them and need help to solve it.
When client tries to connect with server it unable to get IP address form AP. Here is log :
SOftAP mode :
mode : sta(18:fe:34:9e:16:b5) + softAP(1a:fe:34:9e:16:b5)
add if0
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
add if1
bcn 100
add 1
aid 1
station: 18:fe:34:9e:18:21 join, AID = 1
station: 18:fe:34:9e:18:21 leave, AID = 1
rm match
add 1
aid 1
station: 18:fe:34:9e:18:21 join, AID = 1
station: 18:fe:34:9e:18:21 leave, AID = 1
STATION mode:
mode : sta(18:fe:34:9e:18:21)
add if0
scandone
add 0
aid 1
pm open phy_2,type:2 0 0
cnt
reconnect
rm match
pm close 7 0 0/10001392
scandone
add 0
aid 1
pm open phy_2,type:2 0 0
cnt
reconnect
rm match
pm close 7 0 0/10001361
scandone
add 0
aid 1
pm open phy_2,type:2 0 0
cnt
reconnect
rm match
pm close 7 0 0/10000192
WiFi connecting fail
Anyone have idea what's going wrong ?
After successfully completed, I'm going to release code !!
I also posted in companies forum. Here's link. http://bbs.espressif.com/viewtopic.php?f=7&t=544
He suggested solution but it won't work. I also tries with different combinations of mode like STATION + SOFTAP, STATION and SOFTAP but not succeed.
Thanks and regards,
Prakash P.