Re: Enter at commands to mobile phone using bluetooth
Re: Enter at commands to mobile phone using bluetooth
- Subject: Re: Enter at commands to mobile phone using bluetooth
- From: Nathanael P <email@hidden>
- Date: Thu, 29 Apr 2004 00:17:14 -0700 (PDT)
Thanks for the correction.
Now I want to receive the reply from at command.
How do I implement:
-
(void)rfcommChannelData:(IOBluetoothRFCOMMChannel*)rfcommChannel
data:(void *)dataPointer length:(size_t)dataLength;
?
Where should I put this code?
Thanks...
Nathanael
--- Nicko van Someren <email@hidden> wrote:
>
On 16 Apr 2004, at 4:52, Nathanael P wrote:
>
> ... I am
>
> going to write a program with xcode that could
>
sends
>
> at command using bluetooth and recieve response
>
(like
>
> hyper terminal in windows).
>
>
> [mRFCOMMChannel writeSync:"at+cmgf=1/n"
>
length:16];
>
>
>
> Do I make mistakes? Thanks for your help.
>
>
There are three mistakes on that last line.
>
>
Firstly, the length of the data you are sending
>
looks like it was
>
intended to be 10 bytes, so you need to set the
>
length to that. Since
>
you are only sending strings rather than binary data
>
I would recommend
>
using something like:
>
char *s;
>
...
>
s = "<your command to send>";
>
[mRFCOMMChannel writeSync: s length: strlen(s)];
>
>
Secondly, you have the slash the wrong way around;
>
I'm pretty sure that
>
you meant to write "at+cmgf=1\n"
>
>
Thirdly, you shouldn't be using "\n" (new line)
>
anyway, you should be
>
sending a "\r" (carriage return) instead.
>
>
Cheers,
>
Nicko
>
_______________________________________________
>
bluetooth-dev mailing list |
>
email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/bluetooth-dev
>
Do not post admin requests to the list. They will be
>
ignored.
>
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
_______________________________________________
bluetooth-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/bluetooth-dev
Do not post admin requests to the list. They will be ignored.