Return-Path: Date: Sun, 17 Jun 2007 06:33:46 -0700 (PDT) From: Robert Schmidt To: BlueZ users In-Reply-To: <1182064855.30934.53.camel@aeonflux> MIME-Version: 1.0 Message-ID: <14519.73400.qm@web38507.mail.mud.yahoo.com> Subject: Re: [Bluez-users] HCI socket listen Reply-To: BlueZ users List-Id: BlueZ users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1925859582==" Sender: bluez-users-bounces@lists.sourceforge.net Errors-To: bluez-users-bounces@lists.sourceforge.net --===============1925859582== Content-Type: multipart/alternative; boundary="0-1574045289-1182087226=:73400" Content-Transfer-Encoding: 8bit --0-1574045289-1182087226=:73400 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi Marcel, Thanks for the reply. I have two questions for you : 1) How do I send ACL data between two devices using HCI socket ? 2) I tried sending a stream of bits using SCO connection. The program is similar to scotest. Eventhough, sending and receiving works but the data received looks completely corrupted and different from data sent. received data is like eg : *******� hcidump: > SCO data: handle 44 dlen 48 > SCO data: handle 44 dlen 48 > SCO data: handle 44 dlen 48 > SCO data: handle 44 dlen 48 > SCO data: handle 44 dlen 48 > SCO data: handle 44 dlen 48 > SCO data: handle 44 dlen 48 > SCO data: handle 44 dlen 48 > SCO data: handle 44 dlen 48 > SCO data: handle 44 dlen 48 > SCO data: handle 44 dlen 48 > SCO data: handle 44 dlen 48 > SCO data: handle 44 dlen 48 > SCO data: handle 44 dlen 48 > HCI Event: Disconn Complete (0x05) plen 4 Is there some data conversions to be done before sending or receiving data? Note: I know that the best way to transfer data between devices is using l2cap but these question are part of my experiment to test different connections. So,please bear with me. best regards, robert. Marcel Holtmann wrote: Hi Robert, > Can a HCI socket listen for connections like l2cap and rfcomm ?? In my > case it throws followiing warning and does not listen: > > GLib-WARNING **: giounix.c:400Error while getting flags for FD: Bad > file descriptor (9) > > In my program I do the following: > > I Open and Bind the HCI socket (using hci_open_dev)and listen for > connections. the HCI socket is not working this way. Use L2CAP if you wanna receive incoming connections and data. Regards Marcel ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users --------------------------------- Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search. --0-1574045289-1182087226=:73400 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi Marcel,

Thanks for the reply. I have two questions for you :

1) How do I send ACL data between two devices using HCI socket ?

2) I tried sending a stream of bits using SCO connection. The program is similar to scotest. Eventhough, sending and receiving works  but the data received looks completely corrupted and different from data sent.

received data is like
eg : *******�

hcidump:
> SCO data: handle 44 dlen 48
> SCO data: handle 44 dlen 48
> SCO data: handle 44 dlen 48
> SCO data: handle 44 dlen 48
> SCO data: handle 44 dlen 48
> SCO data: handle 44 dlen 48
> SCO data: handle 44 dlen 48
> SCO data: handle 44 dlen 48
> SCO data: handle 44 dlen 48
> SCO data: handle 44 dlen 48
> SCO data: handle 44 dlen 48
> SCO data: handle 44 dlen 48
> SCO data: handle 44 dlen 48
> SCO data: handle 44 dlen 48
> HCI Event: Disconn Complete (0x05) plen 4

Is there some data conversions to be done before sending or receiving data?

Note: I know that the best way to transfer data between devices is using l2cap but these question are part of my experiment to test different connections. So,please bear with me.

best regards,

robert.




Marcel Holtmann <marcel@holtmann.org> wrote:
Hi Robert,

> Can a HCI socket listen for connections like l2cap and rfcomm ?? In my
> case it throws followiing warning and does not listen:
>
> GLib-WARNING **: giounix.c:400Error while getting flags for FD: Bad
> file descriptor (9)
>
> In my program I do the following:
>
> I Open and Bind the HCI socket (using hci_open_dev)and listen for
> connections.

the HCI socket is not working this way. Use L2CAP if you wanna receive
incoming connections and data.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users


Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search. --0-1574045289-1182087226=:73400-- --===============1925859582== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ --===============1925859582== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users --===============1925859582==--