Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

TI-Android-JB-4.2.2-DevKit-4.1.1 WiFiDirectDemo

From Texas Instruments Wiki
Jump to: navigation, search
Construction Icon small.png This page is currently under construction. The content of this page is due to change quite frequently and thus the quality and accuracy are not guaranteed until this message has been removed. Please feel free to contribute to this page while construction is in progress.

Introduction

This Application Note demonstrates the Wi-Fi Direct feature of TI-Android-JB-4.2.2-DevKit-4.1.1 using the WiFiDirectDemo application provided with the Android SDK.

Prerequisites

The WiFiDirectDemo application is verified on AM335x EVM and AM335x Starter Kit running the TI-Android-JB-4.2.2-DevKit-4.1.1 prebuilt images. Please refer to TI-Android-JB-4.2.2-DevKit-4.1.1 UserGuide for more information on setting up the device.

IMPORTANT

The prebuilt images supplied with this DevKit release supports only WL12xx Wireless module on AM335x EVM and AM335x Starter Kit

For this demo, you need:

  • two AM335x EVMs (preferred) or Starter Kit devices
  • micro-USB cable to connect to host for adb

You can obtain the sources for WiFiDirectDemo application either by downloading the TI-Android-JB-4.2.2-DevKit-4.1.1 sources (described in TI-Android-JB-4.2.2-DevKit-4.1.1 DeveloperGuide or by installing the Android SDK on your Host.

Building and installing the WiFiDirectDemo application

Building from DevKit sources

The WiFiDirectDemo sources is at development/samples/WiFiDirectDemo/ in the TI-Android-JB-4.2.2-DevKit-4.1.1 sources.

Ensure that the build host is correctly setup for compiling the TI-Android-JB-4.2.2-DevKit-4.1.1 sources. Refer to the TI-Android-JB-4.2.2-DevKit-4.1.1 DeveloperGuide for details.

To build the application execute the following steps:

 $ cd <android source path>
 $ make TARGET_PRODUCT=<product-name> WiFiDirectDemo
Where <product-name> can be am335xevm or am335xevm_sk depending on the device you are using.

The compiled app is available at out/target/product/<product-name>/system/app/WiFiDirectDemo.apk

Building from Android SDK

Please refer to the Android SDK documentation for details. http://developer.android.com/tools/samples/index.html

Deploying the application

  • Boot both the AM335x boards running TI-Android-JB-4.2.2-DevKit-4.1.1 prebuilt images.
  • Verify that the two boards use different Wi-Fi MAC addresses. If both have the same MAC, please change the MAC for one of the boards. Refer User Guide for details.
  • Connect the micro-USB cable to the EVM and the host and install the WiFiDirectDemo application using the following command:
 $ adb install WiFiDirectDemo.apk
Install the same application on both the boards.

Using the WiFiDirectDemo application

Pairing

These steps need to be performed on both the AM335x devices.

  • Go to Settings->Wi-Fi. Click on Menu icon and select Wi-Fi Direct

See User Guide for detailed instructions

  • The other device is listed as an Available device under the Peer Devices list

Android-jb-wifidirect-peer.png

  • On any ONE of the device, tap on the device name to establish connection.
  • On the other device, a pop-up dialog appears to confirm the pairing connection

Android-jb-wifidirect-popup.png

  • Click Accept to establish pairing. Now you see a new entry under Remembered Groups for this connecction.

Android-jb-wifidirect-remembered.png

Starting WiFiDirectDemo

Android-jb-wifidirectdemo-app-icon.png Tap the WiFi Direct icon in the Apps drawer to start the application. This needs to be done on both the devices.

One of the devices is set up as server and the other as client.

The server app screen is shown below:

Android-jb-wifidirectdemo-app-server.png

The client app screen is as below:

Android-jb-wifidirectdemo-app-client.png

Data transfer using Wi-Fi Direct

  • Tap on Launch Gallery button on the client instance of the application. Select Gallery in the popup and tap Always to open the Gallery.

Android-jb-wifidirectdemo-app-client-gallery.png

  • Choose any picture to transfer by tapping on the thumbnail.
  • The server instance of the app will show the status as downloading file and then subsequently launch the Gallery to show the transferred picture.

Android-jb-wifidirectdemo-app-server-transfer.png

References