From: steve.morard@epfl.ch
To: BlueZ users <bluez-users@lists.sourceforge.net>
Subject: [Bluez-users] AT Commands
Date: Tue, 17 Jul 2007 16:44:01 +0200 [thread overview]
Message-ID: <1184683440.469cd5b0dacda@webmail.epfl.ch> (raw)
Hello,
I'm currently trying to write a program that would allow me to send SMS via
bluetooth through my mobile phone. The problem that I have is that I'm not able
to receive and decode correctly the responses from the mobile. Here is a sample
of the code I'm using, which should retrieve the IMSI of the mobile:
s = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
status = connect(s, (struct sockaddr *)&addr, sizeof(addr); // addr being the
address of my mobile
char remote[1024] = {0};
status = write(s, "AT+CIMI\r", 8);
read(s,remote,1024) // s being the socket
printf("received [%s]\n", remote);
All what I get is
]eceived [AT+CIMI
Does anyone have an idea of what I'm doing wrong ?
Thanks in advance
Best Regards
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
next reply other threads:[~2007-07-17 14:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-17 14:44 steve.morard [this message]
2007-07-18 11:32 ` [Bluez-users] AT Commands Timothy Murphy
2007-07-18 12:45 ` steve.morard
-- strict thread matches above, loose matches on Subject: below --
2006-04-04 13:26 [Bluez-users] AT commands Sowmya Gattupalli
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=1184683440.469cd5b0dacda@webmail.epfl.ch \
--to=steve.morard@epfl.ch \
--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