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
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 and S60 2nd Edition FP2 devices and newer.
This MIDlet has been tested on the following devices:
Nokia 6700 Classic (Series 40 6th Edition)
Nokia Asha 203 (Java Runtime 1.0.0 for Series 40)
Nokia Asha 305 (Java Runtime 2.0.0 for Series 40)
Nokia C6-01 (Java Runtime 2.3 for Symbian)
Nokia N96 (S60 3rd Edition FP2)
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