当前位置:  编程技术>移动开发
本页文章导读:
    ▪Wi-Fi Protected Setup进程        Wi-Fi Protected Setup过程sniffer log http://download.csdn.net/detail/myxmu/6346765   76 15:32:25.639253 802.11 Probe Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 264 77 15:32:25.858500 802.11 Auth C8:DD:C9:79:0E:EC CA:DD:C.........
    ▪ 仿zaker用手向上促进的效果(推动门效果)        仿zaker用手向上推动的效果(推动门效果)        本文manymore13原创,转载请标明出处 http://blog.csdn.net/manymore13/article/details/12219687      最近在商店下载了zaker ,闲暇时拿来看看新闻!发现每.........
    ▪ 【音频制作方法】《GRE 核心语汇 考法精析》       【音频制作方法】《GRE 核心词汇 考法精析》近期有点脑抽,想考G,于是买了本单词书,大家都推荐的那本陈琦的《要你命3000》,由于备考时间紧,买了本便携版的,叫《GRE 核心词汇 考法.........

[1]Wi-Fi Protected Setup进程
    来源: 互联网  发布时间: 2014-02-18
Wi-Fi Protected Setup过程
sniffer log

http://download.csdn.net/detail/myxmu/6346765

 

76 15:32:25.639253 802.11 Probe Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 264
77 15:32:25.858500 802.11 Auth C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 1 34
78 15:32:25.858753 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  1 14
79 15:32:25.859620 802.11 Auth CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 34
80 15:32:25.861501 802.11 Assoc Req C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 1 131
81 15:32:25.861880 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  1 14
82 15:32:25.865377 802.11 Assoc Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 216
83 15:32:25.871280 EAP Request CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 47
84 15:32:25.874355 EAP Response C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 1 76
85 15:32:25.874370 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  1 14
86 15:32:25.875537 EAP Request CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 56
87 15:32:25.944004 EAP Response C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 1 461
88 15:32:25.944029 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  1 14
89 15:32:26.078533 EAP Request CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 482
90 15:32:26.167152 EAP Request CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 248
91 15:32:26.172642 EAP Response C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 1 176
92 15:32:26.172664 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  1 14
93 15:32:26.179528 EAP Request CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 176
94 15:32:26.293277 EAP Response C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 1 116
95 15:32:26.293304 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  1 14
96 15:32:26.299559 EAP Failure CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 46
97 15:32:26.302169 802.11 Deauth C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 1 30
98 15:32:26.302530 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  1 14
99 15:32:26.309744 802.11 Probe Req C8:DD:C9:79:0E:EC Ethernet Broadcast Ethernet Broadcast 1 200
100 15:32:26.311514 802.11 Probe Req C8:DD:C9:79:0E:EC Ethernet Broadcast Ethernet Broadcast 1 200
101 15:32:26.313624 802.11 Probe Rsp 00:1F:64:E7:97:12 C8:DD:C9:79:0E:EC 00:1F:64:E7:97:12 1 233
102 15:32:26.323293 802.11 Probe Rsp B8:32:2E:59:D3:08 C8:DD:C9:79:0E:EC E1:41:0A:E5:F8:C4 1 230
103 15:32:26.323920 802.11 Probe Rsp B8:62:1F:16:43:83 C8:DD:C9:79:0E:EC B8:62:1F:16:43:83 1 249
104 15:32:26.335498 802.11 Probe Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 239
105 15:32:26.338001 802.11 Probe Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 239
106 15:32:26.373521 802.11 Probe Req C8:DD:C9:79:0E:EC Ethernet Broadcast Ethernet Broadcast 1 200
107 15:32:26.375528 802.11 Probe Req C8:DD:C9:79:0E:EC Ethernet Broadcast Ethernet Broadcast 1 200
108 15:32:26.383633 802.11 Probe Rsp B8:62:1F:16:43:83 C8:DD:C9:79:0E:EC B8:62:1F:16:43:83 1 249
109 15:32:26.384533 802.11 Probe Rsp B8:62:1F:16:43:82 C8:DD:C9:79:0E:EC B8:62:1F:16:43:82 1 230
110 15:32:26.388492 802.11 Probe Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 239
111 15:32:26.390999 802.11 Probe Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 239
112 15:32:26.393247 802.11 Probe Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 239
113 15:32:26.915858 802.11 Auth C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 1 34
114 15:32:26.916607 802.11 Auth C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 1 34
115 15:32:26.916836 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  1 14
116 15:32:26.917500 802.11 Auth CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 34
117 15:32:26.918351 802.11 Auth CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 34
118 15:32:26.922252 802.11 Assoc Req C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 1 127
119 15:32:26.922488 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  1 14
120 15:32:26.928873 802.11 Assoc Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 191
121 15:32:26.937281 EAPOL-Key CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 1 137
122 15:32:26.939998 EAPOL-Key C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 1 159
123 15:32:26.940023 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  1 14
124 15:32:26.945747 EAPOL-Key C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 1 137
125 15:32:27.082251 802.11 Encrypted Data C8:DD:C9:79:0E:EC Ethernet Broadcast CA:DD:C9:F2:0F:C3 1 387
126 15:32:27.082276 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  1 14

主要协议字段

Probe Request: 

WPS

  Element ID:          221 WPS [38]

  Length:              136 [39]

  OUI:                 0x00-0x50-0xF2 Microsoft [40-42]

  OUI Type:            4 Wi-Fi Protected Setup [43]

  Version:             0x10 1.0 [48]

  Request Type:        0x01 Enrollee, Open 802.1X [53]

  Config Methods:      0x4388 [58-59]

  UUID-E:              0x6222D8D894655485A207B57CDE4A5C1A [64-79]

  Primary Device Type

  Category:             10  Telephone  [84-85]

  OUI:                 0x00-0x50-0xF2-0x04 [86-89]

  Sub Category ID:     5 [90-91]

 

  RF Bands:            0x01 2.4GHz [96]

  Association State:   0x0000 Not Associated [101-102]

  Configuration Error: 0 No Error [107-108]

  Device Password ID:  0x0004 PushButton [113-114]

  Manufacturer:        LENOVO [119-124]

  Model Name:          Lenovo S960 [129-139]

  Model Number:        Lenovo S960 [144-154]

  Device Name:         S960 [159-162]

  Vendor Extension:    0x00372A000120030101 [167-175]

 

 

 Beacon/Probe Response

