chinnytp / android-bluetooth

Automatically exported from code.google.com/p/android-bluetooth
1 stars 0 forks source link

sending string from one phone to another #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. pair phones
2. try to connect to a BTSocket on the other phone from java using:
BluetoothSocket bs;
        try {
            bs = rDev.openSocket(5);
            OutputStream os = bs.getOutputStream();
            os.write(11);
            os.write(this.msg.getBytes());

            // sent testcontent
            os.close();
            bs.closeSocket();

        } catch (BluetoothException e) {
            Toast.makeText(this, e.getLocalizedMessage(), Toast.LENGTH_LONG).show();
            e.printStackTrace();

        } catch (Exception e) {
            Toast.makeText(this, e.getLocalizedMessage(), Toast.LENGTH_LONG).show();
            e.printStackTrace();
        }

testcontent is 11 bytes long (fix)

reDev has been set before using:
rDev = this.ldb.getRemoteBluetoothDevice(s);

3. Crash to Homescreen
I have also had some Toasts in place in order to get debug messages
(working on a Samsung Galaxy). Logcat output says something like: "BlueZ
wrapper not initialized"

What is the expected output? What do you see instead?
An expected behaviour would be connecting to the remote device :) or not
crashing to desktop but telling me what I did wrong (I print the
errormessages in Toasts). Instead of that I see my homescreen.

What version of the product are you using? On what operating system?
0.3b1 of the BT Api 
Firmware V. 1.5 on Samsung Galaxy

Please provide any additional information below:
I  have attached the file in question. Every help is appreciated greatly!

Original issue reported on code.google.com by maf...@googlemail.com on 14 Oct 2009 at 1:45

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by gerda...@gmail.com on 18 Oct 2009 at 7:02

GoogleCodeExporter commented 9 years ago
Hey, I am not sure if it of interest for this particular problem, but the other 
phone is also an Android phone 
running your API in the same version as well. Usually another Samsung Galaxy.

Cheers,
Matthias

Original comment by maf...@googlemail.com on 18 Oct 2009 at 7:43

GoogleCodeExporter commented 9 years ago
I have the same error:
"blz wrapper not initialized"

Any idea how to fix?

Original comment by christia...@gmail.com on 25 Oct 2009 at 9:38

GoogleCodeExporter commented 9 years ago
btw. 
hcitool dev
and
hciconfig -a
gives no output.

Maybe the reason is our custom rom (galaxo). I try to flash it back today.

Original comment by christia...@gmail.com on 26 Oct 2009 at 11:52

GoogleCodeExporter commented 9 years ago
I installed the original ROM now but it also wont work.

Here's my adb logcat output:

