|
Boost Users : |
Subject: Re: [Boost-users] Asio Serial ports: enumerating all the devices
From: Kerry, Richard (richard.kerry_at_[hidden])
Date: 2013-04-11 12:10:19
> I could ask the hardware guys to implement such a response,
> but then it would be added to the firm/hardware in a further
> release, not now.
So you are involved in designing hardware/embedded (ie your company is).
Which implies you do have a restricted list of possible devices connected.
> My question is also about: if the OS can list the connected
> serial devices (when plugging and unplugging the device, the
> content of /dev is automatically updated) why Boost could
> not? Could Boost benefit of the updated /dev content? Of
> course such a list would not detail hardware info (such as
> baudrate) but at least would propagate device presence to
> user code. Also, could it be done in a cross platform manner?
I work on Windows so I don't know about the cross-platform possibilities.
Though I have to say I'd be surprised if *devices* appeared and disappeared automatically in /dev.
I'd have expected there to be a list of *ports* which would appear there. If you're using network-connected serial ports (eg comtrol) then the collection there need not be fixed, but if your ports are part of your PC hardware then the number can't change (not without powering-down and opening it up).
Just because you've got a port doesn't mean there's anything connected to it.
And to get back anyting meaningful you need the baud rate etc. If you don't know that and it's set wrongly then you can sometimes get noise coming in that the serial port hardware thinks is data but there's nothing actually connected - or if the baud rate is set grossly wrong you can get data misinterpreted.
If your company is in control of the connected devices does that mean you have standard settings for baud rate etc ? That would help.
Do you mean that all the devices that could possibly be connected are from the same manufacturer ? (ie your company)
Regards,
Richard.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net