WPS

  Element ID:          221 WPS [174]

  Length:              80 [175]

  OUI:                 0x00-0x50-0xF2 Microsoft [176-178]

  OUI Type:            4 Wi-Fi Protected Setup [179]

  Version:             0x10 1.0 [184]

  Wi-Fi Protected Setup:2 Configured [189]

  Selected Registrar:  1 True [194]

  Device Password ID:  0x0004 PushButton [199-200]

  Selected Reg. CM:    0x2388 [205-206]

  Vendor Extension:    0x00372A0001200106FFFFFFFFFFFF [211-224]

  Device Name:         Wireless Client [229-243]

  Primary Device Type

  Category:             10  Telephone  [248-249]

  OUI:                 0x00-0x50-0xF2-0x04 [250-253]

  Sub Category ID:     5 [254-255]

 

 

 WSC_MSG-M1

802.1x Authentication

  Protocol Version:    1 [30]

  Packet Type:         0 EAP - Packet [31]

  Body Length:         419 [32-33]

Extensible Authentication Protocol

  Code:                2 Response [34]

  Identifier:          166 [35]

  Length:              419 [36-37]

  Type:                254 Wi-Fi Protected Setup [38]

Wi-Fi Protected Setup

  Vendor ID:           0x00372A [39-41]

  Vendor Type:         0x00000001 [42-45]

  Op-Code:             0x04 WSC_MSG [46]

  Flags:               0x00 [47]

 

  Version:             0x10 1.0 [52]

  Message Type:        0x04 M1 [57]

  UUID-E:              0x6222D8D894655485A207B57CDE4A5C1A [62-77]

  MAC Address:         0xC8DDC9790EEC [82-87]

  Enrollee Nonce:      0x3EF220721A9CE6E4C2E6D76C519926A3 [92-107]

  Public Key:          0x1D42E073AF873E9A14CD19AC5419061728B5F8BF21D12C6E5D9633223BA14FDC9960978E8A7D8AF736C67E3236FD2DF33A179C316FFB79745E3CD15CB76B08BADD323189456C64607D5BAD891219A4542DC55B95A45BA773AD81468B8FA42E2EB731DDCD9F275D424822DD879565EB1808D301139396BE956E26C8C0692E879766E83EDD1E24330E31FE17848B5922C5FCEEE51C248EF78E47CF2B05BF820A48C3A0E9E1B51C850E21FD22F9A063CEA51C43DF4A435B12702AC8CA354B4A3F7F [112-303]

  Auth. Type Flags:    0x0021 [308-309]

  Encryption Type Flags:0x0009 [314-315]

  Connection Type Flags:0x01 ESS [320]

  Config Methods:      0x4388 [325-326]

  Wi-Fi Protected Setup:1 Unconfigured [331]

  Manufacturer:        LENOVO [336-341]

  Model Name:          Lenovo S960 [346-356]

  Model Number:        Lenovo S960 [361-371]

  Serial Number:       0123456789ABCDEF [376-391]

  Primary Device Type

  Category:             10  Telephone  [396-397]

  OUI:                 0x00-0x50-0xF2-0x04 [398-401]

  Sub Category ID:     5 [402-403]

 

  Device Name:         S960 [408-411]

  RF Bands:            0x01 2.4GHz [416]

  Association State:   0x0000 Not Associated [421-422]

  Device Password ID:  0x0004 PushButton [427-428]

  Configuration Error: 0 No Error [433-434]

  OS Version:          0x81020300 [439-442]

  Vendor Extension:    0x00372A000120 [447-452]

 

主要配置文件

 

root@android:/data/misc/wifi # cat wpa_supplicant.conf
cat wpa_supplicant.conf
ctrl_interface=/data/misc/wpa_supplicant
update_config=1
device_name=S960
manufacturer=LENOVO
model_name=Lenovo S960
model_number=Lenovo S960
serial_number=0123456789ABCDEF
device_type=10-0050F204-5
os_version=01020300
config_methods=physical_display virtual_push_button keypad

network={
        ssid="Lenovo S820 wps"
        psk="7d20b98fabfe"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        auth_alg=OPEN
}

 

 主要代码
static enum wps_process_res wps_process_wsc_msg(struct wps_data *wps,
                        const struct wpabuf *msg)
{
    struct wps_parse_attr attr;
    enum wps_process_res ret = WPS_CONTINUE;

    wpa_printf(MSG_DEBUG, "WPS: Received WSC_MSG");

    if (wps_parse_msg(msg, &attr) < 0)
        return WPS_FAILURE;

    if (attr.enrollee_nonce == NULL ||
        os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN) != 0) {
        wpa_printf(MSG_DEBUG, "WPS: Mismatch in enrollee nonce");
        return WPS_FAILURE;
    }

    if (attr.msg_type == NULL) {
        wpa_printf(MSG_DEBUG, "WPS: No Message Type attribute");
        wps->state = SEND_WSC_NACK;
        return WPS_CONTINUE;
    }

    switch (*attr.msg_type) {
    case WPS_M2:
        if (wps_validate_m2(msg) < 0)
            return WPS_FAILURE;
        ret = wps_process_m2(wps, msg, &attr);
        break;
    case WPS_M2D:
        if (wps_validate_m2d(msg) < 0)
            return WPS_FAILURE;
        ret = wps_process_m2d(wps, &attr);
        break;
    case WPS_M4:
        if (wps_validate_m4(msg) < 0)
            return WPS_FAILURE;
        ret = wps_process_m4(wps, msg, &attr);
        if (ret == WPS_FAILURE || wps->state == SEND_WSC_NACK)
            wps_fail_event(wps->wps, WPS_M4, wps->config_error,
                       wps->error_indication);
        break;
    case WPS_M6:
        if (wps_validate_m6(msg) < 0)
            return WPS_FAILURE;
        ret = wps_process_m6(wps, msg, &attr);
        if (ret == WPS_FAILURE || wps->state == SEND_WSC_NACK)
            wps_fail_event(wps->wps, WPS_M6, wps->config_error,
                       wps->error_indication);
        break;
    case WPS_M8:
        if (wps_validate_m8(msg) < 0)
            return WPS_FAILURE;
        ret = wps_process_m8(wps, msg, &attr);
        if (ret == WPS_FAILURE || wps->state == SEND_WSC_NACK)
            wps_fail_event(wps->wps, WPS_M8, wps->config_error,
                       wps->error_indication);
        break;
    default:
        wpa_printf(MSG_DEBUG, "WPS: Unsupported Message Type %d",
               *attr.msg_type);
        return WPS_FAILURE;
    }

    /*
     * Save a copy of the last message for Authenticator derivation if we
     * are continuing. However, skip M2D since it is not authenticated and
     * neither is the ACK/NACK response frame. This allows the possibly
     * following M2 to be processed correctly by using the previously sent
     * M1 in Authenticator derivation.
     */
    if (ret == WPS_CONTINUE && *attr.msg_type != WPS_M2D) {
        /* Save a copy of the last message for Authenticator derivation
         */
        wpabuf_free(wps->last_msg);
        wps->last_msg = wpabuf_dup(msg);
    }

    return ret;
} 


 

 

 

