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-12 05:48:44


Vincent,

Please can you make absolutely clear to us whether you are asking about serial ports, or serially-connected devices ?

(The serial ports themselves may be integral parts of the computer, or they may be accessed via USB, or Ethernet, or some other means)

The OS can know about serial ports - indeed I think it has to.

I think this is what is present in /dev. (if this is not so please can someone with Linux knowledge elaborate)

There is no way the OS can know about the serially-connected devices.

And no way of guaranteeing you can safely query devices.

When you meet a person you've never met before, and who speaks another language, you may think you are offering a respectful greeting, but the other person may hear an insult against his mother....

When you send your query message to a serially-connected device where you don't know what messages the device understands you may think you are saying "are you there ?" but the device may hear "launch the missiles". I leave it to you and your lawyers to consider whether you can accept this risk.

But if what you mean is serial ports, then all this is moot, and the OS can know, and ASIO might be able to enumerate them for you.

Helpfully,

Hopeully,

Richard.

[Blue line]
Richard Kerry
BNCS Engineer
T: +44 (0)20 82259063[cid:6E3BCE2-237A-4FADD-BB94-96842E0282_at_MimeCtl]<about:blank#>
M: +44 (0)7812 325518[cid:6E3BCE2-237A-4FADD-BB94-96842E0282_at_MimeCtl]<about:blank#>
Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ
richard.kerry_at_[hidden]<https://webmail.siemens-it-solutions.com/owa/redir.aspx?C=9fb20d019e3e4cb99344d708709a3177&URL=mailto%3arichard.kerry%40atos.net>
uk.atos.net<https://webmail.siemens-it-solutions.com/owa/redir.aspx?C=9fb20d019e3e4cb99344d708709a3177&URL=http%3a%2f%2fuk.atos.net%2fen-uk%2f>
[Atos logo]
This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable
________________________________
From: Boost-users [boost-users-bounces_at_[hidden]] on behalf of Vincent Boucher [vin.boucher_at_[hidden]]
Sent: 11 April 2013 17:21
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Asio Serial ports: enumerating all the devices

On 11 Apr 2013, at 18:10, Kerry, Richard wrote:

>> 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.

In a general manner, the end-user could potentially have (any) other serial devices connected, and we don't have control on them.

>> 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)

The Boost software I'm going to write should be stable enough for end-users even if our device XYZ is not connected but another ZZZ (incompatible) is found. It should gracely says "cannot find device XYZ". Or it should be able to connect to XYZ if both (XYZ and ZZZ) are connected and my device XYZ is located at an "unusual" port number (COM2 or 5 ...).

Regards,

Vincent

>
>
> Regards,
> Richard.
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users





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