This example MIDlet shows you how to create a simple client-server pair using the Bluetooth RFCOMM protocol. In this example:
The user of the server can send a message to all clients connected to the server.
The user of the client can send a message to all clients connected to the server by simply sending a message to the server.
The server receives messages from any connected client, and "echoes" the received message back to all clients (including the original sender).
Figure: btsppEcho MIDlet running on a Series 40 full touch device
For a tutorial that shows you how to create this MIDlet, see section Example: Creating a client-server pair using RFCOMM.
This MIDlet is compatible with Series 40 2nd Edition devices and newer.
This MIDlet has been tested on the following devices:
Nokia 6700 Classic (Series 40 6th Edition)
Nokia Asha 203 on Nokia Asha software platform (Java Runtime 1.0.0 for Series 40)
Nokia Asha 305 on Nokia Asha software platform (Java Runtime 2.0.0 for Series 40)
The MIDlet project files are packaged as a zip file. To download the zip file, click the following link:
The MIDlet consists of the following packages and classes (click to view the full source code):
com.nokia.example.btsppecho
com.nokia.example.btsppecho.client
com.nokia.example.btsppecho.server