* [Bluez-users] Unable to read data via RFCOMM socket from a JSR82 program running on phone
@ 2008-04-15 1:59 Zhu, Peter J
2008-04-15 2:54 ` Vlad Skarzhevskyy
0 siblings, 1 reply; 5+ messages in thread
From: Zhu, Peter J @ 2008-04-15 1:59 UTC (permalink / raw)
To: bluez-users
Hi,
These days I tried to write one RFCOMM socket server that reads input
from a JSR82 client running on a phone but failed. My server program
runs on a Ubuntu gutsy distribution. This server registers a service
with a unique UUID and client looks for this service and send some
string request to server once found and then server sends back some
string data response to client. That's it.
>>From both log of JSR82 client and hcidump output in linux host, I can
see this service is successfully found and a successful connection is
setup between linux host and phone. This successful connection can also
be verified by both "hcitool con" and "l2ping". l2ping means L2CAP layer
communication is good, I think. The accept() of this server is
succesful, as well. But at same time, read() with sockid returned by
accept() just blocks, and hcidump output shows that no data is read
from low level host interface.
Another info that might be useful is that I also wrote a bluez C client
with RFCOMM socket that does same thing as JSR82 client. The blueZ C
client runs in the other linux machine. The result is perfectly good,
with everything going very smooth as expected. Noticeably, this
linux-linux successful communication doesn't require any pin
input/pairing process. That's a bit strange.
Any help or info is extremely appreciated. Thanks to bluez and linux and
all people here.
-Peter
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [Bluez-users] Unable to read data via RFCOMM socket from a JSR82 program running on phone 2008-04-15 1:59 [Bluez-users] Unable to read data via RFCOMM socket from a JSR82 program running on phone Zhu, Peter J @ 2008-04-15 2:54 ` Vlad Skarzhevskyy 2008-04-17 6:56 ` Zhu, Peter J 0 siblings, 1 reply; 5+ messages in thread From: Vlad Skarzhevskyy @ 2008-04-15 2:54 UTC (permalink / raw) To: BlueZ users Hi Peter We at bluecove.org constantly testing connections from JSR-82 on top of BlueZ on Linux to client on Mobile phone L2CAP or RFCOMM and back. No problems detected in BlueZ. Make sure you are connecting to right service! Look at this application as test http://snapshot.bluecove.org/bluecove-examples/bluecove-tester/ it runs on Linux and the MIDLet version can be installed on the phone. -- Vlad ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bluez-users] Unable to read data via RFCOMM socket from a JSR82 program running on phone 2008-04-15 2:54 ` Vlad Skarzhevskyy @ 2008-04-17 6:56 ` Zhu, Peter J 2008-04-17 7:24 ` David Rehle 0 siblings, 1 reply; 5+ messages in thread From: Zhu, Peter J @ 2008-04-17 6:56 UTC (permalink / raw) To: Vlad Skarzhevskyy, BlueZ users Hi Vlad Firstly thank you so much for giving this useful infomation. Yes, I tested it between MIDlet running on phone and that MIDlet running on desktop. Runs very well. But that's between two JSR82 applications rather than between a JSR82 and a C application utilizing bluez. Do you have such case in hand so that I can test? Thank you again. Peter Vlad Skarzhevskyy wrote: > Hi Peter > We at bluecove.org constantly testing connections from JSR-82 on top > of BlueZ on Linux to client on Mobile phone L2CAP or RFCOMM and back. > No problems detected in BlueZ. > Make sure you are connecting to right service! > > Look at this application as test > http://snapshot.bluecove.org/bluecove-examples/bluecove-tester/ it > runs on Linux and the MIDLet version can be installed on the phone. > > -- > Vlad ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bluez-users] Unable to read data via RFCOMM socket from a JSR82 program running on phone 2008-04-17 6:56 ` Zhu, Peter J @ 2008-04-17 7:24 ` David Rehle 2008-04-17 13:37 ` Zhu, Peter J 0 siblings, 1 reply; 5+ messages in thread From: David Rehle @ 2008-04-17 7:24 UTC (permalink / raw) To: BlueZ users Peter, which phone are you using? I know, that Siemens S65 (very old i know) can not establish a connection to bluez without pin request. I did your job several times, so if you want, post your C and midp code, (only relevant connection code) i will have a look on it kind regards david Zhu, Peter J schrieb: > Hi Vlad > > Firstly thank you so much for giving this useful infomation. Yes, I > tested it between MIDlet running on phone and that MIDlet running on > desktop. Runs very well. But that's between two JSR82 applications > rather than between a JSR82 and a C application utilizing bluez. Do you > have such case in hand so that I can test? Thank you again. > > Peter > > Vlad Skarzhevskyy wrote: >> Hi Peter >> We at bluecove.org constantly testing connections from JSR-82 on top >> of BlueZ on Linux to client on Mobile phone L2CAP or RFCOMM and back. >> No problems detected in BlueZ. >> Make sure you are connecting to right service! >> >> Look at this application as test >> http://snapshot.bluecove.org/bluecove-examples/bluecove-tester/ it >> runs on Linux and the MIDLet version can be installed on the phone. >> >> -- >> Vlad > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Bluez-users mailing list > Bluez-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bluez-users > ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bluez-users] Unable to read data via RFCOMM socket from a JSR82 program running on phone 2008-04-17 7:24 ` David Rehle @ 2008-04-17 13:37 ` Zhu, Peter J 0 siblings, 0 replies; 5+ messages in thread From: Zhu, Peter J @ 2008-04-17 13:37 UTC (permalink / raw) To: BlueZ users, rehle, skarzhevskyy [-- Attachment #1: Type: text/plain, Size: 3275 bytes --] Hi, Thank you very much. I attach my code here. rfcomm.c.tar.gz Server and client code written in C language via RFCOMM socket. They run in two linux machines with USB BT dongle. They communicate very well as expected, described in first mail of this thread. MyBTMIDlet.java.tar.gz MIDlet making use of JSR82. It contains both server and client code in one midlet. But in two phones, they can't communicate at all. Even client can't find service registered by server. My goal is of making client of MyBTMIDlet running in phone communicate well with bluez server running in linux machine. Currently client can find service registered by bluez server and sends data to bluez server, but linux machine doesn't get any string sent by client, as described by first mail of this thread, attached again here for your convenience. Please help review the code. Thank you sooooooooooooooooo much. Peter David Rehle wrote: > Peter, > > which phone are you using? I know, that Siemens S65 (very old i know) > can not establish a connection to bluez without pin request. > > I did your job several times, so if you want, post your C and midp > code, (only relevant connection code) i will have a look on it > > kind regards > > david > > > > Zhu, Peter J schrieb: >> Hi Vlad >> >> Firstly thank you so much for giving this useful infomation. Yes, I >> tested it between MIDlet running on phone and that MIDlet running on >> desktop. Runs very well. But that's between two JSR82 applications >> rather than between a JSR82 and a C application utilizing bluez. Do >> you have such case in hand so that I can test? Thank you again. >> >> Peter >> >> Vlad Skarzhevskyy wrote: >>> Hi Peter >>> We at bluecove.org constantly testing connections from JSR-82 on >>> top of BlueZ on Linux to client on Mobile phone L2CAP or RFCOMM and >>> back. No problems detected in BlueZ. >>> Make sure you are connecting to right service! >>> >>> Look at this application as test >>> http://snapshot.bluecove.org/bluecove-examples/bluecove-tester/ it >>> runs on Linux and the MIDLet version can be installed on the phone. >>> >>> -- >>> Vlad >> >> ------------------------------------------------------------------------ - >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >> Don't miss this year's exciting event. There's still time to save >> $100. Use priority code J8TL2D2. >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j avaone >> _______________________________________________ >> Bluez-users mailing list >> Bluez-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/bluez-users >> > > ------------------------------------------------------------------------ - > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j avaone > _______________________________________________ > Bluez-users mailing list > Bluez-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bluez-users [-- Attachment #2: MyBTMIDlet.java.tar.gz --] [-- Type: application/x-gzip, Size: 3415 bytes --] [-- Attachment #3: rfcomm.c.tar.gz --] [-- Type: application/x-gzip, Size: 3114 bytes --] [-- Attachment #4: Bluez-users Unable to read data via RFCOMM socket from a JSR82program running on phone.txt --] [-- Type: text/plain, Size: 2205 bytes --] From: bluez-users-bounces@lists.sourceforge.net on behalf of Zhu, Peter J [peter.j.zhu@intel.com] Sent: Tuesday, April 15, 2008 9:59 AM To: bluez-users@lists.sourceforge.net Subject: [Bluez-users] Unable to read data via RFCOMM socket from a JSR82program running on phone Hi, These days I tried to write one RFCOMM socket server that reads input from a JSR82 client running on a phone but failed. My server program runs on a Ubuntu gutsy distribution. This server registers a service with a unique UUID and client looks for this service and send some string request to server once found and then server sends back some string data response to client. That's it. >From both log of JSR82 client and hcidump output in linux host, I can see this service is successfully found and a successful connection is setup between linux host and phone. This successful connection can also be verified by both "hcitool con" and "l2ping". l2ping means L2CAP layer communication is good, I think. The accept() of this server is succesful, as well. But at same time, read() with sockid returned by accept() just blocks, and hcidump output shows that no data is read from low level host interface. Another info that might be useful is that I also wrote a bluez C client with RFCOMM socket that does same thing as JSR82 client. The blueZ C client runs in the other linux machine. The result is perfectly good, with everything going very smooth as expected. Noticeably, this linux-linux successful communication doesn't require any pin input/pairing process. That's a bit strange. Any help or info is extremely appreciated. Thanks to bluez and linux and all people here. -Peter ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users [-- Attachment #5: Type: text/plain, Size: 320 bytes --] ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone [-- Attachment #6: Type: text/plain, Size: 164 bytes --] _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-04-17 13:37 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-04-15 1:59 [Bluez-users] Unable to read data via RFCOMM socket from a JSR82 program running on phone Zhu, Peter J 2008-04-15 2:54 ` Vlad Skarzhevskyy 2008-04-17 6:56 ` Zhu, Peter J 2008-04-17 7:24 ` David Rehle 2008-04-17 13:37 ` Zhu, Peter J
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox