Skip to contentSkip to conversation

how to use more than one dongle at the same time

Bluez-devel ermal mino 2 participants 2 messages Jan 30, 2006 – Feb 7, 2006 Bluetooth drivers

lore
Share & tools
lore

ermal mino

author
#0 lore raw

Hi,

I've been working around trying to use two ore more usb dongles at the same time ,(by the way I could send files from one dongle at the same time to more than one cellphones.)
as usual i start command line tool to witch i give the address of one dongle
and in another konsole i start another programm using the other dongle.
Both programs are used to send different files from different dongles.

the way i bind the socket I use is this.

struct sockaddr_rc addr={0},laddr={0};
s = socket(AF_BLUETOOTH, SOCK_STREAM,
BTPROTO_RFCOMM);

        addr.rc_family = AF_BLUETOOTH;
   	addr.rc_channel = port ; //remote port
    	str2ba( remote_addr, &addr.rc_bdaddr );
	
	laddr.rc_family = AF_BLUETOOTH;
	laddr.rc_channel=0; //local
    	str2ba( local_addr, &laddr.rc_bdaddr );
        
        bind(s, (struct sockaddr*)sockaddr,

sizeof(laddr));

connect(s, (struct sockaddr *)&addr,

sizeof(addr));
        ......
         recv();
         send();
         .....
        close(s);

here remote_addr and local_addr are the string representation of local and remote device addresses given to the programm from the command line.

when one of the programs is working(sending and recieving data)
i start the other one and after the first packet is sent or the connection is made it all stops and both the connections remains open.
I checked and i am the master in both cases.

Is this normal?
why i can't use them concurrently.

Best Regards
Ermal Mino.

___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#1 lore raw

Hi,

Quoted 47 lines

I've been working around trying to use two ore more usb dongles at the same time ,(by the way I could send files from one dongle at the same time to more than one cellphones.)
as usual i start command line tool to witch i give the address of one dongle
and in another konsole i start another programm using the other dongle.
Both programs are used to send different files from different dongles.

the way i bind the socket I use is this.

struct sockaddr_rc addr={0},laddr={0}; s = socket(AF_BLUETOOTH, SOCK_STREAM,
BTPROTO_RFCOMM);

        addr.rc_family = AF_BLUETOOTH;
   	addr.rc_channel = port ; //remote port
    	str2ba( remote_addr, &addr.rc_bdaddr );
	
	laddr.rc_family = AF_BLUETOOTH;
	laddr.rc_channel=0; //local
    	str2ba( local_addr, &laddr.rc_bdaddr );
        
        bind(s, (struct sockaddr*)sockaddr,

sizeof(laddr));

connect(s, (struct sockaddr *)&addr,

sizeof(addr));
        ......
         recv();
         send();
         .....
        close(s);

here remote_addr and local_addr are the string representation of local and remote device addresses given to the programm from the command line.

when one of the programs is working(sending and recieving data)
i start the other one and after the first packet is sent or the connection is made it all stops and both the connections remains open.
I checked and i am the master in both cases.

Quoted 2 lines

Is this normal?
why i can't use them concurrently.

in general this should work. However start using hcidump to debug this and then send in more details.

Regards

Marcel

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel