Hi,I am currently working on a project, where i am using the bluetooth jsr 82 lib.On the emulator the device discovery and service discovery are working-> the dicsovered service are listed on the display-> i can choose a server-> and connect to it.Like the topic says its working on the emulator but not on the phones i tested (k750, v610i, another k750i and a other sony ericsson i think k600.... something like that) .

I dont not know where to find the error, i checked the jad file... and the manifest file, which includes this entries:

/** * Invoked by system when a new remote device is found - * remember the found device. */publicvoiddeviceDiscovered(RemoteDeviceremoteDevice, DeviceClasscod) {System.out.println("device discoverd...");try {

remoteDevices.addElement(remoteDevice);

} catch (Exceptione) {e.printStackTrace(); } }

/** * Invoked by system when device discovery is done. * <p> * Use a trick here - just remember the discType * and process its evaluation in another thread. */publicvoidinquiryCompleted(intdiscType) {this.discType = discType;

Ok i am going to fix that, but i think that is not the problem, because the programm is not running till this "codeline" ... because the Service Record or the Device (or both) of the Server is not found by the client... that suxx..

Could it be a thread issue? Having one wait for the other might not be the best thing.

If you are working on a game have the canvas have its own canvas so it can repaint itself via the main class.Then run the detection run in it's own thread and write info to a vector.The main class can then paint the info of that vector.

You really need some way to debug your code. Since that is not possible on the phones I would do either/or:write all debug info to a file using the fileconnection api.and if your midlet can support it, write the debug stuff to a vector and then display them on the screen/debug overlay.(the third option would be sending the debug info to the pc via bluetooth, that is naturally not an option )

Also get the document from jcp.org. It, among others, shows that you can have a server running on the same device. This might help and save you a second device for testing.

All the SE phones you listed support on-device debugging. (and infact the device supports more debugger features than the crappy wtk emulators!)

There is a guide available on eclipseMe.org that describes how to set it up.

True, but... works for SE and some Nokias as well. After that, who knows?

If this is a school project to be forgotten in a month, then such an on-device-debugging is great.

But if you (meaning him) intend to go mainstream, you will need something that will work on all devices at all times.Debug point 2 is the ugliest but will work nearly everywhere, is foolproof and does not require setting up.With some added features it can become quite handy.

I just prefer simple solutions that not only introduces the developer to the evil world of mobile debugging hell but also won't have them comming back complaining that device XY does not have on device debugging. (like my currently beloved N73, DIE FIEND!)

What I ment was to make sure no thread it waiting for another to execute.True, but... works for SE and some Nokias as well. After that, who knows?

If this is a school project to be forgotten in a month, then such an on-device-debugging is great.

But if you (meaning him) intend to go mainstream, you will need something that will work on all devices at all times.Debug point 2 is the ugliest but will work nearly everywhere, is foolproof and does not require setting up.With some added features it can become quite handy.

I just prefer simple solutions that not only introduces the developer to the evil world of mobile debugging hell but also won't have them comming back complaining that device XY does not have on device debugging. (like my currently beloved N73, DIE FIEND!)

You should make a greater distinction between debugging (attaching a debugger to the VM), and logging (recording execution progress).

Debugger support is available on almost all SonyEricsson, Motorola and some Nokia handsets.

Logging on the otherhand can be done on any handset, in all kinds of imaginative ways.Some handsets provide limited logging support at the VM level by redirecting standard out & err streams (System.[out/err]) to a file or serial connector.Otherwise logging can be done at the application level, you can direct the logging output to what ever output the handset supports.screen, file, rms, cable serial / bluetooth / IR serial ports, net port, http post, sms etc.

There is also atleast one project that, via bytecode engineering, aims to offer some of the functionality of a VM debugger, but at the application level.I havn't tried it out myself, but I can imagine it has such massive overheads on the speed & memory consumption of the application that for typical porting work it is impractical.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org