linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-users@lists.sourceforge.net
Subject: Re: Vs: Re: [Bluez-users] recvfrom/sendto
Date: Fri, 24 Feb 2006 17:55:00 +0100	[thread overview]
Message-ID: <1140800100.7264.19.camel@localhost> (raw)
In-Reply-To: <20403581.1140769616667.JavaMail.tomcat@pne-ps5-sn2>

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

      reply	other threads:[~2006-02-24 16:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-24  8:26 Vs: Re: [Bluez-users] recvfrom/sendto ari.paavilainen
2006-02-24 16:55 ` Marcel Holtmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1140800100.7264.19.camel@localhost \
    --to=marcel@holtmann.org \
    --cc=bluez-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).