Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue obtaining Link Metrics with OpenWRT #50

Open
phpaiva opened this issue Nov 28, 2019 · 0 comments
Open

Issue obtaining Link Metrics with OpenWRT #50

phpaiva opened this issue Nov 28, 2019 · 0 comments

Comments

@phpaiva
Copy link

phpaiva commented Nov 28, 2019

I run the following code, to see mode and properies of the wlan1 interface:

from __future__ import print_function 
import argparse as ap              
import sys         
import pyric        
import pyric.pyw as pyw               
from pyric.utils.channels import rf2ch 

w0 = pyw.getcard('wlan1') 

print (pyw.modeget(w0)) #averiguar modo

link=pyw.link(w0) #mostrar info de enlaces

for d in link:
	print (d, link[d])

But it raises the following:

AP
Traceback (most recent call last):
File "/tmp/Desarrollo_GauchoMesh/pyric/lib/libnl.py", line 247, in nl_recvmsg
_ = nlmsg_fromstream(sock.recv())
File "/tmp/Desarrollo_GauchoMesh/pyric/lib/libnl.py", line 152, in recv
return self['sock'].recv(self.rx)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/tmp/Desarrollo_GauchoMesh/pyric/pyw.py", line 1688, in link
rmsg = nl.nl_recvmsg(nlsock)
File "/tmp/Desarrollo_GauchoMesh/pyric/lib/libnl.py", line 255, in nl_recvmsg
raise error(-1,"Socket timed out")
libnl.error: [Errno -1] Socket timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "pruebas_nl80211.py", line 23, in
link=pyw.link(w0) #mostrar info de enlaces
File "/tmp/Desarrollo_GauchoMesh/pyric/pyw.py", line 1675, in link
if nlsock is None: return nlstub(link, card)
File "/tmp/Desarrollo_GauchoMesh/pyric/pyw.py", line 2279, in nlstub
return fct(*argv)
File "/tmp/Desarrollo_GauchoMesh/pyric/pyw.py", line 1692, in link
raise pyric.error(e.errno, e.strerror)

Look that the first line says "AP", which is the mode of the interface, that is OK. The problem is with the link method.

Any clue or suggestion is welcome.

Thanks in advance.

Pablo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant