这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 综合技术 » 物联网技术 » 卓泰科技的小e开发板试用开发进程贴 (小E初体验-供电&智能链接)

共12条 1/2 1 2 跳转至

卓泰科技的小e开发板试用开发进程贴 (小E初体验-供电&智能链接)

专家
2016-03-25 18:27:31     打赏

小E到手后,迫不及待的想体验一下。


供电


看了一下电源接口是MircoUSB,一般的安卓手机都是这个接口,数据线很好找。

再看看各个针脚发现VCC都是3.3V,ESP模块好像也是3.3,是不是不能直接接USB呢?毕竟USB是5V呀。

然而小E的设计已经考虑了这点,板卡背边集成了一个AMS1117-3.3,看来是我多虑啦。



插上USB数据线,插到电脑USB口上。

为啥小E没亮呢?莫非我接错线了?会不会烧掉呢?吓死个人呀。

再仔细观察,OLED旁边有个开关,上边印着ON/OFF。原来是我没开开关。


把开关拨到ON位置,OLED旁边一个貌似电源指示灯的东西亮了。

接着OLED亮了,先是显示了一个“开发快”的文字+LOGO

然后显示一排文字:“开发从未如此简单”


联网(智能链接)


接下来干些神马呢?我猜应该是连接到网络上。

看了一下说明书,哇,猜对了。

联网要1,2,3步。



之前好像有兄弟说不知道板子后边的二维码是干啥的,其实就是提供APPKEY和UID的哦

按这个流程操作,很方便就把小E连接到网络上并且和微信公众号建立起来关联了。


其中最先进的就是配置上网的过程了。

设备没连上网,却可以使用手机给其设置WIFI连接信息(感觉是先有蛋还是先有鸡的问题呢),是不是很神奇?

还联网,咋通过联网设置的呢?




其实这里使用了一种技术。

微信平台上叫AirKiss,听起来很****是不是?

而设备端有的叫Smartconfig, 有的叫SmartConnect, 还有的叫WIFI快连,不管名字多么高大上,其实基本上都是一种技术(我猜的,猜错了别打我)

那么这么高大上的技术到底是啥原理呢?咋连上的呢?




专家
2016-03-25 19:38:05     打赏
2楼

其实呢,也不是那么深奥。


简单的说呢,

1)手机发送广播UDP数据包

2)设备扫描所有的可用热点(遍历),并处于混杂模式(监听模式,此模式下可以收到广播UDP包)

3)设备在正确的热点上接收到密码(广播UDP数据包)

4)设备连入网络成功


其中UDP如何发送密码相对比较复杂

大概意思就是两者无法通过UDP包的内容来交换数据(因为还未建立起来连接?)

但是可以获取数据包的长度

然后呢,聪明的人类就在长度上做文章了,比如长度1000个字节代表1,1001个字节代表2...
这样就可以通过不同的长度对内容进行编码

太有才了。


这样一说是不是就明白了?

如果你还不明白呢,也没关系,其实我都是瞎猜的。


微信的AirKiss呢,就是发包的

ESP模块这端呢,就负责扫描,解码

然后呢,两者就勾搭上了。



专家
2016-03-25 19:40:21     打赏
3楼

帖子中居然有关键字被屏蔽

我这是技术贴好不好?


专家
2016-03-25 19:41:40     打赏
4楼
格式控制不好用呢?


啊啊啊1


啊啊啊2

专家
2016-03-25 19:43:11     打赏
5楼

BUG啊

编辑帖子


选中文字,选择H1,期望是大标题格式


实际发出来,还是普通文字

论坛BUG多啊


专家
2016-03-25 20:46:18     打赏
6楼

http://electronics.stackexchange.com/questions/61704/how-does-ti-cc3000-wifi-smart-config-work

这篇文章说的很好

说的是CC3000,用的原理、方法以及协议,应该和ESP模块大同小异吧 (我瞎猜的)


专家
2016-03-25 20:47:39     打赏
7楼

As @Colin mentions the scheme that TI now use to communicate a network SSID and keyphrase from a setup application to a CC3000 enabled device is called Smart Config.

