2005-03-04 05:48:23

by Mohan K

[permalink] [raw]
Subject: Re: Fw: [Bluez-users] Re: Can't able to send data in both direction

Hi Sebastian,
I bought a new dongle, and now the send program is
working on two sides.
I am facing one more problem. The send program is
reading a character for PC keyboard using getch()
function,immediately, it establishes a connection using connect() and
then it sends the data. This is in a do-while loop to read and send
the continous key press. The problem is, I am not getting all the data
on the recv side, what i have typed on the send side. As for I know
the problem is due to delay in l2cap connection establishment. Is
there any way to avoid the delay? Kindly suggest me.

Thanks and regards,
Mohan



> > From: Sebastian Roth <[email protected]>
> > Date: Thu, 24 Feb 2005 08:23:30 +0100
> > Subject: [Bluez-users] Re: Can't able to send data in both direction
> > To: [email protected]
> >
> >
> > Hi Mohan,
> >
> > I'm sorry. I have not made this point clear!
> >
> >> Can you tell me whether the send program is working
> >> after making the device up using "hciconfig hci0 up" on the SiW dongle
> >> side?
> > Yes, after starting `hcid' (or using `hciconfig hci0 up') I was able to
> > connect and send data in both directions.
> >
> > Wugh? What's this? hciconfig shows a "Transilica, Inc." chip to me.
> > Don't know why but I thought that this dongle has a SiW chip in it.
> >
> > Are you able to send data using another programm? Please try l2ping to
> > see if both directions work.
> >
> > Best regards,
> > Sebastian
> >
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products from real users.
> > Discover which products truly live up to the hype. Start reading now.
> > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> > _______________________________________________
> > Bluez-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/bluez-users
> >
> >
> > --
> > This message contains information from GDA Technologies LTD and
> > affiliates, and is intended for the sole use of the individual and entity
> > to whom it is addressed. It may contain information, including any
> > attachments, that is privileged, confidential and exempt from disclosure
> > under applicable law. If you are not the intended addressee, nor
> > authorized to receive for the intended addressee, you are hereby notified
> > that you may not use, copy, disclose or distribute to anyone the message
> > or any information contained in the message. If you have received this
> > electronic transmission in error, please notify the sender immediately by
> > a "reply to sender only" message and destroy all electronic and hard
> > copies of the communication, including attachments.
> > This message was scanned for spam and viruses by BitDefender.
> >
> >
>
> --
> This message contains information from GDA Technologies LTD and affiliates, and is intended for the sole use of the individual and entity to whom it is addressed. It may contain information, including any attachments, that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this electronic transmission in error, please notify the sender immediately by a "reply to sender only" message and destroy all electronic and hard copies of the communication, including attachments.
> This message was scanned for spam and viruses by BitDefender.
>
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2005-03-07 08:18:58

by Pedro Monjo Florit

[permalink] [raw]
Subject: Re: [Bluez-users] Re: Fw: Re: Can't able to send data in both direction

Mohan K wrote:
>Hi Sebastian,
> Thanks. The send program without closing the
>connection for each time is working fine. But on the recv side I am
>unable to read the data immediately. I am using recv() function
>available in the bluez. After recv() fn I am using printf(). Until I
>close the connection it is not printing the received data.
>
>Thanks & Regards,
>Mohan
>
>
>
>On Fri, 04 Mar 2005 15:14:03 +0100, Sebastian Roth <[email protected]> wrote:
>
>>Hi Mohan,
>>
>>why do you connect for each keypress?
>>Just connect on programm startup then `do' `send' `while' `getch'
>>and close the connection on programm shutdown.
>>This should avoid the delay!
>>
>>Best regards,
>>Sebastian
>>
>>
>
Hi Mohan:

I have done a program which basically does the same thing: and echo
server and its couterpart echo client, over bluetooth, of course. In the
client part, I open the connection at the begining, read line by line
and send the complete line with the trailing '\n' in just one send()
call. The server reads the line with recv() and sends it back to the
client, including '\n' again. This works perfectly for me.

Regards,

Pedro


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-03-07 05:00:41

by Mohan K

[permalink] [raw]
Subject: Re: [Bluez-users] Re: Fw: Re: Can't able to send data in both direction

Hi Sebastian,
Thanks. The send program without closing the
connection for each time is working fine. But on the recv side I am
unable to read the data immediately. I am using recv() function
available in the bluez. After recv() fn I am using printf(). Until I
close the connection it is not printing the received data.

Thanks & Regards,
Mohan



On Fri, 04 Mar 2005 15:14:03 +0100, Sebastian Roth <[email protected]> wrote:
> Hi Mohan,
>
> why do you connect for each keypress?
> Just connect on programm startup then `do' `send' `while' `getch'
> and close the connection on programm shutdown.
> This should avoid the delay!
>
> Best regards,
> Sebastian
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-03-04 12:57:31

by Mohan K

[permalink] [raw]
Subject: Re: Fw: [Bluez-users] Re: Can't able to send data in both direction

Hi Marcel,
Thanks for your suggestion. I tried by keeping the
connection open. On the receiving side I am using recv() function.
Immediately after recv() function I want to print the data. The
problem I am facing is, it prints the received data only after
disconnecting the connection on the sending side with close(). For
that time the data is available in the buffer. Whether I want to
multithread the recveive portion, sothat I can dispay the data
immediately after receiving? Is there any other bluez command to
receive the data?

Thanks & Regards
Mohan


On Fri, 04 Mar 2005 11:47:42 +0100, Marcel Holtmann <[email protected]> wrote:
> Hi Mohan,
>
> > I bought a new dongle, and now the send program is
> > working on two sides.
> > I am facing one more problem. The send program is
> > reading a character for PC keyboard using getch()
> > function,immediately, it establishes a connection using connect() and
> > then it sends the data. This is in a do-while loop to read and send
> > the continous key press. The problem is, I am not getting all the data
> > on the recv side, what i have typed on the send side. As for I know
> > the problem is due to delay in l2cap connection establishment. Is
> > there any way to avoid the delay? Kindly suggest me.
>
> you must keep the connection open.
>
> Regards
>
> Marcel
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-03-04 14:14:03

by Sebastian Roth

[permalink] [raw]
Subject: [Bluez-users] Re: Fw: Re: Can't able to send data in both direction

Hi Mohan,

why do you connect for each keypress?
Just connect on programm startup then `do' `send' `while' `getch'
and close the connection on programm shutdown.
This should avoid the delay!

Best regards,
Sebastian



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-03-04 10:47:42

by Marcel Holtmann

[permalink] [raw]
Subject: Re: Fw: [Bluez-users] Re: Can't able to send data in both direction

Hi Mohan,

> I bought a new dongle, and now the send program is
> working on two sides.
> I am facing one more problem. The send program is
> reading a character for PC keyboard using getch()
> function,immediately, it establishes a connection using connect() and
> then it sends the data. This is in a do-while loop to read and send
> the continous key press. The problem is, I am not getting all the data
> on the recv side, what i have typed on the send side. As for I know
> the problem is due to delay in l2cap connection establishment. Is
> there any way to avoid the delay? Kindly suggest me.

you must keep the connection open.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users