struct wpabuf * wps_enrollee_get_msg(struct wps_data *wps,
         enum wsc_op_code *op_code)
{
 struct wpabuf *msg;

 switch (wps->state) {
 case SEND_M1:
  msg = wps_build_m1(wps);
  *op_code = WSC_MSG;
  break;
 case SEND_M3:
  msg = wps_build_m3(wps);
  *op_code = WSC_MSG;
  break;
 case SEND_M5:
  msg = wps_build_m5(wps);
  *op_code = WSC_MSG;
  break;
 case SEND_M7:
  msg = wps_build_m7(wps);
  *op_code = WSC_MSG;
  break;
 case RECEIVED_M2D:
  if (wps->wps->ap) {
   msg = wps_build_wsc_nack(wps);
   *op_code = WSC_NACK;
   break;
  }
  msg = wps_build_wsc_ack(wps);
  *op_code = WSC_ACK;
  if (msg) {
   /* Another M2/M2D may be received */
   wps->state = RECV_M2;
  }
  break;
 case SEND_WSC_NACK:
  msg = wps_build_wsc_nack(wps);
  *op_code = WSC_NACK;
  break;
 case WPS_MSG_DONE:
  msg = wps_build_wsc_done(wps);
  *op_code = WSC_Done;
  break;
 default:
  wpa_printf(MSG_DEBUG, "WPS: Unsupported state %d for building "
      "a message", wps->state);
  msg = NULL;
  break;
 }

 if (*op_code == WSC_MSG && msg) {
  /* Save a copy of the last message for Authenticator derivation
   */
  wpabuf_free(wps->last_msg);
  wps->last_msg = wpabuf_dup(msg);
 }

 return msg;
}



 

 android主要log

75 15:32:25.632523 0.002491 802.11 Probe Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 264
76 15:32:25.639253 0.006730 802.11 Probe Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 264
77 15:32:25.858500 0.219247 802.11 Auth C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 34
78 15:32:25.858753 0.000253 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  14
79 15:32:25.859620 0.000867 802.11 Auth CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 34
80 15:32:25.861501 0.001881 802.11 Assoc Req C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 131
81 15:32:25.861880 0.000379 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  14
82 15:32:25.865377 0.003497 802.11 Assoc Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 216
83 15:32:25.871280 0.005903 EAP Request CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 47
84 15:32:25.874355 0.003075 EAP Response C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 76
85 15:32:25.874370 0.000015 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  14
86 15:32:25.875537 0.001167 EAP Request CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 56
87 15:32:25.944004 0.068467 EAP Response C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 461
88 15:32:25.944029 0.000025 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  14
89 15:32:26.078533 0.134504 EAP Request CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 482
90 15:32:26.167152 0.088619 EAP Request CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 248
91 15:32:26.172642 0.005490 EAP Response C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 176
92 15:32:26.172664 0.000022 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  14
93 15:32:26.179528 0.006864 EAP Request CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 176
94 15:32:26.293277 0.113749 EAP Response C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 116
95 15:32:26.293304 0.000027 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  14
96 15:32:26.299559 0.006255 EAP Failure CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 46
97 15:32:26.302169 0.002610 802.11 Deauth C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 30
98 15:32:26.302530 0.000361 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  14
99 15:32:26.309744 0.007214 802.11 Probe Req C8:DD:C9:79:0E:EC Ethernet Broadcast Ethernet Broadcast 200
100 15:32:26.311514 0.001770 802.11 Probe Req C8:DD:C9:79:0E:EC Ethernet Broadcast Ethernet Broadcast 200
101 15:32:26.313624 0.002110 802.11 Probe Rsp 00:1F:64:E7:97:12 C8:DD:C9:79:0E:EC 00:1F:64:E7:97:12 233
102 15:32:26.323293 0.009669 802.11 Probe Rsp B8:32:2E:59:D3:08 C8:DD:C9:79:0E:EC E1:41:0A:E5:F8:C4 230
103 15:32:26.323920 0.000627 802.11 Probe Rsp B8:62:1F:16:43:83 C8:DD:C9:79:0E:EC B8:62:1F:16:43:83 249
104 15:32:26.335498 0.011578 802.11 Probe Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 239
105 15:32:26.338001 0.002503 802.11 Probe Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 239
106 15:32:26.373521 0.035520 802.11 Probe Req C8:DD:C9:79:0E:EC Ethernet Broadcast Ethernet Broadcast 200
107 15:32:26.375528 0.002007 802.11 Probe Req C8:DD:C9:79:0E:EC Ethernet Broadcast Ethernet Broadcast 200
108 15:32:26.383633 0.008105 802.11 Probe Rsp B8:62:1F:16:43:83 C8:DD:C9:79:0E:EC B8:62:1F:16:43:83 249
109 15:32:26.384533 0.000900 802.11 Probe Rsp B8:62:1F:16:43:82 C8:DD:C9:79:0E:EC B8:62:1F:16:43:82 230
110 15:32:26.388492 0.003959 802.11 Probe Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 239
111 15:32:26.390999 0.002507 802.11 Probe Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 239
112 15:32:26.393247 0.002248 802.11 Probe Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 239
113 15:32:26.915858 0.522611 802.11 Auth C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 34
114 15:32:26.916607 0.000749 802.11 Auth C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 34
115 15:32:26.916836 0.000229 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  14
116 15:32:26.917500 0.000664 802.11 Auth CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 34
117 15:32:26.918351 0.000851 802.11 Auth CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 34
118 15:32:26.922252 0.003901 802.11 Assoc Req C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 127
119 15:32:26.922488 0.000236 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  14
120 15:32:26.928873 0.006385 802.11 Assoc Rsp CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 191
121 15:32:26.937281 0.008408 802.1x CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 137
122 15:32:26.939998 0.002717 EAPOL-Key C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 159
123 15:32:26.940023 0.000025 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  14
124 15:32:26.945747 0.005724 EAPOL-Key C8:DD:C9:79:0E:EC CA:DD:C9:F2:0F:C3 CA:DD:C9:F2:0F:C3 137
125 15:32:27.082251 0.136504 802.11 TKIP Data C8:DD:C9:79:0E:EC Ethernet Broadcast CA:DD:C9:F2:0F:C3 387
126 15:32:27.082276 0.000025 802.11 Ack CA:DD:C9:F2:0F:C3 C8:DD:C9:79:0E:EC  14
127 15:32:27.402123 0.319847 802.11 TKIP Data C8:DD:C9:79:0E:EC 33:33:FF:79:0E:EC CA:DD:C9:F2:0F:C3 118

 

 

61649 10-01 15:17:01.185 16014 16014 D wpa_supplicant: WPS:Building WPS IE for Probe Request
 61650 10-01 15:17:01.185 16014 16014 D wpa_supplicant: WPS:  * Version (hardcoded 0x10)
 61651 10-01 15:17:01.185 16014 16014 D wpa_supplicant: WPS:  * Request Type
 61652 10-01 15:17:01.185 16014 16014 D wpa_supplicant: WPS:  * Config Methods (4388)
 61653 10-01 15:17:01.186 16014 16014 D wpa_supplicant: WPS:  * UUID-E
 61654 10-01 15:17:01.186 16014 16014 D wpa_supplicant: WPS:  * Primary Device Type
 61655 10-01 15:17:01.186 16014 16014 D wpa_supplicant: WPS:  * RF Bands (1)
 61656 10-01 15:17:01.186 16014 16014 D wpa_supplicant: WPS:  * Association State
 61657 10-01 15:17:01.186 16014 16014 D wpa_supplicant: WPS:  * Configuration Error (0)
 61658 10-01 15:17:01.186 16014 16014 D wpa_supplicant: WPS:  * Device Password ID (4)
 61659 10-01 15:17:01.186 16014 16014 D wpa_supplicant: WPS:  * Manufacturer
 61660 10-01 15:17:01.186 16014 16014 D wpa_supplicant: WPS:  * Model Name
 61661 10-01 15:17:01.186 16014 16014 D wpa_supplicant: WPS:  * Model Number
 61662 10-01 15:17:01.186 16014 16014 D wpa_supplicant: WPS:  * Device Name
 61663 10-01 15:17:01.186 16014 16014 D wpa_supplicant: WPS:  * Version2 (0x20)
 61664 10-01 15:17:01.186 16014 16014 D wpa_supplicant: WPS:  * Request to Enroll (1)
 61725 10-01 15:17:01.945 16014 16014 D wpa_supplicant: wlan0: WPS: Order scan results with WPS provisioning rules
 61726 10-01 15:17:01.945 16014 16014 E wpa_supplicant: WPS: WFA subelement id=0 len=1
 61727 10-01 15:17:01.945 16014 16014 E wpa_supplicant: WPS: WFA subelement id=1 len=6
 61728 10-01 15:17:01.945 16014 16014 E wpa_supplicant: WPS: WFA subelement id=0 len=1
 61729 10-01 15:17:01.946 16014 16014 E wpa_supplicant: WPS: WFA subelement id=1 len=6
 61730 10-01 15:17:01.946 16014 16014 E wpa_supplicant: WPS: WFA subelement id=0 len=1
 61731 10-01 15:17:01.946 16014 16014 E wpa_supplicant: WPS: WFA subelement id=1 len=6
 61768 10-01 15:17:01.947 16014 16014 E wpa_supplicant: WPS: WFA subelement id=0 len=1
 61769 10-01 15:17:01.947 16014 16014 E wpa_supplicant: WPS: WFA subelement id=1 len=6
 61770 10-01 15:17:01.947 16014 16014 E wpa_supplicant: WPS: WFA subelement id=0 len=1
 61771 10-01 15:17:01.947 16014 16014 E wpa_supplicant: WPS: WFA subelement id=1 len=6
 61772 10-01 15:17:01.947 16014 16014 D wpa_supplicant: WPS: AP ca:dd:c9:f2:0f:c3 changed type 0 -> 1
 61773 10-01 15:17:01.947 16014 16014 D wpa_supplicant: WPS: AP f4:ec:38:5a:45:ae type 0 added
 61821 10-01 15:17:01.949 16014 16014 E wpa_supplicant: WPS: WFA subelement id=0 len=1
 61822 10-01 15:17:01.949 16014 16014 E wpa_supplicant: WPS: WFA subelement id=1 len=6
 61823 10-01 15:17:01.949 16014 16014 E wpa_supplicant: WPS: WFA subelement id=0 len=1
 61824 10-01 15:17:01.949 16014 16014 E wpa_supplicant: WPS: WFA subelement id=1 len=6
 61827 10-01 15:17:01.949 16014 16014 D wpa_supplicant: WPS: Check whether PBC session overlap is present in scan results; selected BSSID ca:dd:c9:f2:0f:c3
 61828 10-01 15:17:01.949 16014 16014 E wpa_supplicant: WPS: WFA subelement id=0 len=1
 61829 10-01 15:17:01.949 16014 16014 E wpa_supplicant: WPS: WFA subelement id=1 len=6
 61849 10-01 15:17:01.964 16014 16014 D wpa_supplicant: WPS: Building WPS IE for (Re)Association Request
 61850 10-01 15:17:01.964 16014 16014 D wpa_supplicant: WPS:  * Version (hardcoded 0x10)
 61851 10-01 15:17:01.964 16014 16014 D wpa_supplicant: WPS:  * Request Type
 61852 10-01 15:17:01.964 16014 16014 D wpa_supplicant: WPS:  * Version2 (0x20)
 61913 10-01 15:17:01.978 16014 16014 E wpa_supplicant: WPS: WFA subelement id=0 len=1
 61914 10-01 15:17:01.978 16014 16014 E wpa_supplicant: WPS: WFA subelement id=1 len=6
 62021 10-01 15:17:01.987 16014 16014 D wpa_supplicant: WPS: Building Message M1
 62022 10-01 15:17:01.987 16014 16014 D wpa_supplicant: WPS:  * Version (hardcoded 0x10)
 62023 10-01 15:17:01.987 16014 16014 D wpa_supplicant: WPS:  * Message Type (4)
 62024 10-01 15:17:01.987 16014 16014 D wpa_supplicant: WPS:  * UUID-E
 62025 10-01 15:17:01.987 16014 16014 D wpa_supplicant: WPS:  * MAC Address
 62026 10-01 15:17:01.987 16014 16014 D wpa_supplicant: WPS:  * Enrollee Nonce
 62027 10-01 15:17:01.987 16014 16014 D wpa_supplicant: WPS:  * Public Key
 62028 10-01 15:17:01.987 16014 16014 D wpa_supplicant: WPS: Generate new DH keys
 62267 10-01 15:17:02.071 16014 16014 D wpa_supplicant: WPS:  * Authentication Type Flags
 62268 10-01 15:17:02.071 16014 16014 D wpa_supplicant: WPS:  * Encryption Type Flags
 62269 10-01 15:17:02.071 16014 16014 D wpa_supplicant: WPS:  * Connection Type Flags
 62270 10-01 15:17:02.071 16014 16014 D wpa_supplicant: WPS:  * Config Methods (4388)
 62271 10-01 15:17:02.071 16014 16014 D wpa_supplicant: WPS:  * Wi-Fi Protected Setup State (1)
 62272 10-01 15:17:02.071 16014 16014 D wpa_supplicant: WPS:  * Manufacturer
 62273 10-01 15:17:02.071 16014 16014 D wpa_supplicant: WPS:  * Model Name
 62274 10-01 15:17:02.072 16014 16014 D wpa_supplicant: WPS:  * Model Number
 62275 10-01 15:17:02.072 16014 16014 D wpa_supplicant: WPS:  * Serial Number
 62276 10-01 15:17:02.072 16014 16014 D wpa_supplicant: WPS:  * Primary Device Type
 62277 10-01 15:17:02.072 16014 16014 D wpa_supplicant: WPS:  * Device Name
 62278 10-01 15:17:02.072 16014 16014 D wpa_supplicant: WPS:  * RF Bands (1)
 62279 10-01 15:17:02.072 16014 16014 D wpa_supplicant: WPS:  * Association State
 62280 10-01 15:17:02.072 16014 16014 D wpa_supplicant: WPS:  * Device Password ID (4)
 62281 10-01 15:17:02.072 16014 16014 D wpa_supplicant: WPS:  * Configuration Error (0)
 62282 10-01 15:17:02.072 16014 16014 D wpa_supplicant: WPS:  * OS Version
 62283 10-01 15:17:02.072 16014 16014 D wpa_supplicant: WPS:  * Version2 (0x20)
 62590 10-01 15:17:02.205 16014 16014 D wpa_supplicant: WPS: Processing received message (len=426 op_code=4)
 62591 10-01 15:17:02.205 16014 16014 D wpa_supplicant: WPS: Received WSC_MSG
 62592 10-01 15:17:02.205 16014 16014 E wpa_supplicant: WPS: WFA subelement id=0 len=1
 62593 10-01 15:17:02.205 16014 16014 D wpa_supplicant: WPS: Received M2
 62595 10-01 15:17:02.251 16014 16014 D wpa_supplicant: WPS: Primary Device Type: 10-0050F204-5
 62597 10-01 15:17:02.251 16014 16014 D wpa_supplicant: WPS: Building Message M3
 62598 10-01 15:17:02.251 16014 16014 D wpa_supplicant: WPS:  * Version (hardcoded 0x10)
 62599 10-01 15:17:02.251 16014 16014 D wpa_supplicant: WPS:  * Message Type (7)
 62600 10-01 15:17:02.252 16014 16014 D wpa_supplicant: WPS:  * Registrar Nonce
 62601 10-01 15:17:02.253 16014 16014 D wpa_supplicant: WPS:  * E-Hash1
 62602 10-01 15:17:02.254 16014 16014 D wpa_supplicant: WPS:  * E-Hash2
 62603 10-01 15:17:02.254 16014 16014 D wpa_supplicant: WPS:  * Version2 (0x20)
 62604 10-01 15:17:02.254 16014 16014 D wpa_supplicant: WPS:  * Authenticator
 62625 10-01 15:17:02.263 16014 16014 D wpa_supplicant: WPS: Processing received message (len=192 op_code=4)
 62626 10-01 15:17:02.263 16014 16014 D wpa_supplicant: WPS: Received WSC_MSG
 62627 10-01 15:17:02.263 16014 16014 E wpa_supplicant: WPS: WFA subelement id=0 len=1
 62628 10-01 15:17:02.263 16014 16014 D wpa_supplicant: WPS: Received M4
 62629 10-01 15:17:02.263 16014 16014 D wpa_supplicant: WPS: Processing decrypted Encrypted Settings attribute
 62630 10-01 15:17:02.263 16014 16014 D wpa_supplicant: WPS: Registrar proved knowledge of thefirst half of the device password
 62632 10-01 15:17:02.263 16014 16014 D wpa_supplicant: WPS: Building Message M5
 62633 10-01 15:17:02.263 16014 16014 D wpa_supplicant: WPS:  * Version (hardcoded 0x10)
 62634 10-01 15:17:02.263 16014 16014 D wpa_supplicant: WPS:  * Message Type (9)
 62635 10-01 15:17:02.264 16014 16014 D wpa_supplicant: WPS:  * Registrar Nonce
 62636 10-01 15:17:02.264 16014 16014 D wpa_supplicant: WPS:  * E-SNonce1
 62637 10-01 15:17:02.264 16014 16014 D wpa_supplicant: WPS:  * Key Wrap Authenticator
 62638 10-01 15:17:02.264 16014 16014 D wpa_supplicant: WPS:  * Encrypted Settings
 62639 10-01 15:17:02.266 16014 16014 D wpa_supplicant: WPS:  * Version2 (0x20)
 62640 10-01 15:17:02.266 16014 16014 D wpa_supplicant: WPS:  * Authenticator
 62660 10-01 15:17:02.271 16014 16014 D wpa_supplicant: WPS: Processing received message (len=120 op_code=4)
 62661 10-01 15:17:02.271 16014 16014 D wpa_supplicant: WPS: Received WSC_MSG
 62662 10-01 15:17:02.271 16014 16014 E wpa_supplicant: WPS: WFA subelement id=0 len=1
 62663 10-01 15:17:02.271 16014 16014 D wpa_supplicant: WPS: Received M6
 62664 10-01 15:17:02.272 16014 16014 D wpa_supplicant: WPS: Processing decrypted Encrypted Settings attribute
 62665 10-01 15:17:02.272 16014 16014 D wpa_supplicant: WPS: Registrar proved knowledge of thesecond half of the device password
 62667 10-01 15:17:02.272 16014 16014 D wpa_supplicant: WPS: Building Message M7
 62668 10-01 15:17:02.272 16014 16014 D wpa_supplicant: WPS:  * Version (hardcoded 0x10)
 62669 10-01 15:17:02.272 16014 16014 D wpa_supplicant: WPS:  * Message Type (11)
 62670 10-01 15:17:02.272 16014 16014 D wpa_supplicant: WPS:  * Registrar Nonce
 62671 10-01 15:17:02.272 16014 16014 D wpa_supplicant: WPS:  * E-SNonce2
 62672 10-01 15:17:02.272 16014 16014 D wpa_supplicant: WPS:  * Key Wrap Authenticator
 62673 10-01 15:17:02.272 16014 16014 D wpa_supplicant: WPS:  * Encrypted Settings
 62674 10-01 15:17:02.274 16014 16014 D wpa_supplicant: WPS:  * Version2 (0x20)
 62675 10-01 15:17:02.274 16014 16014 D wpa_supplicant: WPS:  * Authenticator
 62695 10-01 15:17:02.280 16014 16014 D wpa_supplicant: WPS: Processing received message (len=152 op_code=4)
 62696 10-01 15:17:02.280 16014 16014 D wpa_supplicant: WPS: Received WSC_MSG
 62697 10-01 15:17:02.280 16014 16014 E wpa_supplicant: WPS: WFA subelement id=0 len=1
 62698 10-01 15:17:02.280 16014 16014 D wpa_supplicant: WPS: Received M8
 62699 10-01 15:17:02.280 16014 16014 D wpa_supplicant: WPS: Processing decrypted Encrypted Settings attribute
 62700 10-01 15:17:02.280 16014 16014 D wpa_supplicant: WPS: Received Credential
 62701 10-01 15:17:02.280 16014 16014 D wpa_supplicant: WPS: Process Credential
 62702 10-01 15:17:02.280 16014 16014 D wpa_supplicant: WPS: Network Index: 1
 62703 10-01 15:17:02.281 16014 16014 D wpa_supplicant: WPS: Authentication Type: 0x20
 62704 10-01 15:17:02.281 16014 16014 D wpa_supplicant: WPS: Encryption Type: 0x8
 62705 10-01 15:17:02.281 16014 16014 D wpa_supplicant: WPS: MAC Address c8:dd:c9:79:0e:ec
 62708 10-01 15:17:02.281 16014 16014 D wpa_supplicant: WPS: Authentication Type 0x20
 62709 10-01 15:17:02.281 16014 16014 D wpa_supplicant: WPS: Encryption Type 0x8
 62710 10-01 15:17:02.281 16014 16014 D wpa_supplicant: WPS: Network Key Index 0
 62711 10-01 15:17:02.281 16014 16014 D wpa_supplicant: WPS: MAC Address c8:dd:c9:79:0e:ec
 62712 10-01 15:17:02.281 16014 16014 D wpa_supplicant: WPS: Replace WPS network block based on the received credential
 62717 10-01 15:17:02.375 16014 16014 D wpa_supplicant: WPS: The AP was not found from BSS table - use credential as-is
 62721 10-01 15:17:02.383 16014 16014 D wpa_supplicant: WPS: Building Message WSC_Done
 62722 10-01 15:17:02.383 16014 16014 D wpa_supplicant: WPS:  * Version (hardcoded 0x10)
 62723 10-01 15:17:02.383 16014 16014 D wpa_supplicant: WPS:  * Message Type (15)
 62724 10-01 15:17:02.383 16014 16014 D wpa_supplicant: WPS:  * Enrollee Nonce
 62725 10-01 15:17:02.383 16014 16014 D wpa_supplicant: WPS:  * Registrar Nonce
 62726 10-01 15:17:02.383 16014 16014 D wpa_supplicant: WPS:  * Version2 (0x20)
 62857 10-01 15:17:02.397 16014 16014 D wpa_supplicant: WPS: Network configuration replaced - try to associate with the received credential (freq=2412)
 62918 10-01 15:17:02.403 16014 16014 D wpa_supplicant: wlan0: WPS: Scan only frequency 2412 MHz that was used during provisioning


    
