Problems with InputStream and OutputStream
Hi,
I have the following problem.
I want to communicate from a mobile phone to an PC with the BlueZ-Stack and backwards.
In the beginning, I only want to sent short Strings. the way from the phone to the PC works, but the way backwards won't run.
The server side (PC) tells me, that it send the string (6 bytes long), the client (phone) do receive a connection, but the transported String is empty (is.read() = -1).
Is it possible, that the BlueZ implementation is the problem? I am sure, that my source (Java) works correct (on my opinion the problem can cause on two reasons: the BlueZ Stack or the Bluetooth-Stack on my mobile phone). I were glad if someone can tell me something about this.
Greetings Johannes
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Marcel Holtmann
maintainerHi Johannes,
Quoted 4 lines
I have the following problem.
I want to communicate from a mobile phone to an PC with the BlueZ-Stack and backwards.
In the beginning, I only want to sent short Strings. the way from the
Quoted 8 lines
phone to the PC works, but the way backwards won't run.
The server side (PC) tells me, that it send the string (6 bytes long), the client (phone) do receive a connection, but the transported String is empty (is.read()= -1).
Is it possible, that the BlueZ implementation is the problem? I am sure, that my source (Java) works correct (on my opinion the problem can cause on two reasons: the BlueZ Stack or the Bluetooth-Stack on my mobile phone).
go ahead and run "hcidump -x" on the Linux side to see what is going on.
Regards
Marcel
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Hi,
sorry, but my time run out last week.
I put hcidump -x on, but I'm not familiar with the output, it gives to me. Perhaps you can help me.
But this might be the section, that is relevant to my problem:
<>> ACL data: handle 0x0029 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 3 scid 0x0068
< ACL data: handle 0x0029 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0068 result 0 status 0
Quoted 1 line
HCI Event: Number of Completed Packets(0x13) plen 5
01 29 00 01 00
Quoted 1 line
ACL data: handle
0x0029flags0x02dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x0000 clen 0
< ACL data: handle 0x0029 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0068 flags 0x0000 result 0 clen 0
< ACL data: handle 0x0029 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0068 flags 0x0000 clen 4 MTU 1024
Quoted 1 line
HCI Event: Number of Completed Packets(0x13) plen 5
01 29 00 01 00
Quoted 1 line
HCI Event: Number of Completed Packets(0x13) plen 5
01 29 00 01 00
Quoted 1 line
ACL data: handle
0x0029flags0x02dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x0000 result 0 clen 4 MTU 672
Quoted 1 line
ACL data: handle
0x0029flags0x02dlen 8
L2CAP(d): cid 0x40 len 4 [psm 3]
RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c
< ACL data: handle 0x0029 flags 0x02 dlen 8
L2CAP(d): cid 0x68 len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7Quoted 1 line
HCI Event: Number of Completed Packets(0x13) plen 5
01 29 00 01 00
Quoted 1 line
ACL data: handle
0x0029flags0x02dlen 18
L2CAP(d): cid 0x40 len 14 [psm 3]
RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8 dlci 2 frame_type 0 credit_flow 15 pri 0 ack_timer 0 frame_size
667 max_retrans 0 credits 3
< ACL data: handle 0x0029 flags 0x02 dlen 8
L2CAP(d): cid 0x68 len 4 [psm 3]
RFCOMM(s): DM: cr 1 dlci 2 pf 1 ilen 0 fcs 0x73
Quoted 1 line
HCI Event: Number of Completed Packets(0x13) plen 5
01 29 00 01 00
Quoted 1 line
ACL data: handle
0x0029flags0x02dlen 12
L2CAP(s): Disconn req: dcid 0x0040 scid 0x0068
< ACL data: handle 0x0029 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0068
Quoted 1 line
HCI Event: Number of Completed Packets(0x13) plen 5
01 29 00 01 00
< HCI Command: Disconnect(0x01|0x0006) plen 3
29 00 13
Quoted 1 line
HCI Event: Command Status(0x0f) plen 4
00 01 06 04
Quoted 1 line
HCI Event: Disconn Complete(0x05) plen 4
00 29 00 16
The String I send to the server is 12bytes long, the other String 6bytes, but I can't find any messages for these Strings.
Greetings Johannes
Quoted 23 lines · Marcel Holtmann
Hi Johannes,
Quoted 7 lines
I have the following problem.
I want to communicate from a mobile phone to an PC with the BlueZ-Stack and backwards.
In the beginning, I only want to sent short Strings. the way from the phone to the PC works, but the way backwards won't run.
The server side (PC) tells me, that it send the string (6 bytes long), the client (phone) do receive a connection, but the transported String is empty (is.read()= -1).
Is it possible, that the BlueZ implementation is the problem? I am sure, that my source (Java) works correct (on my opinion the problem can cause on two reasons: the BlueZ Stack or the Bluetooth-Stack on my mobile phone).go ahead and run "hcidump -x" on the Linux side to see what is going on.
Regards
Marcel
Marcel Holtmann
maintainerHi Johannes,
Quoted 52 lines
sorry, but my time run out last week.
I put hcidump -x on, but I'm not familiar with the output, it gives to me.
Perhaps you can help me.
But this might be the section, that is relevant to my problem:<>> ACL data: handle
0x0029flags0x02dlen 12L2CAP(s): Connect req: psm 3 scid 0x0068 < ACL data: handle 0x0029 flags 0x02 dlen 16 L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0068 result 0 status 0Quoted 1 line
HCI Event: Number of Completed Packets(0x13) plen 5
01 29 00 01 00
Quoted 1 line
ACL data: handle
0x0029flags0x02dlen 12L2CAP(s): Config req: dcid 0x0040 flags 0x0000 clen 0 < ACL data: handle 0x0029 flags 0x02 dlen 14 L2CAP(s): Config rsp: scid 0x0068 flags 0x0000 result 0 clen 0 < ACL data: handle 0x0029 flags 0x02 dlen 16 L2CAP(s): Config req: dcid 0x0068 flags 0x0000 clen 4 MTU 1024Quoted 1 line
HCI Event: Number of Completed Packets(0x13) plen 5
01 29 00 01 00
Quoted 1 line
HCI Event: Number of Completed Packets(0x13) plen 5
01 29 00 01 00
Quoted 1 line
ACL data: handle
0x0029flags0x02dlen 18L2CAP(s): Config rsp: scid 0x0040 flags 0x0000 result 0 clen 4 MTU 672Quoted 1 line
ACL data: handle
0x0029flags0x02dlen 8L2CAP(d): cid 0x40 len 4 [psm 3] RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c < ACL data: handle 0x0029 flags 0x02 dlen 8 L2CAP(d): cid 0x68 len 4 [psm 3] RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7Quoted 1 line
HCI Event: Number of Completed Packets(0x13) plen 5
01 29 00 01 00
Quoted 1 line
ACL data: handle
0x0029flags0x02dlen 18L2CAP(d): cid 0x40 len 14 [psm 3] RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8 dlci 2 frame_type 0 credit_flow 15 pri 0 ack_timer 0 frame_size 667 max_retrans 0 credits 3 < ACL data: handle 0x0029 flags 0x02 dlen 8 L2CAP(d): cid 0x68 len 4 [psm 3] RFCOMM(s): DM: cr 1 dlci 2 pf 1 ilen 0 fcs 0x73Quoted 1 line
HCI Event: Number of Completed Packets(0x13) plen 5
01 29 00 01 00
Quoted 1 line
ACL data: handle
0x0029flags0x02dlen 12L2CAP(s): Disconn req: dcid 0x0040 scid 0x0068 < ACL data: handle 0x0029 flags 0x02 dlen 12 L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0068Quoted 1 line
HCI Event: Number of Completed Packets(0x13) plen 5
01 29 00 01 00
< HCI Command: Disconnect(0x01|0x0006) plen 3
29 00 13
Quoted 7 lines
Quoted 1 line
HCI Event: Command Status(0x0f) plen 4
00 01 06 04
Quoted 1 line
HCI Event: Disconn Complete(0x05) plen 4
00 29 00 16
The String I send to the server is 12bytes long, the other String 6bytes, but I can't find any messages for these Strings.
and there are no RFCOMM UIH packets that may transport your data. Check the connection setup itself, because it looks like that on the other side there is no service running on channel 2.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
A message that is not in the archive (sent off-list or not yet received): [email protected]
Marcel Holtmann
maintainerHi Johannes,
Quoted 1 line
I will try it in german ;)
this is not a good idea. Keep it on the mailing list.
If you cut some data from the output I can't tell you anything. Looks like this is more problematic. So we need a binary dump from this problem. Run "hcidump -w dumpfile". Bzip2 this file and attach it.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users