Open JoeKN2 opened 3 years ago
You can try switching the protocol with either:
airctrl --ipaddr 192.168.178.74 --protocol coap
or
airctrl --ipaddr 192.168.178.74 --protocol plain_coap
I tried booth:
pi@192.168.178.11:~$ airctrl --ipaddr 192.168.178.74 --protocol coap 2021-05-26 19:57:05,920 - MainThread - coapthon.layers.messagelayer - DEBUG - send_request - From None, To ('192.168.178.74', 5683), None-None, POST-Gz, [Uri-Path: sys, Uri-Path: dev, Uri-Path: sync, ] EA9262F7...8 bytes 2021-05-26 19:57:05,927 - MainThread - coapthon.client.coap - DEBUG - send_datagram - From None, To ('192.168.178.74', 5683), CON-17349, POST-Gz, [Uri-Path: sys, Uri-Path: dev, Uri-Path: sync, ] EA9262F7...8 bytes 2021-05-26 19:57:05,938 - Thread-1 - coapthon.client.coap - DEBUG - Start receiver Thread 2021-05-26 19:57:05,949 - Thread-1 - coapthon.client.coap - DEBUG - receive_datagram - From ('192.168.178.74', 5683), To None, NON-17349, CONTENT-Gz, [Content-Type: 0, ] 2FBE7DCE...8 bytes 2021-05-26 19:57:05,957 - Thread-1 - coapthon.layers.messagelayer - DEBUG - receive_response - From ('192.168.178.74', 5683), To None, NON-17349, CONTENT-Gz, [Content-Type: 0, ] 2FBE7DCE...8 bytes 2021-05-26 19:57:05,954 - MainThread-Retry-17349 - coapthon.client.coap - DEBUG - retransmit loop ... enter 2021-05-26 19:57:05,967 - MainThread-Retry-17349 - coapthon.client.coap - DEBUG - retransmit loop ... exit 2021-05-26 19:57:05,963 - Thread-1 - coapthon.client.coap - DEBUG - Waiting for retransmit thread to finish ... 2021-05-26 19:57:05,996 - MainThread - coapthon.layers.messagelayer - DEBUG - send_request - From None, To ('192.168.178.74', 5683), None-None, GET-None, [Uri-Path: sys, Uri-Path: dev, Uri-Path: status, Observe: 0, ] No payload 2021-05-26 19:57:06,002 - MainThread - coapthon.client.coap - DEBUG - send_datagram - From None, To ('192.168.178.74', 5683), CON-17350, GET-None, [Uri-Path: sys, Uri-Path: dev, Uri-Path: status, Observe: 0, ] No payload 2021-05-26 19:57:06,014 - MainThread-Retry-17350 - coapthon.client.coap - DEBUG - retransmit loop ... enter 2021-05-26 19:57:06,041 - Thread-1 - coapthon.client.coap - DEBUG - receive_datagram - From ('192.168.178.74', 5683), To None, CON-3270, CONTENT-None, [Observe: 0, Content-Type: 50, Max-Age: 60, ] EA9262F8948FB229EAF3...1142 bytes 2021-05-26 19:57:06,047 - Thread-1 - coapthon.layers.messagelayer - DEBUG - receive_response - From ('192.168.178.74', 5683), To None, CON-3270, CONTENT-None, [Observe: 0, Content-Type: 50, Max-Age: 60, ] EA9262F8948FB229EAF3...1142 bytes 2021-05-26 19:57:06,053 - Thread-1 - coapthon.client.coap - DEBUG - Waiting for retransmit thread to finish ... 2021-05-26 19:57:06,055 - MainThread-Retry-17350 - coapthon.client.coap - DEBUG - retransmit loop ... exit 2021-05-26 19:57:06,074 - Thread-1 - coapthon.layers.messagelayer - DEBUG - send_empty - From None, To None, ACK-None, EMPTY-None, [] No payload 2021-05-26 19:57:06,079 - Thread-1 - coapthon.client.coap - DEBUG - send_datagram - From None, To ('192.168.178.74', 5683), ACK-3270, EMPTY-None, [] No payload 2021-05-26 19:57:06,087 - Thread-1 - coapthon.layers.messagelayer - DEBUG - send_empty - From None, To None, ACK-None, EMPTY-None, [] No payload 2021-05-26 19:57:06,092 - Thread-1 - coapthon.client.coap - DEBUG - send_datagram - From None, To ('192.168.178.74', 5683), ACK-3270, EMPTY-None, [] No payload Message from device got corrupted 2021-05-26 19:57:06,203 - Thread-1 - coapthon.client.coap - DEBUG - Exiting receiver Thread due to request
pi@192.168.178.11:~$ airctrl --ipaddr 192.168.178.74 --protocol plain_coap
Traceback (most recent call last):
File "/usr/local/bin/airctrl", line 8, in
Same here with AC3036/10 and firmware 69.1 pi@raspberrypi:~ $ airctrl --ipaddr 192.168.2.159 --wifi Exchanging secret key with the device ... Traceback (most recent call last): File "/usr/lib/python3.7/urllib/request.py", line 1324, in do_open encode_chunked=req.has_header('Transfer-encoding')) File "/usr/lib/python3.7/http/client.py", line 1260, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1306, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1255, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1030, in _send_output self.send(msg) File "/usr/lib/python3.7/http/client.py", line 970, in send self.connect() File "/usr/lib/python3.7/http/client.py", line 942, in connect (self.host,self.port), self.timeout, self.source_address) File "/usr/lib/python3.7/socket.py", line 727, in create_connection raise err File "/usr/lib/python3.7/socket.py", line 716, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/airctrl", line 10, in
pi@raspberrypi:~ $ airctrl --ipaddr 192.168.2.159 --protocol plain_coap
Traceback (most recent call last):
File "/usr/local/bin/airctrl", line 10, in
Hi, I have new AC2729/10 device (AWS_Philips_AIR@54.2 Firmware). The android app is able to connect to the device. It has the fix IP 192.168.178.74 (host has the IP 192.168.178.11) I tried to connect but get an error:
pi@192.168.178.11:~$ sudo airctrl --ipaddr 192.168.178.74 Exchanging secret key with the device ... Traceback (most recent call last): File "/usr/local/lib/python3.8/urllib/request.py", line 1317, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "/usr/local/lib/python3.8/http/client.py", line 1230, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.8/http/client.py", line 1276, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.8/http/client.py", line 1225, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.8/http/client.py", line 1004, in _send_output self.send(msg) File "/usr/local/lib/python3.8/http/client.py", line 944, in send self.connect() File "/usr/local/lib/python3.8/http/client.py", line 915, in connect self.sock = self._create_connection( File "/usr/local/lib/python3.8/socket.py", line 807, in create_connection raise err File "/usr/local/lib/python3.8/socket.py", line 796, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/bin/airctrl", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/pyairctrl/airctrl.py", line 444, in main
c = HTTPAirCli(device["ip"])
File "/usr/local/lib/python3.8/site-packages/pyairctrl/airctrl.py", line 100, in init
self._client = HTTPAirClient(host, debug)
File "/usr/local/lib/python3.8/site-packages/pyairctrl/http_client.py", line 108, in init
self.load_key()
File "/usr/local/lib/python3.8/site-packages/pyairctrl/http_client.py", line 156, in load_key
self._get_key()
File "/usr/local/lib/python3.8/site-packages/pyairctrl/http_client.py", line 119, in _get_key
with urllib.request.urlopen(req) as response:
File "/usr/local/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/local/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/local/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.8/urllib/request.py", line 1346, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/local/lib/python3.8/urllib/request.py", line 1320, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
I tried it with and without sudo.
Any explanation for this behavior?