stevejcl / PhotoPolarAlign

A python utility to help align equatorial telescopes by imaging the Celestial Pole region.
The Unlicense
1 stars 1 forks source link

Bluetooth not connecting UBUNTU 2.0 #4

Open macicco opened 2 months ago

macicco commented 2 months ago

I have issues with bluetooth connections. It is not working. If I go to Ubuntu config -> bluetooth -> devices -> connect, dwarf is connected, but not in your script it keeps the "Error, retry" at html, and not connected as well at the menu gui

macicco commented 2 months ago

I followed your instructions: "You can Click on F12 to see the logs, was working before? the install process resets the config files, so need to update it before test".

still Not working .

macicco commented 2 months ago

python3 ./PPA.py

.......
dwarf_connect
Opening web browser to URL: http://127.0.0.1:8000/dwarf_ble_connect/connect_dwarf.html
127.0.0.1 - - [16/Jul/2024 19:59:58] "GET /dwarf_ble_connect/connect_dwarf.html HTTP/1.1" 200 -
(B) Lock ON
File copied from config.tmp to config.py
127.0.0.1 - - [16/Jul/2024 19:59:58] "POST /submit HTTP/1.1" 200 -
(B) Lock OFF
(B) Lock ON
File copied from config.tmp to config.py
127.0.0.1 - - [16/Jul/2024 19:59:58] "POST /submit HTTP/1.1" 200 -
(B) Lock OFF
127.0.0.1 - - [16/Jul/2024 19:59:58] code 404, message File not found
127.0.0.1 - - [16/Jul/2024 19:59:58] "GET /favicon.ico HTTP/1.1" 404 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 47426)
Traceback (most recent call last):
  File "/home/decicco/miniconda3/envs/grazing/lib/python3.8/http/server.py", line 722, in send_head
    f = open(path, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/media/decicco/1AB6398FB6396BFF1/decicco10@gmail.com/MySyncFolder/Softwares/PhotoPolarAlign/favicon.ico'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/decicco/miniconda3/envs/grazing/lib/python3.8/socketserver.py", line 683, in process_request_thread
    self.finish_request(request, client_address)
  File "/home/decicco/miniconda3/envs/grazing/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/home/decicco/miniconda3/envs/grazing/lib/python3.8/http/server.py", line 664, in __init__
    super().__init__(*args, **kwargs)
  File "/home/decicco/miniconda3/envs/grazing/lib/python3.8/socketserver.py", line 747, in __init__
    self.handle()
  File "/home/decicco/miniconda3/envs/grazing/lib/python3.8/http/server.py", line 435, in handle
    self.handle_one_request()
  File "/home/decicco/miniconda3/envs/grazing/lib/python3.8/http/server.py", line 423, in handle_one_request
    method()
  File "/home/decicco/miniconda3/envs/grazing/lib/python3.8/http/server.py", line 668, in do_GET
    f = self.send_head()
  File "/home/decicco/miniconda3/envs/grazing/lib/python3.8/http/server.py", line 724, in send_head
    self.send_error(HTTPStatus.NOT_FOUND, "File not found")
  File "/home/decicco/miniconda3/envs/grazing/lib/python3.8/http/server.py", line 490, in send_error
    self.wfile.write(body)
  File "/home/decicco/miniconda3/envs/grazing/lib/python3.8/socketserver.py", line 826, in write
    self._sock.sendall(b)
BrokenPipeError: [Errno 32] Broken pipe
----------------------------------------
Starting monitor_ip_changes
Lock On
current_ip: 
current_ui: 
Lock Off
Info: IP address setting has been cleared
Info: UI setting cleared :1
(BC)Lock On
(B) current_ip: 
(B) current_ui: 
(BC)Lock Off
(B) Info: IP address setting cleared.
(B) Info: UI setting cleared.
macicco commented 2 months ago

Hi, I added the favicon.ico file, that error was corrected, but still not connecting into bluetooth. I tried two modes: after and then before using ubuntu config bluetooth connections.

`dwarf_connect Opening web browser to URL: http://127.0.0.1:8000/dwarf_ble_connect/connect_dwarf.html 127.0.0.1 - - [17/Jul/2024 18:23:46] "GET /dwarf_ble_connect/connect_dwarf.html HTTP/1.1" 200 - (B) Lock ON File copied from config.tmp to config.py 127.0.0.1 - - [17/Jul/2024 18:23:46] "POST /submit HTTP/1.1" 200 - (B) Lock OFF (B) Lock ON File copied from config.tmp to config.py 127.0.0.1 - - [17/Jul/2024 18:23:46] "POST /submit HTTP/1.1" 200 - (B) Lock OFF Starting monitor_ip_changes Lock On current_ip: current_ui: Lock Off Info: IP address setting has been cleared Info: UI setting cleared :1 (BC)Lock On (B) current_ip: (B) current_ui: (BC)Lock Off (B) Info: IP address setting cleared. (B) Info: UI setting cleared.

`