Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smartlink & sdk_v0.9.4_14_12_19 #1

Closed
reaper7 opened this issue Dec 20, 2014 · 19 comments
Closed

smartlink & sdk_v0.9.4_14_12_19 #1

reaper7 opened this issue Dec 20, 2014 · 19 comments

Comments

@reaper7
Copy link

reaper7 commented Dec 20, 2014

SmartLink seems to not work with new sdk_v0.9.4_14_12_19

@ly0
Copy link
Owner

ly0 commented Dec 20, 2014

I tried 0.9.4, but failed to compile, and i do not know why :( sad..

@reaper7
Copy link
Author

reaper7 commented Dec 20, 2014

I prepare small example for esp8266.com forum:
http://www.esp8266.com/viewtopic.php?f=6&t=536#p5085

compilation on 9.3 and 9.4 works ok
but on 9.4 nothing happen, seems like promiscuous callback is not called or promiscuous mode is not properly activated

maybe this cause are associated with this change:
"Update sniffer to support capture HT20/HT40 packet;"

@ly0
Copy link
Owner

ly0 commented Dec 20, 2014

Packets which I captured were so weird... and I can only capture packets with length 64 bytes. Seems some packets were ignored.

@ly0
Copy link
Owner

ly0 commented Dec 23, 2014

The problem seems be solved by engineer in Espressif.

@reaper7
Copy link
Author

reaper7 commented Dec 23, 2014

half solved

if length of (SSID + TOKEN + PASS) <= 22 everything is OK
but for length > 22 chars, result PASSWORD contain chars from outside struct sniffer_buf->buf (network_80211.h)
because buf item from this struct can accommodate only 48 elements

look at 2 examples:

  1. VIRTUAL SSID: abcdefgh<!-SL-!>ijklmnop
WIFI SMARTLINK RX LEN[64]
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
-----------------------------------------------
 @ 00 00 00 ff ff ff ff ff ff  0 a8 db a4 19 91 
ff ff ff ff ff ff    05 00 18  a  b  c  d  e  f 
 g  h  <  !  -  S  L  -  !  >  i  j  k  l  m  n 
01 00  ~ 00 f0 bf ff  ?  P 00 00 00 00 a3  d b6 
-----------------------------------------------
-user/wifi.c-wifi_smartlink_promiscuous_rx WIFI SMARTLINK RECEIVED SSID:[abcdefgh] PASSWORD:[ijklmn ]

2.VIRTUAL SSID: abcdefgh<!-SL-!>ijklmn

WIFI SMARTLINK RX LEN[64]
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
-----------------------------------------------
 @ 00 00 00 ff ff ff ff ff ff  0 a8 db a4 19 91 
ff ff ff ff ff ff  P  & 00 16  a  b  c  d  e  f 
 g  h  <  !  -  S  L  -  !  >  i  j  k  l  m  n 
01 00  | 00 f0 bf ff  ?  P 00 00 00 00 a3  d b6 
-----------------------------------------------
-user/wifi.c-wifi_smartlink_promiscuous_rx WIFI SMARTLINK RECEIVED SSID:[abcdefgh] PASSWORD:[ijklmn]

in 1 example PASSWORD: ijklmn after char "n" contains hex 0x01 but I can't put it on github :(

@ly0
Copy link
Owner

ly0 commented Dec 23, 2014

The maximum of tagged parameters was shorten to 22 bytes, if so, maybe we should define a brand new protocol to send our data by segmented transmission?

I ever had a idea.
something likes this:

  1. SL12-34-56-78-90-AB (21bytes) ----> ESP8266 (after receiving this, 8266 will only receive packets from the specific cellphone by checking cellphone's MAC)
  2. [1]DATA SEGMENT 1 ---> ESP8266 (WAIT, send 21 - 3 = 19 bytes at most)
  3. ...
  4. [n]DATA SEGMENT n ---> ESP8266 (WAIT, send 21 - 3 = 19 bytes at most)
  5. [END] ---> ESP8266 (END OF DATA, release and reboot)

But in this situation, we also need a specific app on cellphone.

@reaper7
Copy link
Author

reaper7 commented Dec 23, 2014

not bad, but more complicated,
previous idea is ideal!

in my case, temporary solution: shorten TOKEN :D

@ly0
Copy link
Owner

ly0 commented Dec 23, 2014

Aye, if your AP's SSID and password are short enough :-)
For me, 22 bytes is really a bad news ;-(

@reaper7
Copy link
Author

reaper7 commented Dec 23, 2014

or we can do this as You wrote - 2 segments with different token, one for ssid and second for pass
then declare on mobile two virtual ap, one with ssid only and second with pass only

@ly0
Copy link
Owner

ly0 commented Dec 24, 2014

:D nice alternative!

@lanyiyang
Copy link

How mobile android code work? This is just esp code....Can you provide the mobile android test demo?
Thanks.

@ly0
Copy link
Owner

ly0 commented Jan 13, 2015

@youngBuger android机不是可以手工添加ssid吗?就是那个设置。

@ly0
Copy link
Owner

ly0 commented Jan 14, 2015

@youngBuger I saw your comment on my dashboard, but it seems be lost.

@lanyiyang
Copy link

有两个问题:
1、我看esp bbs上面提到了,如果“f length of (SSID + TOKEN + PASS) <=22 everything is OK” ,如果大于23Bytes 貌似就失败。 这个还没有解决吧?

2、Android: 开发者可以在自己的应用上调用“添加网络”的接口,发出probe requst帧。
IOS : 开发者由于权限限制,没有办法在第三方应用上做这个操作吧????

@ly0
Copy link
Owner

ly0 commented Jan 14, 2015

@youngBuger 对于第一个问题,是,除非你用0.9.3以下的SDK,或者按这个issue上面说的,可以分成两次发送
对于第二个问题,IOS确实目前没有办法。

@lanyiyang
Copy link

@ly0 谢谢了。我现在正在测试TI的smartconfig的连接方案。目前手机可以可以按照相应格式发出UDP长度包,但是ESP这边还没有实现UDP数据包抓取。

@ly0
Copy link
Owner

ly0 commented Jan 14, 2015

@youngBuger 这个有现成的,之前ESP的一个群里的kal做的。

@ly0 ly0 closed this as completed Feb 22, 2015
@Jeff0083
Copy link

你能给我一个kal博客的链接吗?

@lanyiyang
Copy link

http://blog.sina.com.cn/s/blog_69f669470102vf1m.html

lanyiyang_dh@163.com

From: zhao305149619
Date: 2015-03-16 19:05
To: ly0/esp8266-smartlink
CC: yonuger
Subject: Re: [esp8266-smartlink] smartlink & sdk_v0.9.4_14_12_19 (#1)
你能给我一个kal博客的链接吗?

Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants