cheng81 / Android-Bluetooth-Simulator

Simple tcp-based bluetooth simulator for the android emulator
47 stars 6 forks source link

the same problem again #4

Open kkccoo opened 13 years ago

kkccoo commented 13 years ago

I had the same problem as described in the previous post: Server started on port 8199 ADB command: C:\android-sdk-windows\tools\adb.exe press any key to exit accepting a new connection from /127.0.0.1 new string is : '3' new string is : '3]' creating command MODIFYSERVICE read parameter: type=added read parameter: tcp.port=8127 read parameter: service.uuid=419bbc68-c365-4c5e-8793-5ebff85b908c read parameter: bt.address=37:60:39:FE:DD:ED java.lang.NullPointerException

at dk.itu.btemu.cmd.ModifyService.work(ModifyService.java:28) at dk.itu.btemu.cmd.BaseCommand.run(BaseCommand.java:47) at java.lang.Thread.run(Unknown Source)

accepting a new connection from /127.0.0.1 new string is : '2' new string is : '2]' creating command DISCOVERY read parameter: bt.address=39:81:50:EE:BF:CE

this is the stack trace I got from the following operations: start server start emulator 1 start emulator 2 press start server on emulator 1 press discovery on emulator 2

Please help me with suggestions.

cheng81 commented 13 years ago

weird, it looks like the server started (or restarted) after the devices joined. you should read two JOIN commands in the server output. The NPE you have here is because it is trying to modify a service for an non-existent device..