Smart Config has to communicate information (the network SSID and keyphrase) from a secure wifi network to a CC3000 enabled device that is not yet able to decrypt the traffic on that network.

Initially the CC3000 is not connected to the network (but can monitor the traffic), so the Smart Config application cannot send its information directly to the device. Instead it sends UDP packets to another existing machine on the network - the wifi access point (AP). That the AP isn't interested in receiving them is irrelevant, it's just important that the packets be visible on the network.

While the CC3000 can monitor the traffic it can't decrypt it, it can't even tell for certain that a given encrypted packet contains UDP data. So how can it pick out the UDP packets or do anything useful with them?

Basically Smart Config encodes its information not in the content of the packets it is sending but in their length. Wifi encryption affects the length of packets, but in a consistent way, i.e. it adds L additional bytes to the size of every packet, where L is a constant.

The Smart Config application encodes the SSID and keyphrase into the packet lengths of a sequence of UDP packets. The CC3000 can see the encrypted packets and their sizes.

In many environments the CC3000 will be able to see traffic from multiple nearby networks so how can it spot the relevant traffic? Even after encryption one can still see the MAC addresses of the source and destination of a packet so one can group traffic this way. In addition to the primary information that Smart Config is trying to send it also sends out regularly repeating patterns of packet lengths, so the CC3000 groups the traffic as described and then looks out for such patterns, when it finds them in the traffic of a given source and destination pair it then focuses in to recover the primary information.

There's obviously more too it than that, e.g. even once the CC3000 has found the source and destination pair, that correspond to the AP and the machine running the Smart Config application, how does it filter the Smart Config packets from other unrelated traffic going between the AP and the machine? I've written this all up in a series of blog posts.

The most technically detailed one covers the heart of Smart Config - how it encodes the SSID and keyphrase and transmits them such that a CC3000 can pick them up:

http://depletionregion.blogspot.ch/2013/10/cc3000-smart-config-transmitting-ssid.html

Then I have a post that's less technical, more an opinion piece about why you should always use an AES key with Smart Config:

http://depletionregion.blogspot.ch/2013/10/cc3000-smart-config-and-aes.html

There is a technical bit in the middle that does describe briefly how you'd configure a cipher in Java with the necessary AES transformation needed to work as the CC3000 expects.

And finally the proof of the pudding - I wrote an application to emulate the Smart Config related behavior of the CC3000, i.e. it can recover the SSID and keyphrase transmitted by any Smart Config application without needing to be able to decrypt the relevant network traffic. You can find where to download the source and all the details here:

http://depletionregion.blogspot.ch/2013/10/cc3000-smart-config-and-keyphrase.html

This should enable one to test the behavior of any Smart Config application one writes, i.e. one can see what a CC3000 would be able to reconstruct from the data transmitted by the application.

I also have a few more Smart Config / CC3000 related posts:

http://depletionregion.blogspot.ch/search/label/CC3000

For some background information it can also be interesting to read through these threads on the TI forum relevant to the CC3000.

First one covering Smart Config itself:

http://e2e.ti.com/support/low_power_rf/f/851/t/253463.aspx

And one on mDNS, the mechanism by which a Smart Config application detects that a CC3000 enabled device has joined the network:

http://e2e.ti.com/support/low_power_rf/f/851/p/290584/1020839.aspx

In both threads some initial messages may not seem so relevant but there's some interesting information mixed in too. But there's also a lot of inaccurate information as well so don't assume all of it is correct, even information from TI employees or from me (I learned a lot eventually but started with some incorrect assumptions/beliefs).

Patents have been mentioned a few times, however I can't find any evidence that there are patents pending or granted on this technology.


专家
2016-03-25 20:56:34     打赏
8楼

http://iot.weixin.qq.com/wiki/new/index.html?page=4-1-1

微信AirKiss的文档

原来配网只是其中一个功能


1)微信配网

2)局域网发现

3)局域网通信




专家
2016-03-25 20:57:06     打赏
9楼

大微信太威威霸气了



专家
2016-03-26 06:03:46     打赏
10楼
有毒

共12条 1/2 1 2 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]