NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
OMAP Wireless Connectivity Battleship Game demo
Contents
Battleship Game Demo[edit]
Purpose[edit]
The Battleship Game demonstrates WiFi-Direct capability.
The WiFi-Direct technology is used in order to search for other players and to establish wireless connections in ad-hoc style.
How to Play[edit]
Battleship is a well-known 2 player game where the objective is to sink all of your enemy ships.
On the start of the game players set up the positions for each of their ships, and then they take turns guessing squares on their opponent's grid and seeing if those squares are occupied (a 'hit') or not (a 'miss').
The first player to destroy all of his opponents ships wins the game.
For more details please follow: <Battleship Game description>
Playing the Game[edit]
Setting the MAC Address[edit]
To work properly, each EVM must have a unique MAC address. Refer to the OMAP_Wireless_Connectivity_Station_MAC_Change for instructions.
Configuring Device Name[edit]
First thing we want to do is to configure the device name for the Wi-Fi direct.
For this, you need to choose the "WiFi Direct" Icon as shown below in the second row at the right:
Figure 1 - WiFi Direct Icon
On the WiFi-Direct main screen, check the top-left check-box called "Enable WiFi Direct". Then, click on "Settings" button as shown below:
Figure 2 - WiFi-Direct Main Screen
Tap on the "Device Name" editor and a virtual screen will appear so you can type the desired device name:
Figure 3 - Setting Device Name
Once you choose the name, click on the "Save" button, followed by "Back" button, then, click "Exit" to quit the WiFi-Direct application.
Now, the device name is configured and we are ready to play the game.
NOTE that if you don't do this step, your device name will be set to default value which is the machine type, for example, "am37x-evm".
Starting Battleship Game[edit]
To start the Battleship game, tap on the icon called "Battleship" shown below:
Figure 4 - Battleship Icon
Once the game starts, you should see the main screen:
Figure 5 - Main Screen
Here, you have two choices:
- Host the battelship game
- Connect to a game (hosted by another EVM)
Hosting Game[edit]
If you choose the option "Host Game", the EVM will be the server and wait for other EVM to connect to it.
When choosing this option, this is the screen you get:
Figure 6 - Hosting Game
Connecting Game[edit]
If you choose the second option, which is called "Connect to Game" you will have a dialog window where you can choose the EVM you want to connect to:
Figure 7 - Connecting Game Dialog
The dialog box will show all available WiFi-Direct devices in range.
Choose the device you want to connect to, and the game should start in a few seconds.
Battleship Game SD Card images[edit]
- AM37x
- AM18x
- SD card image: Root Partition (am180x-root-battleship_game_march_28_2012.tgz)
- SD card image: Boot Partition (am180x-boot-battleship_game_march_28_2012.tgz)
- AM335x
- TBD