[2] 仿zaker用手向上促进的效果(推动门效果)
    来源: 互联网  发布时间: 2014-02-18
仿zaker用手向上推动的效果(推动门效果)


       本文manymore13原创,转载请标明出处 http://blog.csdn.net/manymore13/article/details/12219687

     最近在商店下载了zaker ,闲暇时拿来看看新闻!发现每次打开软件进入主界面时有个界面,需要你把它往上滑到一

定距离才能进入到主界面。每次进入软件时它的背景可能不一样,在往上拨的时候你会看见主界面,好似向上推的门一样!

打开它你就可以看到外面的世界。与窗帘有点不同的是在你没有拉开足够距离时,它会俏皮的关闭自己不让你看到外面的美景。

      说这么多想像起来挺模糊的,那让我们看看实际效果图,我现在打开zaker截两张图 如下所示 

              

     左边一张是不做任何操作时的效果,右边一张是界面跟着手往上滑的效果,在滑的时候你会发现即将进入的界面,当你没有滑到一定的距离松开手后窗帘会慢慢关闭,在合闭的时候有个弹动的效果。非常棒!

正如你看到的图片内容,今天是国庆节,在这里祝大家节日快乐!所以你每次打开的时候图片可能不一样。这个效果看起来有点像android里面讲的TranslateAnimation动画,我觉得用Animation动画应该很难实现出这种效果(当然有用animation实现zaker这种效果的大牛可以与我们分享下)。QQ里也有这么个功能的界面,只不过QQ的是展示一张图片两到三秒后再进入主界面。

    下面开始实现这种效果 推动们效果。

    根据效果我实现出一个类,方便与需要用的筒靴使用。代码中有注释

