linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Vs: Re: [Bluez-users] recvfrom/sendto
@ 2006-02-24  8:26 ari.paavilainen
  2006-02-24 16:55 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: ari.paavilainen @ 2006-02-24  8:26 UTC (permalink / raw)
  To: bluez-users



>----Alkuper=C3=A4inen viesti----
>L=C3=A4hett=C3=A4j=C3=A4: marcel@holtmann.org
>P=C3=A4iv=C3=A4m=C3=A4=C3=A4r=C3=A4: Feb 23, 2006 11:39:37 AM
>Vastaanottaja: bluez-users@lists.sourceforge.net
>Aihe: Re: [Bluez-users] recvfrom/sendto
>
>Hi Ari,
>
>> Can I use recvfrom and sendto with l2cap sockets (instead of listen,=20
accept,=20
>> connect,...)?
>
>why do you repeat your emails? I already told you to try it and tell if
>it doesn't work.
>
>Regards
>
>Marcel
>

Hi,

Sorry about that. The reason: I sent the message to the list, and waited fo=
r=20
it to appear to my mailbox. It didn't appear and then I realised that I am =
not=20
even subscribing the list. I thought that the message didn't get to the lis=
t=20
and I posted it second time.

I have tried to use sendto this way:

int sock;
struct sockaddr_l2 sock_addr;
char addr[18] =3D "00:12:37:46:bc:2b";

sock =3D socket(AF_BLUETOOTH, SOCK_DGRAM, BTPROTO_L2CAP);
sock_addr.l2_family =3D AF_BLUETOOTH;
sock_addr.l2_psm =3D htobs(6001);
str2ba(addr, &sock_addr.l2_bdaddr);
sendto(sock, "Bluetooth test", 15, 0, (struct sockaddr*)&sock_addr, sizeof
(sock_addr));

sendto returns 'Invalid argument' error.

-Ari


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Vs: Re: [Bluez-users] recvfrom/sendto
  2006-02-24  8:26 Vs: Re: [Bluez-users] recvfrom/sendto ari.paavilainen
@ 2006-02-24 16:55 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2006-02-24 16:55 UTC (permalink / raw)
  To: bluez-users

Hi Ari,

> Sorry about that. The reason: I sent the message to the list, and waited for 
> it to appear to my mailbox. It didn't appear and then I realised that I am not 
> even subscribing the list. I thought that the message didn't get to the list 
> and I posted it second time.
> 
> I have tried to use sendto this way:
> 
> int sock;
> struct sockaddr_l2 sock_addr;
> char addr[18] = "00:12:37:46:bc:2b";
> 
> sock = socket(AF_BLUETOOTH, SOCK_DGRAM, BTPROTO_L2CAP);
> sock_addr.l2_family = AF_BLUETOOTH;
> sock_addr.l2_psm = htobs(6001);
> str2ba(addr, &sock_addr.l2_bdaddr);
> sendto(sock, "Bluetooth test", 15, 0, (struct sockaddr*)&sock_addr, sizeof
> (sock_addr));
> 
> sendto returns 'Invalid argument' error.

the SOCK_DGRAM support in L2CAP is not really good and thus might don't
wanna you sendto() at all. Are there any problems with binding and
connection to an L2CAP channel?

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-24 16:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-24  8:26 Vs: Re: [Bluez-users] recvfrom/sendto ari.paavilainen
2006-02-24 16:55 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).