Boost logo

Boost Users :

Subject: Re: [Boost-users] Asio Serial ports: enumerating all the devices
From: Kerry, Richard (richard.kerry_at_[hidden])
Date: 2013-04-11 11:44:53


> I guess that it might be harmful for some other devices that
> could mis-interpret my "poll" message or not handle it correctly.

Each type of device will have its own protocol/command set.
If you try sending the same command to a variety of ports with unknown devices on them you could indeed cause problems.
Consider if, in response to a command, say "abc123" :
  One device returns "I'm here"
  Another device formats all its disks and performs a Factory Reset .....

With serial control you need to know what you are talking to.
Or at least you need to know the possible set of devices (ie protocols) you are talking to.
Ideally you know in advance, via some sort of configuration.
If you are in the position you appear to be, where you don't know, then you do at least need to know the set of possible devices/protocols, as you need to select suitable commands for polling.

"preparing my device to answer to a custom poll message "
Do you mean you are also in control of the embedded software within the device ?
Ie that you are making hardware so can get this sorted out for your own purposes ?
Or is this not so and you are dealing with existing serial devices ?

Unhelpfully,
Regards,
Richard.

BNCS Engineer.
Ie my job is largely concerned with interfacing between PCs and a wide variety of manufacturers' devices. The devices may be on serial connections, or TCP, or UDP (eg SNMP) or other network connection, or sometimes GPIs. I think we have a few on USB. And some actually have their interface handled via a manufacturer-supplied library and API, so we don't see the hardware connection directly.
For each protocol, or device type, we have a separate driver program. So it is necessary to know in advance what devices are to be controlled as we need to know what to run, and what address/port the device is connected to.

 

> -----Original Message-----
> From: Boost-users
> [mailto:boost-users-bounces_at_[hidden]] On Behalf Of
> Vincent Boucher
> Sent: 11 April 2013 16:28
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] Asio Serial ports: enumerating all
> the devices
>
> Thanks, I understand there's no other hope than preparing my
> device to answer to a custom poll message and checking the
> returned message (if any) to see if my device is connected.
>
> I guess that it might be harmful for some other devices that
> could mis-interpret my "poll" message or not handle it correctly.
>
> Vincent
>
> On 11 Apr 2013, at 17:00, Kerry, Richard wrote:
>


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