package com.manymore13.scrollerdemo;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.BounceInterpolator;
import android.view.animation.Interpolator;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.Scroller;

public class PullDoorView extends RelativeLayout {

	private Context mContext;

	private Scroller mScroller;

	private int mScreenWidth = 0;

	private int mScreenHeigh = 0;

	private int mLastDownY = 0;

	private int mCurryY;

	private int mDelY;

	private boolean mCloseFlag = false;

	private ImageView mImgView;

	public PullDoorView(Context context) {
		super(context);
		mContext = context;
		setupView();
	}

	public PullDoorView(Context context, AttributeSet attrs) {
		super(context, attrs);
		mContext = context;
		setupView();
	}

	@SuppressLint("NewApi")
	private void setupView() {

		// 这个Interpolator你可以设置别的 我这里选择的是有弹跳效果的Interpolator
		Interpolator polator = new BounceInterpolator();
		mScroller = new Scroller(mContext, polator);

		// 获取屏幕分辨率
		WindowManager wm = (WindowManager) (mContext
				.getSystemService(Context.WINDOW_SERVICE));
		DisplayMetrics dm = new DisplayMetrics();
		wm.getDefaultDisplay().getMetrics(dm);
		mScreenHeigh = dm.heightPixels;
		mScreenWidth = dm.widthPixels;

		// 这里你一定要设置成透明背景,不然会影响你看到底层布局
		this.setBackgroundColor(Color.argb(0, 0, 0, 0));
		mImgView = new ImageView(mContext);
		mImgView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,
				LayoutParams.MATCH_PARENT));
		mImgView.setScaleType(ImageView.ScaleType.FIT_XY);// 填充整个屏幕
		mImgView.setImageResource(R.drawable.bg1); // 默认背景
		addView(mImgView);
	}

	// 设置推动门背景
	public void setBgImage(int id) {
		mImgView.setImageResource(id);
	}

	// 设置推动门背景
	public void setBgImage(Drawable drawable) {
		mImgView.setImageDrawable(drawable);
	}

	// 推动门的动画
	public void startBounceAnim(int startY, int dy, int duration) {
		mScroller.startScroll(0, startY, 0, dy, duration);
		invalidate();
	}

	@Override
	public boolean onTouchEvent(MotionEvent event) {
		int action = event.getAction();
		switch (action) {
		case MotionEvent.ACTION_DOWN:
			mLastDownY = (int) event.getY();
			System.err.println("ACTION_DOWN=" + mLastDownY);
			return true;
		case MotionEvent.ACTION_MOVE:
			mCurryY = (int) event.getY();
			System.err.println("ACTION_MOVE=" + mCurryY);
			mDelY = mCurryY - mLastDownY;
			// 只准上滑有效
			if (mDelY < 0) {
				scrollTo(0, -mDelY);
			}
			System.err.println("-------------  " + mDelY);

			break;
		case MotionEvent.ACTION_UP:
			mCurryY = (int) event.getY();
			mDelY = mCurryY - mLastDownY;
			if (mDelY < 0) {

				if (Math.abs(mDelY) > mScreenHeigh / 2) {

					// 向上滑动超过半个屏幕高的时候 开启向上消失动画
					startBounceAnim(this.getScrollY(), mScreenHeigh, 450);
					mCloseFlag = true;

				} else {
					// 向上滑动未超过半个屏幕高的时候 开启向下弹动动画
					startBounceAnim(this.getScrollY(), -this.getScrollY(), 1000);

				}
			}

			break;
		}
		return super.onTouchEvent(event);
	}

	@Override
	public void computeScroll() {

		if (mScroller.computeScrollOffset()) {
			scrollTo(mScroller.getCurrX(), mScroller.getCurrY());
			Log.i("scroller", "getCurrX()= " + mScroller.getCurrX()
					+ "     getCurrY()=" + mScroller.getCurrY()
					+ "  getFinalY() =  " + mScroller.getFinalY());
			// 不要忘记更新界面
			postInvalidate();
		} else {
			if (mCloseFlag) {
				this.setVisibility(View.GONE);
			}
		}
	}

}

