* [Bluez-devel] rfcomm connection send data
@ 2004-03-09 10:42 franz keuner
2004-03-10 0:13 ` Marcel Holtmann
0 siblings, 1 reply; 3+ messages in thread
From: franz keuner @ 2004-03-09 10:42 UTC (permalink / raw)
To: bluez-devel
hello,
i´m trying to develop an application using the bluezstack (usb dongle) and
the sonyericsson p900.
i´m able to connect the two devices via rfcomm.
rfcomm connect 0 00:00:00:00:00:00 5
Connected /dev/rfcomm0 to 00:00:00:00:00:00 on channel 5
Press CTRL-C for hangup
now i want to send data(string) from one device to the other.
on the p900 i use MIDlets and the java bluetooth api.
if i start listening and dump with ./rctest -d and trying to connect the
p900 the following message returns:
./rctest -d
rctest: Waiting for connection on channel 10 ...
rctest: Connect from 00:00:00:00:00:00 (p900 adress)
rctest: Receiving ...
an nothing happens...
i use in the MIDlet the command: connector client = (StreamConnection)
Connector.open(btspp://dongle adress and channel));
so the connection seems to work alright.
the data i want to send is a string saved in content:
output = client.openOutputStream();
byte[] data = content.getBytes();
output.write(data);
the p900 confirms it sended the data and rctest gives no error message or
anything.
i hope somebody can help me.
regards,
franzhello,
i´m trying to develop an application using the bluezstack (usb dongle) and
the sonyericsson p900.
i´m able to connect the two devices via rfcomm.
rfcomm connect 0 00:00:00:00:00:00 5
Connected /dev/rfcomm0 to 00:00:00:00:00:00 on channel 5
Press CTRL-C for hangup
now i want to send data(string) from one device to the other.
on the p900 i use MIDlets and the java bluetooth api.
if i start listening and dump with ./rctest -d and trying to connect the
p900 the following message returns:
./rctest -d
rctest: Waiting for connection on channel 10 ...
rctest: Connect from 00:00:00:00:00:00 (p900 adress)
rctest: Receiving ...
an nothing happens...
i use in the MIDlet the command: connector client = (StreamConnection)
Connector.open(btspp://dongle adress and channel));
so the connection seems to work alright.
the data i want to send is a string saved in content:
output = client.openOutputStream();
byte[] data = content.getBytes();
output.write(data);
the p900 confirms it sended the data and rctest gives no error message or
anything.
i hope somebody can help me.
regards,
franz
--
+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bluez-devel] rfcomm connection send data
2004-03-09 10:42 [Bluez-devel] rfcomm connection send data franz keuner
@ 2004-03-10 0:13 ` Marcel Holtmann
[not found] ` <27734.1078908349@www43.gmx.net>
0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2004-03-10 0:13 UTC (permalink / raw)
To: franz keuner; +Cc: BlueZ Mailing List
Hi Franz,
> i=B4m trying to develop an application using the bluezstack (usb dongle=
) and
> the sonyericsson p900.
> i=B4m able to connect the two devices via rfcomm.
>=20
> rfcomm connect 0 00:00:00:00:00:00 5
> Connected /dev/rfcomm0 to 00:00:00:00:00:00 on channel 5
> Press CTRL-C for hangup
>=20
> now i want to send data(string) from one device to the other.
> on the p900 i use MIDlets and the java bluetooth api.=20
>=20
> if i start listening and dump with ./rctest -d and trying to connect th=
e
> p900 the following message returns:
> ./rctest -d
> rctest: Waiting for connection on channel 10 ...
> rctest: Connect from 00:00:00:00:00:00 (p900 adress)
> rctest: Receiving ...
>=20
> an nothing happens...
> i use in the MIDlet the command: connector client =3D (StreamConnection=
)
> Connector.open(btspp://dongle adress and channel));
>=20
> so the connection seems to work alright.
>=20
> the data i want to send is a string saved in content:
> output =3D client.openOutputStream();
> byte[] data =3D content.getBytes();
> output.write(data);
>=20
> the p900 confirms it sended the data and rctest gives no error message =
or
> anything.
run "hcidump -x" (as root) and see what happens on the Linux side.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bluez-devel] rfcomm connection send data
[not found] ` <27734.1078908349@www43.gmx.net>
@ 2004-03-10 10:32 ` Marcel Holtmann
0 siblings, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2004-03-10 10:32 UTC (permalink / raw)
To: franz keuner; +Cc: BlueZ Mailing List
Hi Franz,
> thanks a lot for your quick answer. i used the hcidump tool and what i got
> is this:
> ( i have to admit i don't know what it means...)
you can use the Bluetooth specification ;)
> hcidump -x
> HCIDump - HCI packet analyzer ver 1.5
> device: hci0 snap_len: 1028 filter: 0xffffffff
> > HCI Event: Connect Request(0x04) plen 10
> AD 1C E8 D9 0A 00 0C 22 50 01
> < HCI Command: Accept Connection Request(0x01|0x0009) plen 7
> AD 1C E8 D9 0A 00 01
> > HCI Event: Command Status(0x0f) plen 4
> 00 01 09 04
> > HCI Event: Connect Complete(0x03) plen 11
> 00 28 00 AD 1C E8 D9 0A 00 01 00
> < HCI Command: Write Link Policy Settings(0x02|0x000d) plen 4
> 28 00 0E 00
> > HCI Event: Page Scan Repetition Mode Change(0x20) plen 7
> AD 1C E8 D9 0A 00 01
> > HCI Event: Command Complete(0x0e) plen 6
> 01 0D 08 00 28 00
> < HCI Command: Change Connection Packet Type(0x01|0x000f) plen 4
> 28 00 18 CC
> > HCI Event: Command Status(0x0f) plen 4
> 00 01 0F 04
> > HCI Event: Connection Packet Type Changed(0x1d) plen 5
> 00 28 00 18 CC
> > HCI Event: Max Slots Change(0x1b) plen 3
> 28 00 05
> > ACL data: handle 0x0028 flags 0x02 dlen 12
> L2CAP(s): Connect req: psm 3 scid 0x015d
> < ACL data: handle 0x0028 flags 0x02 dlen 16
> L2CAP(s): Connect rsp: dcid 0x0040 scid 0x015d result 0 status 0
> > HCI Event: Number of Completed Packets(0x13) plen 5
> 01 28 00 01 00
> > ACL data: handle 0x0028 flags 0x02 dlen 12
> L2CAP(s): Config req: dcid 0x0040 flags 0x0000 clen 0
> < ACL data: handle 0x0028 flags 0x02 dlen 14
> L2CAP(s): Config rsp: scid 0x015d flags 0x0000 result 0 clen 0
> < ACL data: handle 0x0028 flags 0x02 dlen 16
> L2CAP(s): Config req: dcid 0x015d flags 0x0000 clen 4
> MTU 1024
> > HCI Event: Number of Completed Packets(0x13) plen 5
> 01 28 00 01 00
> > HCI Event: Number of Completed Packets(0x13) plen 5
> 01 28 00 01 00
> > ACL data: handle 0x0028 flags 0x02 dlen 18
> L2CAP(s): Config rsp: scid 0x0040 flags 0x0000 result 0 clen 4
> MTU 672
> > ACL data: handle 0x0028 flags 0x02 dlen 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 0x0028 flags 0x02 dlen 8
> L2CAP(d): cid 0x15d len 4 [psm 3]
> RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7
> > HCI Event: Number of Completed Packets(0x13) plen 5
> 01 28 00 01 00
> > ACL data: handle 0x0028 flags 0x02 dlen 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 20 frame_type 0 credit_flow 15 pri 0 ack_timer 0 frame_size 667
> max_retrans 0 credits 3
> < ACL data: handle 0x0028 flags 0x02 dlen 18
> L2CAP(d): cid 0x15d len 14 [psm 3]
> RFCOMM(s): PN RSP: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8
> dlci 20 frame_type 0 credit_flow 14 pri 0 ack_timer 0 frame_size 667
> max_retrans 0 credits 7
> > HCI Event: Number of Completed Packets(0x13) plen 5
> 01 28 00 01 00
> > ACL data: handle 0x0028 flags 0x02 dlen 8
> L2CAP(d): cid 0x40 len 4 [psm 3]
> RFCOMM(s): SABM: cr 1 dlci 20 pf 1 ilen 0 fcs 0xfd
> < ACL data: handle 0x0028 flags 0x02 dlen 8
> L2CAP(d): cid 0x15d len 4 [psm 3]
> RFCOMM(s): UA: cr 1 dlci 20 pf 1 ilen 0 fcs 0x36
> < ACL data: handle 0x0028 flags 0x02 dlen 12
> L2CAP(d): cid 0x15d len 8 [psm 3]
> RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
> dlci 20 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
> > HCI Event: Number of Completed Packets(0x13) plen 5
> 01 28 00 01 00
> > HCI Event: Number of Completed Packets(0x13) plen 5
> 01 28 00 01 00
> > ACL data: handle 0x0028 flags 0x02 dlen 12
> L2CAP(d): cid 0x40 len 8 [psm 3]
> RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
> dlci 20 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
> < ACL data: handle 0x0028 flags 0x02 dlen 12
> L2CAP(d): cid 0x15d len 8 [psm 3]
> RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
> dlci 20 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
> > HCI Event: Number of Completed Packets(0x13) plen 5
> 01 28 00 01 00
> > ACL data: handle 0x0028 flags 0x02 dlen 12
> L2CAP(d): cid 0x40 len 8 [psm 3]
> RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
> dlci 20 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
> < ACL data: handle 0x0028 flags 0x02 dlen 9
> L2CAP(d): cid 0x15d len 5 [psm 3]
> RFCOMM(d): UIH: cr 0 dlci 20 pf 1 ilen 0 fcs 0xf7
> 21
> > HCI Event: Number of Completed Packets(0x13) plen 5
> 01 28 00 01 00
and at this point the complete RFCOMM connection is established and you
can receive data, but your Symbian phone don't send anything. Search for
the problem on the phone side.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-03-10 10:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-09 10:42 [Bluez-devel] rfcomm connection send data franz keuner
2004-03-10 0:13 ` Marcel Holtmann
[not found] ` <27734.1078908349@www43.gmx.net>
2004-03-10 10:32 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).