I have a problem with the boost::asio::serial_port class reading from a GPS device (USB-Serial). Connecting the device and reading from it works fine, but when I disconnect and reconnect the device, read_some doesn't read any bytes from the port.
A couple of weeks ago I posted a simple asynchronous demonstration of a telnet client using boost asio TCP network code. I have changed this code to turn it into a simple serial terminal application using the serial port support in the new version of boost asio.
It required no changes at all the the read or write code. I just altered the initialization to use a serial port instead of a socket. Note that this is not intended to show how a fully functional application would work.
There are plenty of areas that are not handled in this code. But it shows the idea and it's easy to build on this once you've got it working. Hope this helps someone else get started. Jeff Andrew Maclean 6/10/2008, 19:23 น.
Once again a nice example. On line 34 just change: if (not serialPort.isopen) to: if (!serialPort.isopen) The CMakeLists.txt file I posted in your telent client thread also works here by changing two lines, line 1 the project name and line 92 the source file. These are good convincing demonstrations of the utulity of asio! Thanks Andrew Boost-users mailing list - Andrew J.
Maclean Centre for Autonomous Systems The Rose Street Building J04 The University of Sydney 2006 NSW AUSTRALIA Ph: +61 2 9351 3283 Fax: +61 2 9351 7474 URL: Boost-users mailing list jhodapp 25/1/2011, 19:23 น. Jeff, I am writing to get your permission to use your simple serial port example, minicom, based on boost::serialport in my open source project. Your example was most useful and the only example that I could find that would adequately show an effective way to use serialport and also boost::asio::ioservice with it. I have based the structure of my implementation on what you have done with some adaptations. For your information, my project will be licensed under the Simplified BSD License.
Thanks, Jim - View this message in context: Sent from the Boost - Users mailing list archive at Nabble.com. Boost-users mailing list jhodapp 27/8/2011, 7:53 น. On Aug 27, 2011, at 9:55 AM, drwho via Boost wrote: New to boost. (Ubuntu 10.10) Downloaded boost 1.47 source.
Built it with./bootstrap.sh and./b2 Keep getting linker failure, undefined reference to `boost::system::getsystemcategory in my QT app. Tried your serial example from bash, same thing.
I am trying to get my RP communicating with my Arduino using Boost ASIO but having some problems. When i try to run my program it does nothing for a while and then I get an error from boost: what: Input/output error The same code runs fine on another computer (although other pc has Boost 1.46.1, RPi has 1.42.0) The Arduino is connected to the RP via a USB lead and a powered USB hub. The Arduino serial connection appears as /dev/ttyACM0 and I use this to initialise the serial connection in boost.
Anyone else tried serial-Arduino communication in C? I don't need to use Boost, but this seemed like the easiest option.