kefaslungu / resourceMonitor

Resource Monitor add-on for NVDA
GNU General Public License v2.0
13 stars 18 forks source link

Use a more reliable method to get the system's wireless network ssid name, and its strength. #16

Closed cary-rowen closed 1 year ago

cary-rowen commented 1 year ago

Better use direct wlanapi calls instead of netsh, as implemented in this addon: https://github.com/cary-rowen/WlanReporter

The original author is: @kvark128.

For me the current approach doesn't work at all:

I enter the following code in the NVDA Python console:

from subprocess import getoutput
getoutput("netsh wlan show interface")

The output is as follows:

'\n系统上有 1 个接口: \n\n 名称 : WLAN\n 描述 : Intel(R) Dual Band Wireless-AC 8265\n GUID : 53c5d6c5-c9ff-43bf-8737-b4cc19d09da8\n 物理地址 : dc:8b:28:26:70:55\n 状态 : 已连接\n SSID : BUU\n BSSID : 06:69:6c:89:82:43\n 网络类型 : 结构\n 无线电类型 : 802.11ac\n 身份验证 : 开放式\n 密码 : 无\n 连接模式 : 自动连接\n 信道 : 157\n 接收速率(Mbps) : 173.3\n 传输速率 (Mbps) : 173.3\n 信号 : 92%\n 配置文件 : BUU \n\n 承载网络状态 : 不可用\n'

Carlos-EstebanM commented 1 year ago

Hi all. In my laptop, the command NVDA+shift+8 doesn't work. The messaje is Signal strength not found. If I disconnect this computer from the network, the messaje of the addon reporting that the computer was disconnected from the network is not announced. I know that this function works for other users. The model of my laptop is HP serie 15-f2000 (277G5AV) and the network adapter is Realtek RTL8821CE 802.11ac PCIe Adapter. Regards.

CyrilleB79 commented 1 year ago

Hi @kefaslungu

I am using version 23.05 of this add-on. I still get the following error when trying to have wireless SSID name and strength reported:

ERROR - scriptHandler.executeScript (11:53:40.773) - MainThread (5976):
error executing script: <bound method GlobalPlugin.script_network_information of GlobalPlugin ('globalPlugins.resourceMonitor')> with gesture 'majuscule+NVDA+8'
Traceback (most recent call last):
  File "scriptHandler.pyc", line 289, in executeScript
  File "C:\Users\Cyrille\AppData\Roaming\nvda\addons\resourceMonitor\globalPlugins\resourceMonitor\__init__.py", line 365, in script_network_information
    network_info = getoutput("netsh wlan show interface")
  File "subprocess.pyc", line 630, in getoutput
  File "subprocess.pyc", line 611, in getstatusoutput
  File "subprocess.pyc", line 411, in check_output
  File "subprocess.pyc", line 490, in run
  File "subprocess.pyc", line 951, in communicate
  File "encodings\cp1252.pyc", line 23, in decode
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 262: character maps to <undefined>

I am using a French system (Windows 10 21H2 (AMD64) build 19044.3086) and calling "netsh wlan show interface" in the console outputs text containing non-ASCII characters (e.g. "é").

I can see that you have a 23.05.1 release, but this release is not on the add-on store. And I remember that a release causing issues had been removed from the add-on store.

Can you indicate when there will be a release fixing this issue? Or if there is already one, update the add-on store? Thanks!

Carlos-EstebanM commented 1 year ago

Hi all. I updated the addon to the version 23.05.1, and the command NVDA+shift+8 work in my computer. Also, the announce of the connection and disconnection works fine. Is necessary update the addon store. Regards.

josephsl commented 1 year ago

Hi, Resource Monitor 23.05.1 was removed from add-on store due to an issue where it does not work on computers with no wi-fi adapters. Also, if I read correctly, lan reporter add-on is now part of add-on store. Thanks.

cary-rowen commented 1 year ago

Hi Is it possible to incorporate WlanReportr into this add-on I think need to communicate with @kvark128. Of course, no doubt, I approve of this, but I'm also looking forward to a 23.05.1 fix.

Thanks

kefaslungu commented 1 year ago
Hi,Some part of wlanReporter will be in resourceMonitor 23.06But not all because of computers not having wireless cards. Thanks,Sent from Kefas Lungu From: RowenSent: 28 June 2023 16:08To: kefaslungu/resourceMonitorCc: Kefas Lungu; MentionSubject: Re: [kefaslungu/resourceMonitor] Use a more reliable method to get the system's wireless network ssid name, and its strength. (Issue #16) HiIs it possible to incorporate WlanReportr into this add-on I think need to communicate with @kvark128.Of course, no doubt, I approve of this, but I'm also looking forward to a 23.05.1 fix.Thanks—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***> 
cary-rowen commented 1 year ago

19 Is the bug fixed? Can this Issue be closed?

kefaslungu commented 1 year ago
Yes please. Sent from ***@***.*** From: RowenSent: 04 July 2023 14:42To: kefaslungu/resourceMonitorCc: Kefas Lungu; MentionSubject: Re: [kefaslungu/resourceMonitor] Use a more reliable method to get the system's wireless network ssid name, and its strength. (Issue #16) #19 Is the bug fixed? Can this Issue be closed?—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***> 
cary-rowen commented 1 year ago

But unfortunately 23.06 doesn't contain the fix for #19.

cary-rowen commented 1 year ago

Hi @kefaslungu Can you create a version for this that includes the latest fixes? For example 23.06.1 Thanks