I need a basic example for sending AT commands to mobile. This will require serial communication on COM port. If any one can send me any example of it. I want to do this using BOOST. By searching on GOOGLE I got this but this is not compiling. I know this code is wrong at several places. So can any give me a any right sample or modify it to be right.
#include <iostream>
#include
#include
#include
#include
#include
#include
void handler(const boost::system::error_code& error)
{
std::cout << "read" << std::endl;
}
int main(int argc, char* argv[])
{
using namespace std;
using namespace boost;
char read_msg_[512];
boost::asio::io_service io;
asio::serial_port theport(io,"COM7");
theport.async_read_some(boost::asio::buffer(read_msg_),handler);
io.run();
return 0;
}
Thank You
Rahul
To create something exceptional
________________________________
-Master4Master
"Confidentiality Warning: This message and any attachments are intended only for the use of the intended recipient(s), are confidential, and may be privileged. If you are not the intended recipient, you are hereby notified that any review, re-transmission, conversion to hard copy, copying, circulation or other use of this message and any attachments is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return email, and delete this message and any attachments from your system..
Virus Warning: Although I have taken reasonable precautions to ensure no viruses are present in this email, I cannot accept responsibility for any loss or damage arising from the use of this email or attachment."
Speak out for justice and peace,
even if your voice trembles.
________________________________
Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/