I/ActivityManager( 1052): Start proc priv.s2 for activity priv.s2/.rccar.RCCar:
pid=1598 uid=10036 gids={3002, 3001}
I/dalvikvm( 1598): Debugger thread not active, ignoring DDM send (t=0x41504e4d 
l=38)
I/dalvikvm( 1598): Debugger thread not active, ignoring DDM send (t=0x41504e4d 
l=18)
W/Resources( 1598): Converting to string: TypedValue{t=0x12/d=0x0 a=2 
r=0x7f050001}
D/LocalBluetoothDevice( 1598): _localDevice is null
D/BluetoothBroadcastReceiver( 1598): Registering
I/ActivityManager( 1052): Displayed activity priv.s2/.rccar.RCCar: 852 ms
D/dalvikvm( 1134): GC freed 7838 objects / 441008 bytes in 156ms
D/InetAddress( 1134): android.clients.google.com: 74.125.43.101 (family 2, 
proto 6)
D/InetAddress( 1134): android.clients.google.com: 74.125.43.113 (family 2, 
proto 6)
D/InetAddress( 1134): android.clients.google.com: 74.125.43.102 (family 2, 
proto 6)
D/InetAddress( 1134): android.clients.google.com: 74.125.43.138 (family 2, 
proto 6)
D/InetAddress( 1134): android.clients.google.com: 74.125.43.139 (family 2, 
proto 6)
D/InetAddress( 1134): android.clients.google.com: 74.125.43.100 (family 2, 
proto 6)
D/dalvikvm( 1099): GC freed 1696 objects / 80496 bytes in 252ms
D/dalvikvm( 1134): GC freed 8490 objects / 560880 bytes in 121ms
D/dalvikvm( 1134): GC freed 7340 objects / 524936 bytes in 109ms
D/dalvikvm( 1134): GC freed 9106 objects / 515504 bytes in 111ms
I/CheckinService( 1052): Checkin triggered: Intent {
action=android.server.checkin.CHECKIN (has extras) }, market only = true
I/ActivityManager( 1052): Stopping service:
com.android.vending/.PackageMonitorReceiver$UpdateCheckinDatabaseService
I/CheckinService( 1052): Sending checkin request (905 bytes)...
D/InetAddress( 1052): android.clients.google.com: 74.125.39.113 (family 2, 
proto 6)
D/InetAddress( 1052): android.clients.google.com: 74.125.39.102 (family 2, 
proto 6)
D/InetAddress( 1052): android.clients.google.com: 74.125.39.101 (family 2, 
proto 6)
D/InetAddress( 1052): android.clients.google.com: 74.125.39.138 (family 2, 
proto 6)
D/InetAddress( 1052): android.clients.google.com: 74.125.39.139 (family 2, 
proto 6)
D/InetAddress( 1052): android.clients.google.com: 74.125.39.100 (family 2, 
proto 6)
D/dalvikvm( 1052): GC freed 12187 objects / 737960 bytes in 185ms
D/dalvikvm( 1052): GC freed 15138 objects / 1077528 bytes in 187ms
I/ActivityManager( 1052): Process com.google.android.apps.maps:FriendService 
(pid
1195) has died.
D/dalvikvm( 1582): GC freed 2694 objects / 196416 bytes in 181ms
I/CheckinService( 1052): From server: Intent {
action=android.server.checkin.FOTA_CANCEL }
V/CheckinService( 1052): Disabling timed checkins (interval: 0 secs)
I/NotificationService( 1052): enqueueToast pkg=priv.s2
callback=android.app.ITransientNotification$Stub$Proxy@4333ca18 duration=1
I/NotificationService( 1052): enqueueToast pkg=priv.s2
callback=android.app.ITransientNotification$Stub$Proxy@43323de0 duration=1
E/BLZ_WRAPPER( 1598): btl_if_socket : blz wrapper not initialized
I/ActivityManager( 1052): Process priv.s2 (pid 1598) has died.
I/WindowManager( 1052): WIN DEATH: Window{434d1928 priv.s2/priv.s2.rccar.RCCar
paused=false}
D/Zygote  ( 1014): Process 1598 exited cleanly (1)
I/Launcher( 1099): onResume  mRestoring = false
W/InputManagerService( 1052): Got RemoteException sending setActive(false)
notification to pid 1598 uid 10036
W/NotificationService( 1052): Object died trying to hide notification
android.app.ITransientNotification$Stub$Proxy@4333ca18 in package priv.s2
W/ActivityManager( 1052): setProcessForeground called on unknown pid: 1598
W/NotificationService( 1052): Object died trying to show notification
android.app.ITransientNotification$Stub$Proxy@43323de0 in package priv.s2
W/ActivityManager( 1052): setProcessForeground called on unknown pid: 1598
D/dalvikvm( 1094): GC freed 8969 objects / 525600 bytes in 211ms

Original comment by christia...@gmail.com on 26 Oct 2009 at 3:21

GoogleCodeExporter commented 9 years ago
I get the same error on Samsung Moment / Behold.
When trying to connect. It runs Android 1.5

Original comment by bonifaz....@gmail.com on 6 Nov 2009 at 7:52

GoogleCodeExporter commented 9 years ago
I have the same problem! Are there any solutions yet?
I really need help because I don´t know further

wkr Chris

Original comment by chr.0...@gmail.com on 26 Apr 2010 at 11:37