OnionIoT / tau-lidar-server

Python package for Tau Lidar Camera application
MIT License
28 stars 7 forks source link

Changing websocket port in server program breaks web viewer #13

Open greenbreakfast opened 3 years ago

greenbreakfast commented 3 years ago

Overview

If the server program is run with a websocket port set to anything other than 5678, the web viewer will not be able to receive the point cloud data.

This is because the 5678 port for the websocket is hard-coded in index.html: https://github.com/OnionIoT/tau-lidar-server/blob/master/TauLidarServer/index.html#L64

Steps to Reproduce

  1. Edit server.py and change WS_PORT to anything other than 5678
  2. Run the program and open the web viewer
  3. Observe error in browser console (index):64 WebSocket connection to 'ws://127.0.0.1:5678/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED