• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Enter at commands to mobile phone using bluetooth
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enter at commands to mobile phone using bluetooth


  • Subject: Re: Enter at commands to mobile phone using bluetooth
  • From: Nicko van Someren <email@hidden>
  • Date: Fri, 16 Apr 2004 16:15:47 +0100

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.


  • Follow-Ups:
    • Re: Enter at commands to mobile phone using bluetooth
      • From: Nathanael P <email@hidden>
References: 
 >Re: Enter at commands to mobile phone using bluetooth (From: Nathanael P <email@hidden>)

  • Prev by Date: Re: Enter at commands to mobile phone using bluetooth
  • Next by Date: Re: SCO problems with my custom HCI controller
  • Previous by thread: Re: Enter at commands to mobile phone using bluetooth
  • Next by thread: Re: Enter at commands to mobile phone using bluetooth
  • Index(es):
    • Date
    • Thread