Linux bluetooth development
 help / color / mirror / Atom feed
From: "Vikas Sinha" <compuvikas@gmail.com>
To: "BlueZ development" <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] how to create rfcomm channel
Date: Thu, 1 Mar 2007 17:48:08 +0530	[thread overview]
Message-ID: <1ab01fb50703010418i4b4738ebya621923466eaaeb6@mail.gmail.com> (raw)
In-Reply-To: <57c68ddc0702282140j2561f505uc79584eecb7c60dd@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2068 bytes --]

Hi Siddhant,

ur code seems to be fine. I think there are some problem in releasing
device. Generally Bad File Descriptor comes if socket does not get closed
properly. Actually rfcomm takes some time to set free device. try to put
some sleep time in between release and again bind.  Even binding at hci
layer is longer then rfcomm layer.  But can u tell me how did u send file to
your handset. or ur testing it with pc to pc.

hcidump will also be useful.

On 3/1/07, siddhant tewari <siddhant.tewari@gmail.com> wrote:
>
> hi vikas ,
>             Really great to get i reply from you. I was trying to write a
> program that can send file to my nokia phone. I was looking for a api that
> can create a character device which can be passed to ioctl.  To do so what i
> am doing right now is
>
> i)              char cmdBuf[256];
>                 sprintf(cmdBuf,"mknod %s c 216 %d",tempBuf,dev);
>                 if (system(cmdBuf) != 0 )
>                 {
>                     fprintf(stderr,"\nError in executng mknod\n");
>                     exit(1);
>                 }
>
> ii) And then
> err = ioctl(ctl, RFCOMMCREATEDEV, &req);
>
> iii) For releasing the device i am doing :-
> err = ioctl(ctl, RFCOMMRELEASEDEV, &req);
>
> These things are working fine for a single run but after 2 run (keeping
> the above 3 in while(1) block) ;  while releasing the device , ioctl gives
> error bad file descriptor. Please tell me what i am doing wrong.
>
> regards
> siddhant
>
>
>
>
> -------------------------------------------------------------------------
> 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-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
>


-- 
Impossible
itself contain
I M Possible

Vikas

[-- Attachment #1.2: Type: text/html, Size: 3560 bytes --]

[-- Attachment #2: Type: text/plain, Size: 345 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2007-03-01 12:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-28 15:31 [Bluez-devel] how to create rfcomm channel siddhant tewari
2007-03-01  4:41 ` Vikas Sinha
2007-03-01  5:40   ` siddhant tewari
2007-03-01 12:18     ` Vikas Sinha [this message]
2007-03-05  9:33       ` siddhant tewari
2007-03-05 11:07         ` Vikas Sinha

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=1ab01fb50703010418i4b4738ebya621923466eaaeb6@mail.gmail.com \
    --to=compuvikas@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox