I'm trying to adapt rosraco to automatically configure my router, the TL-WR841N,
which seems quite similar to the TL-WR741N.
I created new classes by copying router/tplink/wr740n.py and router/tplink/wr741n.py.
I ran the following commands in the python console:
Traceback (most recent call last):
File "", line 1, in
File "roscraco/helper/init.py", line 7, in print_info
router_info = router_obj.get_router_info()
File "roscraco/router/tplink/base.py", line 40, in get_router_info
return _parse_router_info(self._get_status_array('statusPara'))
File "roscraco/router/tplink/base.py", line 36, in _get_status_array
return _extract_js_array_data(contents, array_name)
File "roscraco/router/tplink/base.py", line 159, in _extract_js_array_data
raise RouterParseError('Failed at evaluating array %s: %s' % (array_name, repr(e)))
roscraco.exception.RouterParseError: Failed at evaluating array statusPara: ValueError('substring not found',)
I printed the variable contents in the function _get_status_array in the file router/tplink/base.py.
The output I got corresponds to the login page of the router's interface.
I tried to understand when and how the login and password are sent to the router.
I understand that an "Authorization" string is build by _prepare_base64_auth_string in TplinkBase._perform_http_request.
It's then added to req and sent by requestor.urlopen in RouterBase._perform_http_request.
Did I do something wrong ? Are the two routers different ?
I haven't any clue on how to continue debugging. Can you give me some pointers ?
I'm trying to adapt rosraco to automatically configure my router, the TL-WR841N, which seems quite similar to the TL-WR741N. I created new classes by copying
router/tplink/wr740n.py
androuter/tplink/wr741n.py
.I ran the following commands in the python console:
And I got the following error:
I printed the variable
contents
in the function_get_status_array
in the filerouter/tplink/base.py
. The output I got corresponds to the login page of the router's interface.I tried to understand when and how the login and password are sent to the router. I understand that an "Authorization" string is build by
_prepare_base64_auth_string
inTplinkBase._perform_http_request
. It's then added toreq
and sent byrequestor.urlopen
inRouterBase._perform_http_request
.Did I do something wrong ? Are the two routers different ? I haven't any clue on how to continue debugging. Can you give me some pointers ?