├── .classpath ├── .gitignore ├── .project ├── AndroidManifest.xml ├── README.md ├── assets └── sample_file.txt ├── project.properties ├── res ├── drawable-hdpi │ ├── ic_action_discover.png │ ├── ic_action_on_off.png │ ├── ic_launcher.png │ └── icon.png ├── drawable-ldpi │ ├── ic_action_discover.png │ ├── ic_action_on_off.png │ ├── ic_launcher.png │ └── icon.png ├── drawable-mdpi │ ├── ic_action_discover.png │ ├── ic_action_on_off.png │ ├── ic_launcher.png │ └── icon.png ├── drawable-xhdpi │ ├── ic_action_discover.png │ ├── ic_action_on_off.png │ └── ic_launcher.png ├── drawable │ ├── details_view.xml │ ├── machine.png │ └── section_header.xml ├── layout-land │ └── main.xml ├── layout-large │ └── main.xml ├── layout │ ├── device_detail.xml │ ├── device_list.xml │ ├── main.xml │ ├── message.xml │ ├── prompt_password.xml │ ├── row_devices.xml │ └── row_peers.xml ├── menu │ ├── action_items.xml │ └── message.xml ├── values-w820dp │ └── dimens.xml └── values │ ├── colors.xml │ ├── dimens.xml │ └── strings.xml └── src └── com └── ecse414 └── android └── echo ├── MessageActivity.java ├── WiFiDirectActivity.java ├── config └── Configuration.java ├── router ├── AllEncompasingP2PClient.java ├── MeshNetworkManager.java ├── Packet.java ├── Receiver.java ├── Sender.java └── tcp │ ├── TcpReciever.java │ └── TcpSender.java ├── ui ├── DeviceDetailFragment.java ├── DeviceListFragment.java └── PromptPasswordFragment.java └── wifi ├── WiFiBroadcastReceiver.java └── WiFiDirectBroadcastReceiver.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Echo 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 28 | 29 | 33 | 37 | android:launchMode="singleTask" > 38 | 39 | 40 | 41 | 42 | 43 | 44 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | echo 2 | ==== 3 | 4 | Android Mesh Networking Chat with WiFI-Direct 5 | 6 | Simply build and launch on a Wi-Fi Direct enabled device to become a GO. Open the Group Chat tab. To build, can import this eclipse project and Build As Android Application. 7 | 8 | To connect to the group and have P2P message passing, can use another Wi-Fi Direct enabled device and hit the search icon and then select the other device to connect to it. Or can launch the laptop client. See instructions on the laptop client for how to do that. 9 | 10 | Can get the Wi-Fi password and access point name (SSID) from the logs. 11 | -------------------------------------------------------------------------------- /assets/sample_file.txt: -------------------------------------------------------------------------------- 1 | This is a sample text file for wifi_direct demo. 2 | 3 | Once the devices are connected, the server i.e. groupOwner will listen for incoming connections and write this file. -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-20 15 | 16 | -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_action_discover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable-hdpi/ic_action_discover.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_action_on_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable-hdpi/ic_action_on_off.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /res/drawable-ldpi/ic_action_discover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable-ldpi/ic_action_discover.png -------------------------------------------------------------------------------- /res/drawable-ldpi/ic_action_on_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable-ldpi/ic_action_on_off.png -------------------------------------------------------------------------------- /res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_action_discover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable-mdpi/ic_action_discover.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_action_on_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable-mdpi/ic_action_on_off.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_action_discover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable-xhdpi/ic_action_discover.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_action_on_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable-xhdpi/ic_action_on_off.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable/details_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /res/drawable/machine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Breakend/echo/721b0f520bfcbc3eecf45eb247428616f0e1d42d/res/drawable/machine.png -------------------------------------------------------------------------------- /res/drawable/section_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /res/layout-land/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 17 | 18 | 19 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /res/layout-large/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /res/layout/device_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 18 | 19 |