Oh my God! I just can’t help not posting what I feel…I think I made it! If I’m not mistaken, I was able to connect two Bluetooth devices and communicate with each other through the RFCOMM serial protocol. I run it in the Java Wireless Toolkit because my PC could not even create new J2ME application in NetBeans. And I wish to test this module in a real device.
Here’s the result:
Build Result:
Project “BluetoothMidlet” loaded
Project settings saved
Building “BluetoothMidlet”
Build complete
Server side:
Running with storage root DefaultColorPhone
Running with locale: English_United States.1252
Waiting for connection…
Received from Client: INFO
Waiting for connection…
Execution completed.
1312245 bytecodes executed
27107 thread switches
896 classes in the system (including system classes)
5922 dynamic objects allocated (192736 bytes)
4 garbage collections (118500 bytes collected)
Client side:
Running with storage root temp.DefaultColorPhone1156995903898
Running with locale: English_United States.1252
deviceDiscovered()
Address: 0123456789AF
Major Device Class: 512
Minor Device Class: 4
Friendly Name: WirelessToolkit
inquiryCompleted()
servicesDiscovered()
SERVICE_SEARCH_COMPLETED
Service URL: btspp://0123456789AF:1;master=false;encrypt=false;authenticate=false
InfoServer: Your command was: INFO
Execution completed.
1102515 bytecodes executed
3463 thread switches
897 classes in the system (including system classes)
5892 dynamic objects allocated (191284 bytes)
5 garbage collections (132372 bytes collected)
Thanks to Miss Ebony Domingo for the J2ME tutorials and encouragement and to Niel for helping me gather resources.
To Jc and Marlon…Wish to test this on real devices soon! I wanna know if it could stream voice through RFCOMM. Cheers!