problems with bytestream
Hi, i'm writing a library to get a L2CAP stream in Java, this library is Java Native Library that uses L2CAP sockets of Bluez.
I've the following problem: when i send 4 bytes over the socket, on the other side of the connection i get 5 valid read operation. Well at this point i started to investigate and i founded very usefull the l2test program tool. On one machine i've lauched l2test with l2test -d -b 1 (for packets of 1 byte) and on the client side l2test -s -b 1 -N 10 <my_srv_addr>....the client seems to work correctly, but the server doesn't receive any data.
[client screen dump]
[zande@ZANDEGIA andrea]$ ./l2test -s -b 1 -N 10 00:0B:0D:40:64:D5
l2test[8186]: Connected [imtu 672, omtu 672, flush_to 65535]
l2test[8186]: Sending ...
l2test[8186]: Closing channel ... l2test[8186]: Done
l2test[8186]: Exit
[server screen dump]
[andrea@tsunami tests]$ ./l2test -d l2test[4907]: Waiting for connection on psm 10 ... l2test[4908]: Connect from 00:10:C6:4D:38:AC [imtu 672, omtu 672, flush_to 65535] l2test[4908]: Receiving ...
l2test[4908]: Disconnect. Success
No data are received by the server, nothig is printed on the screen.
Somebody have an explanation for this things or somebody could test my 2 commands lines on other machine to test the behaviour.
Thanks to anybody could help me!!!
Best regards
Andrew
___________________________________
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica… Scaricalo ora!
http://it.messenger.yahoo.it
Hi, i'm writing a library to get a L2CAP stream in Java, this library is Java Native Library that uses L2CAP sockets of Bluez.
I've the following problem: when i send 4 bytes over the socket, on the other side of the connection i get 5 valid read operation. Well at this point i started to investigate and i founded very usefull the l2test program tool. On one machine i've lauched l2test with l2test -d -b 1 (for packets of 1 byte) and on the client side l2test -s -b 1 -N 10 <my_srv_addr>....the client seems to work correctly, but the server doesn't receive any data.
[client screen dump]
[zande@ZANDEGIA andrea]$ ./l2test -s -b 1 -N 10 00:0B:0D:40:64:D5
l2test[8186]: Connected [imtu 672, omtu 672, flush_to 65535]
l2test[8186]: Sending ...
l2test[8186]: Closing channel ... l2test[8186]: Done
l2test[8186]: Exit
[server screen dump]
[andrea@tsunami tests]$ ./l2test -d l2test[4907]: Waiting for connection on psm 10 ... l2test[4908]: Connect from 00:10:C6:4D:38:AC [imtu 672, omtu 672, flush_to 65535] l2test[4908]: Receiving ...
l2test[4908]: Disconnect. Success
No data are received by the server, nothig is printed on the screen.
Somebody have an explanation for this things or somebody could test my 2 commands lines on other machine to test the behaviour.
Thanks to anybody could help me!!!
Best regards
Andrew
___________________________________
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica… Scaricalo ora!
http://it.messenger.yahoo.it
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Hi Andrea,
I took a look at l2test.c and I saw that
at the beginning of each packet sent
there is a small header.
The first 32 bits are used for the sequence number and the following 16 for the packet size.
l2test[3491]: Recevied 18 bytes
00000000: 01 00 00 00 12 00 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f
.........|seq-number | len | payload .........| (little endian) |
However I tested it with smaller packet sizes and it seems to work here flawlessly.
l2test -s -b 1 -N 1 XX:XX:XX:XX:XX:XX
l2test -d
l2test[3488]: Connect from XX:XX:XX:XX:XX:XX [imtu 672, omtu 672, flush_to 65535]
l2test[3488]: Receiving ...
l2test[3488]: Recevied 1 bytes
00000000: 00 .
l2test[3488]: Disconnect. Success
I used csr based USB dongles with latest bluez libs & utils.
Ciao,
Diego Liziero.
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
[Bluez-devel] Re: [Bluez-users] problems with bytestream + rfcomm socket problems
Thanks Diego,
Now i've tested the rctest (without the usleep that i've inserted) on a machine with kernel 2.4.18 and bluez libs/utils 2.2(USB dongle digicom), and the receive function doesn't give any prblems, work well, doesn't loose any byte...is this a bug in the kernel i use?!
PS The USB dongle i use with the kernel 2.6 is a Trust BT180
Thanks
Andrea S.
___________________________________
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica… Scaricalo ora!
http://it.messenger.yahoo.it
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Re: [Bluez-users] problems with bytestream + rfcomm socket problems
Hello Andrea,
Quoted 7 lines · Paolino paperino
Thanks Diego,
Now i've tested the rctest (without the usleep that i've inserted) on a machine with kernel 2.4.18 and bluez libs/utils 2.2(USB dongle digicom), and the receive function doesn't give any prblems, work well, doesn't loose any byte...is this a bug in the kernel i use?!
Here it works with kernels 2.6.7-2.tmb.6mdk (mandrake) and 2.6.9-rc3-mm3-ecn-retry (debian).
Sorry, I don't have a RedHat.
Quoted 2 lines
PS The USB dongle i use with the kernel 2.6 is a Trust BT180
Try to switch the Bluetooth dongle and see if it is it's fault.
Quoted 2 lines
Thanks
Andrea S.
Diego.
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Re: [Bluez-users] problems with bytestream + rfcomm socket problems
Thank's Diego
it wasn't a prblem of dongle or bluez, because i've tested all the USB dongles with two kernel 2.6.8 of Fedora's, and all works fine, i'will try to test with the latest 2.4.27 series, i think the prblem was in the ker 2.4.18 i used.
Quoted 7 lines
Try to switch the Bluetooth dongle and see if it is it's fault.
Quoted 2 lines
Thanks
Andrea S.Diego.
___________________________________
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica… Scaricalo ora!
http://it.messenger.yahoo.it
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Re: [Bluez-users] problems with bytestream + rfcomm socket problems
In reply to Diego Liziero --- Diego Liziero <[email protected]> ha
scritto:
Quoted 23 lines
Hello Andrea,
Quoted 2 lines · Paolino paperino
Thanks Diego,
Now i've tested the rctest (without the usleepthat
Quoted 3 lines
i've inserted) on a machine with kernel 2.4.18 and bluez libs/utils 2.2(USB dongle digicom), and the receive function doesn't give any prblems, work
well,
Quoted 1 line
doesn't loose any byte...is this a bug in the
kernel i
Quoted 1 line
use?!
Here it works with kernels 2.6.7-2.tmb.6mdk (mandrake)
and 2.6.9-rc3-mm3-ecn-retry (debian).
Sorry, I don't have a RedHat.Quoted 1 line
PS The USB dongle i use with the kernel 2.6 is a
Trust
Quoted 1 line
BT180
Quoted 11 lines
Try to switch the Bluetooth dongle and see if it is it's fault.
Quoted 2 lines
Thanks
Andrea S.Diego.
-------------------------------------------------------
Quoted 7 lines
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
Quoted 4 lines
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Quoted 1 line
___________________________________
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica… Scaricalo ora!
http://it.messenger.yahoo.it
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users