Groups > Symbian > Symbian EPOC Java > Re: Not Receiving




Not Receiving

Not Receiving
Mon, 21 Nov 2005 13:08:04 +053
 hi folks ,

im using L2CAPconnection for sending n receiving data from one mobile to 
another using BT. I ve declared the following lines in CLASS1 and also 
passed "connection" as an argument to CLASS2 to avoid deadlock.
{

public L2CAPConnectionNotifier connectionNotifier = null;

connectionNotifier =
(L2CAPConnectionNotifier) Connector.open(url);

L2CAPConnection connection =
(L2CAPConnection)
connectionNotifier.acceptAndOpen();

}

In run() of CLASS2 i've the following code snippet.
{
boolean ready = false;
try
{
ready = connection.ready();
System.out.println("ready:"+ready);
}
catch (IOException e)
{
close();
listener.handleClose(this);
}
}
Since this "ready" always prints false :confused: ,the device is not 
receiving the message.No errors r thr. But sending part is working fine.
Plz kindly tell me why its always returns "false".How to establish the

connection. What mistake i might ve done.

Thanks a lot
Regards
yafy


Post Reply
Re: Not Receiving
Tue, 22 Nov 2005 10:41:48 -000
>connectionNotifier =
>(L2CAPConnectionNotifier) Connector.open(url);

How do you obtain your url? If the url is not valid you won't be able to
connect.

Regards
Martin

"yafy" <yafy@inv.com> wrote in message
news:K8gVg3m7FHA.2212@extapps30...
> hi folks ,
>
> im using L2CAPconnection for sending n receiving data from one mobile to
> another using BT. I ve declared the following lines in CLASS1 and also
> passed "connection" as an argument to CLASS2 to avoid deadlock.
> {
>
> public L2CAPConnectionNotifier connectionNotifier = null;
>
> connectionNotifier =
> (L2CAPConnectionNotifier) Connector.open(url);
>
> L2CAPConnection connection =
> (L2CAPConnection)
> connectionNotifier.acceptAndOpen();
>
> }
>
> In run() of CLASS2 i've the following code snippet.
> {
> boolean ready = false;
> try
> {
> ready = connection.ready();
> System.out.println("ready:"+ready);
> }
> catch (IOException e)
> {
> close();
> listener.handleClose(this);
> }
> }
> Since this "ready" always prints false :confused: ,the device is
not
> receiving the message.No errors r thr. But sending part is working fine.
> Plz kindly tell me why its always returns "false".How to
establish the
> connection. What mistake i might ve done.
>
> Thanks a lot
> Regards
> yafy
>
>
>

Post Reply
about | contact