Friday, 27 February 2015

Nice to know

If AP's IP address is unknown, connect the ethernet cable from AP to PC and send the command:
                                        ping -b 255.255.255.255

AP will respond back.

root@pb16lap01u:/home/priya/# ping -b 255.255.255.255
WARNING: pinging broadcast address
PING 255.255.255.255 (255.255.255.255) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=2 ttl=255 time=0.402 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=255 time=0.444 ms
64 bytes from 192.168.1.1: icmp_req=4 ttl=255 time=0.382 ms



DHCP setup sequence in Cisco AP:
To open command line interface: telnet <AP's IP address> 9000
ap> en
password: (generally Cisco)
ap#conf t
ap(config)#service dhcp
ap(config)#ip dhcp pool meghna
ap(dhcp-config)#network 192.168.1.0 255.255.255.0
ap(dhcp-config)#lease infinite
 



How to unpatch a .patch file?
patch -p1 < hostapd_2.0_xxx.patch

How to set module parameter for kernel module during load time?

modprobe wil6210 rx_ring_order=8
This can be verified in /sys/module/wil6210/parameters/rx_ring_order


4 way handshake:
----------------

How to configure PTK and GTK rekeying? 
   For 30 mins timeout, in WLC configure the “Enable Session Timeout” in 1800

(or)

In hostpad.conf,
   wpa_group_rekey=600 (in seconds)
   wpa_ptk_rekey=600


> show pmk-cache all shows lifetime of the timers.

while running hostapd, if you get the error : nl80211: Could not configure driver mode


sudo nmcli nm wifi off
sudo rfkill unblock wlan

Installing toolchain
--------------------
Download tool chain
https://launchpad.net/gcc-arm-embedded/+download
Install:
cd /dir/in/which/tar/file/is/saved && tar xjf gcc-arm-none-eabi-*-yyyymmdd-mac.tar.bz2


which arm-none-eabi-gcc
should show something like:
/home/user/Desktop/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-gcc

Friday, 23 January 2015

P2P Provisioning


Purpose of provisioning is to get user credential (WPS PIN or PBC) for WPS procedure. P2P GO shall use the operating channel as indicated during GO negotiation.

When a P2P Device joins an existing P2P Group that it has not stored a credential for, it shall send a Provision Discovery Request frame with a single method set in the Config Methods attribute to indicate the desire to enroll in the network.

The Provision Discovery Request frame shall be sent to the P2P Device Address of the P2P Group Owner and on the operating channel of the P2P Group.

The P2P Group Owner may use this frame as a trigger that a device wants to enroll (maybe an indication can be shown to the user). A P2P Group Owner shall respond to a received Provision Discovery Request frame with a Provision Discovery Response frame.

Provision discovery request will have a single method set in the config methods  attribute to indicate the desire to enroll in the network.


Provision discovery response MAY have same method as in provision discovery request to indicate SUCCESS or shall be NULL to indicate failure.


Group formation bit in the P2P capability bitmap of the P2P capability attribute shall be set to 1 until provisioning succeeds.

On successful completion of provisioning P2P Group Owner shall set group formation bit is set to 0.

Thursday, 22 January 2015

Opportunistic power save in P2P

Opportunistic power save allows P2P Group Owner to save power when all its associated clients are sleeping.

P2P Power Management protocol defines an availability period, called the CTWindow(Client Traffic Window), during which a P2P Group Owner is present.  P2P Clients are allowed to transmit during CTWindow period. If at the end of the CTWindow all associated P2P Clients are sleeping, the P2P
Group Owner is allowed to sleep until the next Beacon time. However, if any P2P Client stays in active mode at the end of the CTWindow the P2P Group Owner is forced to remain awake
until the next Beacon time.

The P2P Group Owner is responsible for selecting an appropriate value for
CTWindow. The CTWindow shall be an integral number of TU and shall always
be less than the beacon interval. For a P2P Group Owner that desires to be
discoverable, the CTWindow should be at least 10 TU. A CTWindow shall start
at each TBTT and extend for the chosen duration.

Opportunistic power save:
The P2P  Group Owner shall indicate that Opportunistic Power Save is enabled by setting  the OppPS bit to 1 in the CTWindow and OppPS Parameters field of the Notice of Absence attribute in beacon.

With OppPS set to 1:




 If at the end of the CTWindow all associated P2P Clients are sleeping, the P2PGroup Owner is allowed to sleep until the next Beacon time. Here's a Null function set with
power management bit set to 1 to indicate that STA is going to sleep.


However, if any P2P Client stays in active mode at the end of the CTWindow the P2P Group Owner is forced to remain awake until the next Beacon time.