* [Bluez-devel] how to create rfcomm channel @ 2007-02-28 15:31 siddhant tewari 2007-03-01 4:41 ` Vikas Sinha 0 siblings, 1 reply; 6+ messages in thread From: siddhant tewari @ 2007-02-28 15:31 UTC (permalink / raw) To: bluez-devel [-- Attachment #1.1: Type: text/plain, Size: 110 bytes --] hi, I would like to know is there any api for c language that can create rfcomm channel. regards siddhant [-- Attachment #1.2: Type: text/html, Size: 136 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bluez-devel] how to create rfcomm channel 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 0 siblings, 1 reply; 6+ messages in thread From: Vikas Sinha @ 2007-03-01 4:41 UTC (permalink / raw) To: BlueZ development [-- Attachment #1.1: Type: text/plain, Size: 982 bytes --] Hi Siddhant http://www-md.e-technik.uni-rostock.de/ma/hm27/uebung_hnp_2004/documentation/bluez-2.10-html/ you can have a look to these files containing bluez reference code. What exactly you want to do? On 2/28/07, siddhant tewari <siddhant.tewari@gmail.com> wrote: > > hi, > I would like to know is there any api for c language that can create > rfcomm channel. > > 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: 1920 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bluez-devel] how to create rfcomm channel 2007-03-01 4:41 ` Vikas Sinha @ 2007-03-01 5:40 ` siddhant tewari 2007-03-01 12:18 ` Vikas Sinha 0 siblings, 1 reply; 6+ messages in thread From: siddhant tewari @ 2007-03-01 5:40 UTC (permalink / raw) To: BlueZ development [-- Attachment #1.1: Type: text/plain, Size: 906 bytes --] 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 [-- Attachment #1.2: Type: text/html, Size: 1636 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bluez-devel] how to create rfcomm channel 2007-03-01 5:40 ` siddhant tewari @ 2007-03-01 12:18 ` Vikas Sinha 2007-03-05 9:33 ` siddhant tewari 0 siblings, 1 reply; 6+ messages in thread From: Vikas Sinha @ 2007-03-01 12:18 UTC (permalink / raw) To: BlueZ development [-- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bluez-devel] how to create rfcomm channel 2007-03-01 12:18 ` Vikas Sinha @ 2007-03-05 9:33 ` siddhant tewari 2007-03-05 11:07 ` Vikas Sinha 0 siblings, 1 reply; 6+ messages in thread From: siddhant tewari @ 2007-03-05 9:33 UTC (permalink / raw) To: BlueZ development [-- Attachment #1.1: Type: text/plain, Size: 3451 bytes --] hi vikas, Thanks for replying and going through my mail. As suggested by marcel , now i am using rfcomm sockets directly without using virtual tty layer and till now (fingers crossed) things are working fine. Example code in rctest.c really helped a lot. By the way i am sending file using obex_push service by calling pi from open obex.What i was doing was , through the code i wrote above , i made a device special file , which i then passed to the obex pi for performing obex push. Now instead of passing the file path i am passing the rfcomm socket id directly which is working fine.I hope this is the right way of doing things. regards siddhant On 3/1/07, Vikas Sinha <compuvikas@gmail.com> wrote: > > 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 > > ------------------------------------------------------------------------- > 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 > > [-- Attachment #1.2: Type: text/html, Size: 5912 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bluez-devel] how to create rfcomm channel 2007-03-05 9:33 ` siddhant tewari @ 2007-03-05 11:07 ` Vikas Sinha 0 siblings, 0 replies; 6+ messages in thread From: Vikas Sinha @ 2007-03-05 11:07 UTC (permalink / raw) To: BlueZ development [-- Attachment #1.1: Type: text/plain, Size: 4591 bytes --] Hi Siddhant, yes you are right. I have done something like that. I have created a general file pusher works over rfcomm using open obex. Same as u are creating device special file I create then for next transaction (for other device) i need t destroy it. Its g8 u got ur solution. On 3/5/07, siddhant tewari <siddhant.tewari@gmail.com> wrote: > > hi vikas, > Thanks for replying and going through my mail. As suggested > by marcel , now i am using rfcomm sockets directly without using virtual tty > layer and till now (fingers crossed) things are working fine. Example code > in rctest.c really helped a lot. > > By the way i am sending file using obex_push service by calling pi from > open obex.What i was doing was , through the code i wrote above , i made a > device special file , which i then passed to the obex pi for performing obex > push. Now instead of passing the file path i am passing the rfcomm socket id > directly which is working fine.I hope this is the right way of doing > things. > > regards > siddhant > > On 3/1/07, Vikas Sinha <compuvikas@gmail.com > wrote: > > > > 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 > > > > > > ------------------------------------------------------------------------- > > 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 > > > > > > ------------------------------------------------------------------------- > 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: 7683 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-03-05 11:07 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2007-03-05 9:33 ` siddhant tewari 2007-03-05 11:07 ` Vikas Sinha
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox