From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Cc: bluez-users@lists.sourceforge.net
Subject: Re: [Bluez-users] [Bluez-devel] How to send file using File Transfer Protocol
Date: Thu, 08 Jun 2006 09:21:08 +0200 [thread overview]
Message-ID: <1149751268.27331.9.camel@localhost> (raw)
In-Reply-To: <e85851c20606072213o130384b3u38242e415dc6271b@mail.gmail.com>
Hi Gloria,
> I want to ask you about the way to send file using File
> Transfer Protocol.
> Here my code :
>
> int main(){
> bdaddr_t src,dest;
> uint8_t channel = 0;
> int mode,od;
> unsigned char *buf;
> size_t len;
>
>
> bacpy(&src,BDADDR_ANY);
> str2ba("xx:xx:xx:xx:xx:xx",&dest); //xx is my bluetooth address
>
> if((!channel)&&(!sdp_get_ftp_channel(&src,&dest,&channel))){
> printf("Can't retrieve RFCOMM OBEX channel\n");
> exit(1);
> }
>
> if((od=obex_open(&src,&dest,channel))<0){
> perror("Can't establish OBEX connection\n");
> exit(1);
> }
>
> mode = OBEX_FILE_TRANSFER;
> obex_connect(od,mode);
> printf("connected\n");
>
> obex_setpath(od, "C:/", 0x03);
using the FTP profile you are not using Windows alike paths. This is not
how it works and all paths are mapped under a root directory. So leave
this command out and try again.
> NB : The function used in main function has declared.
And your code has do be licensed under GPL.
Regards
Marcel
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
prev parent reply other threads:[~2006-06-08 7:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-08 5:13 [Bluez-devel] How to send file using File Transfer Protocol Gloria Saripah Patara
2006-06-08 7:21 ` 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=1149751268.27331.9.camel@localhost \
--to=marcel@holtmann.org \
--cc=bluez-devel@lists.sourceforge.net \
--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).