View中的scrollTo函数,使View具有滚动效果,就像ListView一样,它的内容是可以滑动的,ViewGroup继承View,所以Relativelayout可以做到滑动效果,另外向下弹动效果是用到Scroller类,而在构造Scroller类时加入BounceInterpolator,你也可以加入别的插值器。其实Scroller只是一个辅助View滑动的一个类,帮助View存储滑动数据的类,当view滑动时,你可以从scroller中取出滑动数据,而真实滑动运动效果其实是利用scrollTo瞬间达到目的地,View结合scroller以及scroller就可以实现这种推动门的效果。

运行Demo程序 查看效果



上面的图片是模拟器上运行的截图,看起来有点卡。其实在真机上测试的很流畅。zaker的效果基本是这个样子。

如果你想使用这个类的话,想实现这种效果的话,那么请满足下面两个条件。

1. PullDoorView  match_parent占据全屏 像下面这样整个项目父ViewGroup可以用Framelayout 

2.PullDoorView 必须要放在界面的最上面 使其可以获取touch事件



<com.manymore13.scrollerdemo.PullDoorView
        android:id="@+id/myImage"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#ddd" >

        <Button
            android:id="@+id/btn_above"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="第二层" />

        <TextView
            android:id="@+id/tv_hint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="10dp"
            android:text="上滑可以进入首页"
            android:textColor="#ffffffff"
            android:textSize="18sp" />
    </com.manymore13.scrollerdemo.PullDoorView>

因为PullDoorView是一个RelativeLayout,所以你可以发挥自己的想象在里面添加任何View或者ViewGroup,上面XML中我添加了一个button和一个textView,我想这两个View你可以再上面的动态图片中应该看到了。另外PullDoorView可以根据需要更换背景图片

 你可以 PullDoorView.setBgImage(图片)

好了就写这么多,仿zaker用手向上推动的效果的实现到此为止。


    
[3] 【音频制作方法】《GRE 核心语汇 考法精析》
    来源: 互联网  发布时间: 2014-02-18
【音频制作方法】《GRE 核心词汇 考法精析》

近期有点脑抽,想考G,于是买了本单词书,大家都推荐的那本陈琦的《要你命3000》,由于备考时间紧,买了本便携版的,叫《GRE 核心词汇 考法精析》。买完了,就后悔了。居然是乱序版,看了3个list,没一个认识的.....

单词没记住几个,居然发现序言中所谓的乱序版本其实也并不是乱序,只是换了一种排序方法而已。例如,第一个list的前几个单词,coda mania cornucopia euphoria minutia sequela anathema enigma stigma,居然所有单词都是以a结尾,而且仔细看,发现把所有单词倒过来写,

则是 adoc ainam aipocunroc airohpue aitunim aleuqes amehtana amgine amgits。

居然:倒过来写的单词就是ascii升序排列!!!


想起之前背单词经验,单词记不住总得想个办法,做做音频吧,或许平时有事没事听听也能多熟悉点。于是,世界爆发了。

下面主要说说方法:

需要的资源:①单词语音库②要你命3000的excel

关于英语单词的语音库,网上都有的下载,这个在最近的博客中有提到。

关于要你命3000的excel,想必考G的应该都在网上找得到。

方法:第一,产生所有单词的倒过来写对应的单词,笔者采用基于excel的VB语言,直接在excel中操作。这一点,稍微学过C语言或者其他语言的人都不是大问题。
第二,对倒过来写的单词进行排序,根据那本单词书手动拆分成各个list。
第三,对于每个list生成音频

下面着重说第三步:
根据单词生成音频最核心的是音频合并方法,以及空白音频处理。有些软件这两点都能做到,但是用软件实现批量化不太可能。音频合并,找了很多,最有效的还是windows dos下的copy /b a.mp3+b.mp3 c.mp3命令,具体用法,google。使用这个方法合并音频不会出现卡音和短音等诡异的事情。传统的文件操作貌似也行,但是出现各种端音的问题就不好说。然后,每两个单词之间需要有时间间隔,这个脑残的人都会想到自己录一个就行,对,没错,但是自己录制的空白的音频文件大小非常大,一秒钟十几个k,一个单词发音才2k不到,想到这里我觉得还是自己做一个空白音频文件比较好。google mp3 的格式(MP3音频格式其实非常简单),然后用文件操作,把一个单词音频文件的主体发音部分给清除,保留头文件就是空白音了。这期间笔者用到了很多方法(mp3头文件解析,二进制分析,正则表达式字符串替换,文件合并)。然后最后一步就是批量合并。
这一步,方法非常多,笔者采用基于copy /b的批处理的方法,根据待合并单词,生成批处理命令。实现这一步需要稍微学学dos批处理的一些简单的命令。

总之,方法很多,有资源,发现可行性,就可以开始爆发了。
另外,分享了前8个list的音频,参考最近分享的资源。依据笔者的这套方法,托福、GMAT,生成各种单词的音频文件就不是难事。



    
最新技术文章:
▪Android开发之登录验证实例教程
▪Android开发之注册登录方法示例
▪Android获取手机SIM卡运营商信息的方法
▪Android实现将已发送的短信写入短信数据库的...
▪Android发送短信功能代码
▪Android根据电话号码获得联系人头像实例代码
▪Android中GPS定位的用法实例
▪Android实现退出时关闭所有Activity的方法
▪Android实现文件的分割和组装
▪Android录音应用实例教程
▪Android双击返回键退出程序的实现方法
▪Android实现侦听电池状态显示、电量及充电动...
▪Android获取当前已连接的wifi信号强度的方法
▪Android实现动态显示或隐藏密码输入框的内容
▪根据USER-AGENT判断手机类型并跳转到相应的app...
▪Android Touch事件分发过程详解
▪Android中实现为TextView添加多个可点击的文本
▪Android程序设计之AIDL实例详解
▪Android显式启动与隐式启动Activity的区别介绍
▪Android按钮单击事件的四种常用写法总结
▪Android消息处理机制Looper和Handler详解
▪Android实现Back功能代码片段总结
▪Android实用的代码片段 常用代码总结
▪Android实现弹出键盘的方法
▪Android中通过view方式获取当前Activity的屏幕截...
▪Android提高之自定义Menu(TabMenu)实现方法
▪Android提高之多方向抽屉实现方法
▪Android提高之MediaPlayer播放网络音频的实现方法...
▪Android提高之MediaPlayer播放网络视频的实现方法...
▪Android提高之手游转电视游戏的模拟操控
 


站内导航:


特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

©2012-2021,,E-mail:www_#163.com(请将#改为@)

浙ICP备11055608号-3