Esp32 microcontroller is not handled as Albatross display#15693
Esp32 microcontroller is not handled as Albatross display#15693burmancomp wants to merge 30 commits into
Conversation
|
I think there could be a more generic way to do this in bdDetect. Actually, taking the bus reported device description into account is pretty neat, because that ensures bdDetect can filter out devices earlier. |
|
Hello. I will test it and return back with results. |
|
It seems bug with false-positive was fixed. Only one thing, when i am plugging in ESP32 board, sometimes i am getting an error: |
|
This PR should be merged to 2023.3 release, as it makes screenreader experience very bad when connecting a microcontroller like esp32. |
|
it is not necessary to merge this to 2023.3 as there are several workarounds. You can for example exclude the Albatross driver from automatic detection. |
|
Thank you @beqabeqa473, nice if it fixes issue. @LeonarddeR do you think that if this (or more generic solution) is merged, albatross detection should not conflict with other drivers anymore? |
|
I can exclude, but NVDA users which would stuck with this problem,
will have undesired side-effects.
It is not a serious comment.
…On 10/27/23, burmancomp ***@***.***> wrote:
Thank you @beqabeqa473, nice if it fixes issue.
@LeonarddeR do you think that if this (or more generic solution) is merged,
albatross detection should not conflict with other drivers anymore?
--
Reply to this email directly or view it on GitHub:
#15693 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
--
with best regards Beqa Gozalishvili
Tell: +995593454005
Email: ***@***.***
Web: https://gozaltech.org
Skype: beqabeqa473
Telegram: https://t.me/gozaltech
facebook: https://facebook.com/gozaltech
twitter: https://twitter.com/beqabeqa473
Instagram: https://instagram.com/beqa.gozalishvili
|
|
@LeonarddeR I will be happy to hear from you an answer, how person which can have such device, which is not so difficult to find, could understand that it is because of this particular braille display. Why person should have to go through this journey if we already discovered it and fix is working? |
|
Basically I don't have anything to say about this since I'm not NV Access. |
|
Yes, can confirm that, however i started to experience this issue not
so long time ago.
Maybe i just didn't use braille display before and i had no braille
selected by dewfault.
Anyway, it is better to do it now than wait for one more release to
not experience this issue anymore for other potential users.
…On 10/27/23, Leonard de Ruijter ***@***.***> wrote:
Basically I don't have anything to say about this since I'm not NV Access.
I'm however pretty sure that issue exists since 2023.1 already.
--
Reply to this email directly or view it on GitHub:
#15693 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
--
with best regards Beqa Gozalishvili
Tell: +995593454005
Email: ***@***.***
Web: https://gozaltech.org
Skype: beqabeqa473
Telegram: https://t.me/gozaltech
facebook: https://facebook.com/gozaltech
twitter: https://twitter.com/beqabeqa473
Instagram: https://instagram.com/beqa.gozalishvili
|
LeonarddeR
left a comment
There was a problem hiding this comment.
As said above, I personally prefer a more generic approach. Would it be possible to extend hwPortUtils.listComPorts to retrieve the name of the controller behind the COM port? That can then be added to the yielded dictionary. The albatross driver then can filter as appropriate. IN a follow up, we can move the filtering to bdDetect.
|
I am also working on a braille driver for a device that unfortunately has a fairly generic VID/PID combination. I would also like to use the bus description there to minimize false positives, so I would also prefer this as a generic solution in bdDetect. Regarding the discussion of autodetection of the Albatross driver. It is not for me to decide on this, but due to this issue and other issues in the past that stem from the weird way an Albatross has to be detected, I would not mind if we exclude it from autodetection by default. But that discussion is clearly outside the scope of this PR. |
|
I also prefer generic solution but it sounds too difficult task for me now. |
|
I will perform some research on it on monday, when I have a device with the same VID/PID at hand. @beqabeqa473 could you provide a dump of the following from the python console? import hwPortUtils
list(hwPortUtils.listComPorts()) |
|
Hi Leonard
Here are results.
{'hardwareID': 'FTDIBUS\\COMPORT&VID_0403&PID_6001', 'port': 'COM4',
'usbID': 'VID_0403&PID_6001', 'friendlyName': 'USB Serial Port
(COM4)'}
…On 10/28/23, Leonard de Ruijter ***@***.***> wrote:
I will perform some research on it on monday, when I have a device with the
same VID/PID at hand.
@beqabeqa473 could you provide a dump of the following from the python
console?
```python
import hwPortUtils
list(hwPortUtils.listComPorts())
```
--
Reply to this email directly or view it on GitHub:
#15693 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
--
with best regards Beqa Gozalishvili
Tell: +995593454005
Email: ***@***.***
Web: https://gozaltech.org
Skype: beqabeqa473
Telegram: https://t.me/gozaltech
facebook: https://facebook.com/gozaltech
twitter: https://twitter.com/beqabeqa473
Instagram: https://instagram.com/beqa.gozalishvili
|
|
Converting to draft until the design discussion resolves |
|
@burmancomp You can edit hwPortUtils.py as follows: Above SPDRP_DEVICEDESC = 0Below # Device description
if not SetupDiGetDeviceRegistryProperty(
g_hdi,
ctypes.byref(devinfo),
SPDRP_DEVICEDESC,
None,
ctypes.byref(buf), ctypes.sizeof(buf) - 1,
None
):
# Ignore ERROR_INSUFFICIENT_BUFFER
if ctypes.GetLastError() != ERROR_INSUFFICIENT_BUFFER:
raise ctypes.WinError()
else:
description = entry["deviceDescription"] = buf.valueThen, on the python console: import hwPortUtils
list(hwPortUtils.listComPorts())Pretty curious whether the device description for albatross is set correctly, or whether it is just the default |
|
If you mean bus reported device description of usb serial port found in windows device manager (ports (com and lpt)), it is usb serial port. |
|
But bus reported device description of usb serial converter (found in usb drivers) is "Albatross Braille Display". |
|
Thanks, so this is not going to work, we need to look up the bus description of the serial converter instead. |
|
In registry editor I searched "Albatross Braille Display", and there was no other entries. |
|
Are there any news with this? |
|
Hello. I will test it out once it builds |
|
I hope this is fixed for now. I was not able to reproduce this with several nvda restarts with device plugged in, connections/disconnections. Port is beeing logged in log but is not detected as albatros device. There are some errors in hwio like: Thanks you @burmancomp and @LeonarddeR for fixes. |
LeonarddeR
left a comment
There was a problem hiding this comment.
Thanks @burmancomp
I think this branch needs to be merged into beta, but @seanbudd will probably handle appropriately.
|
@burmancomp - this needs to be rebased on beta and retarget beta if you wish to include in 2024.1. Note, this isn't considered a high priority fix, and is welcome to target 2024.2. |
@beqabeqa473 what do you think? @seanbudd let me know if there is something I should do as to rebasing/retargeting if decision is to take this to 2024.1. |
|
I think it would be nice to get this fix in, particularly if you can rebase in the next week. |
|
I have no experience about that process. Is there any documentation? |
|
You need to perform GitHub docs (good background): https://docs.github.com/en/get-started/using-git/about-git-rebase Manual: https://git-scm.com/docs/git-rebase Atlassian docs (more details, however have some inaccessible diagrams): https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase |
|
Something like this?
What to do with comments where main branch is merged to esp32IsNotHandledAsAlbatrossDisplay? Could they be deleted or should some of them included like them which fix merge conflicts? And should all commits squashed/fixed so that result is single commit? |
|
If nvaccess is your origin for this repo, this should be the easiest method. First, rebase on master, this will make the rebase on beta easier. git fetch nvaccess
git checkout esp32IsNotHandledAsAlbatrossDisplay
git rebase --keep-base -i nvaccess/masterYou'll want to "pick" the first commit with P. Now rebase on beta git fetch nvaccess
git checkout esp32IsNotHandledAsAlbatrossDisplay
git rebase -i nvaccess/betaYou'll want to "drop" everything from master, (e.g. the "Start 2024.2" commit). |
|
i think it should be included in 2024.1 to eliminate possible problems which could be serious if someone stucks with it. |
|
You have to do a git push -f at the end. then you commits should go to Beta directly if your local branch is properly rebased. But i advice to do a before pushing, to see what exactly your push will do to the beta branch. |
|
I checked with:
As far as I understand diff showed that lines this pr adds would be added. but
shows a lot of differences. May this be because I have not pushed esp32IsNotHandledAsAlbatrossDisplay after rebasing? |
|
YesVon meinem iPhone gesendetAm 16.12.2023 um 09:29 schrieb burmancomp ***@***.***>:
I checked with:
git diff nvaccess/beta esp32IsNotHandledAsAlbatrossDisplay
As far as I understand diff showed that lines this pr adds would be added.
but
git diff nvaccess/beta origin/esp32IsNotHandledAsAlbatrossDisplay
shows a lot of differences. May this be because I have not pushed esp32IsNotHandledAsAlbatrossDisplay after rebasing?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
|
In your case origin is the upstream repository you forged from NV Access and remote is the original NV Access repo, not the copy of it. So that's probably why you see the differences. |
|
There is pull request #15928 now. I pushed with:
|
|
Closing in favour of #15928 |
Link to issue number:
fixes #15671
Summary of the issue:
Albatross driver handled Esp32 microcontroller as Albatross display if controller send valid init packet. This is problem especially when displays are detected automatically.
Description of user facing changes
When using usb connection, driver can check that bus reported device description is "Albatross Braille Display". Esp32 is not detected automatically as Albatross.
Description of development approach
_searchPortsfunction blocks port if VID and PID are correct but bus reported bus reported device description is not "Albatross Braille Display", in other cases port is valid to try to connect.Testing strategy:
tested by @beqabeqa473
Known issues with pull request:
Code Review Checklist: