Closed RicArch97 closed 3 years ago
@RicArch97 If the user provided a port, it should raise an error if the handshake fails. If the user does not provide one and the lib has to search, we search over and over.
@RicArch97 If the user provided a port, it should raise an error if the handshake fails. If the user does not provide one and the lib has to search, we search over and over.
Should we continue the search when we get a serial error during the connection attempt of a certain device?
If the user provides a port were not allowed to look at other ports. We could retry that specific port if the error implies that that might work (ie. Busy) but otherwise it’s better to let the user know his port does not work.
From: Ricardo Steijn @.> Sent: Thursday, May 6, 2021 6:42:35 PM To: crownstone/crownstone-lib-python-uart @.> Cc: Alex @.>; Mention @.> Subject: Re: [crownstone/crownstone-lib-python-uart] Add exception queues to threads to handle errors in the calling thread. (#8)
@RicArch97https://github.com/RicArch97 If the user provided a port, it should raise an error if the handshake fails. If the user does not provide one and the lib has to search, we search over and over.
Should we continue the search when we get a serial error during the connection attempt of a certain device?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/crownstone/crownstone-lib-python-uart/pull/8#issuecomment-833675604, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABI5MTNZJW4KJXEV4FHNPITTMLBHXANCNFSM44FWC6PA.
This PR adds exception queues to the
UartManager
andUartBridge
threads to be able to handle any exceptions occurring in those threads, in the calling threads.@AlexDM0 If handshake is not successful and we get receive an exception from the bridge (serial error), do we immediately quit or do we still check the other ports? It currently does the first thing. If a serial error occurs (let's say, no user access to port because not in serial group), it's unlikely it will work for other serial ports anyway.