From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] L2CAP chnnel
Date: Wed, 14 Sep 2005 15:15:58 +0200 [thread overview]
Message-ID: <1126703758.16166.34.camel@station6.example.com> (raw)
In-Reply-To: <E1EFR9z-0001K1-00.bizon_art-mail-ru@f48.mail.ru>
Hi,
> I`m try to write application that send and recive data over L2CAP channel, between PC and my custom arm board. I have a next problem. I dont understand haw create a socket, if PC must inquirying and connect to my board. Device must remain slave in piconnect.
> I`m try run next simpl daemon on my custom arm board:
>
> struct sockaddr_l2 L2capAddr;
> int iSockFd;
> iSockFd = socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_L2CAP);
> if (iSockFd == -1) {
> TRACE1("opening L2CAP socket: %s", strerror(errno));
> return -1;
> };
> L2capAddr.l2_bdaddr = *BDADDR_ANY;
> /*L2capAddr.l2_bdaddr = *strtoba( strdup("78:A1:1F:96:A0:00"));*/
> L2capAddr.l2_family = AF_BLUETOOTH;
> L2capAddr.l2_psm = htobs(SDP_PSM); // I sigth this valuer in Tsimbal code
> if(0 > bind(iSockFd, (struct sockaddr *)&L2capAddr, sizeof(L2capAddr)))
> {
> TRACE1("binding L2CAP socket: %s", strerror(errno));
> return -1;
> }
> incoming = listen(iSockFd, ACTIVE_CONN_MAX);
>
> But ACL connection don`t establishing. The hcidump on board give next chat
what about using "hcidump -X -V", because I am no longer decoding hex
numbers.
Regards
Marcel
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
prev parent reply other threads:[~2005-09-14 13:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-14 6:54 [Bluez-devel] L2CAP chnnel Артем Бизюков
2005-09-14 9:20 ` Stephen Crane
2005-09-14 13:15 ` 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=1126703758.16166.34.camel@station6.example.com \
--to=marcel@holtmann.org \
--cc=bluez-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.