Linux bluetooth development
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ users <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] BlueZ, testing socket
Date: Sat, 31 Mar 2007 15:32:05 +0200	[thread overview]
Message-ID: <1175347925.5815.236.camel@violet> (raw)
In-Reply-To: <ddea76ce0703310624h7db4f1d1n689ea1ed2062b382@mail.gmail.com>

Hi Meenakshi,

> This code below connects to the server socket and selects the protocol
> to be used (L2CAP), opens the socket for that protocol, creates a
> bluetooth address object and sets its port to the PSM and binds the
> socket to this address, tells the sockets to listen for incoming
> connections, creates a blank socket and pass it to the listening
> socket through accept (When this call completes the socket passed in a
> parameter is now fully connected and can be used to send and receive
> data) 
> 
> QUESTION: How do I test this socket works? I want to send a messge
> like "Hello World". Please help...anyone

you should have a look at l2test.c and rctest.c from bluez-utils.
However the simple answer is to use read() and write() on that specific
socket descriptor.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

      reply	other threads:[~2007-03-31 13:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-31 13:24 [Bluez-users] BlueZ, testing socket Meenakshi Seeballack
2007-03-31 13:32 ` 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=1175347925.5815.236.camel@violet \
    --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