Skip to content

Capture HASPone debug output

Allen Derusha edited this page Mar 7, 2021 · 4 revisions

Troubleshooting HASPone can be challenging without some feedback as to what the device is doing. The HASPone project provides extensive debug logging, available locally via the USB port (inside the device, not accessible while assembled), or via telnet (default disabled).

Capture debug logging via telnet

Telnet debug logging is simple to enable and utilize, but is only available if the device is able to connect to your network, and can be of limited use for troubleshooting issues happening at power-on as each power cycle will disconnect your telnet session. Telnet debug has the advantage that it works while the device is installed in your wall, and can be really handy for troubleshooting while developing automations or interacting with the Nextion display.

  • Install a telnet client. If you're running Windows, open an administrator command prompt and paste in the following: dism /online /Enable-Feature /FeatureName:TelnetClient. PuTTY is a popular graphical alternative.
  • Enable telnet debug on the HASP in the web admin page by checking "Telnet debug output enabled" and clicking "save settings".
  • Open a telnet session to the device. If your HASP has the IP 192.168.100.200, you can use the following command in a command prompt: telnet 192.168.100.200

Capture debug logging via USB

This approach is useful to capture all debug output, even if the network isn't working or to catch messages happening during a power cycle. It requires disassembling the HASP by removing the 4 #1 phillips screws holding the rear enclosure on, and then pulling out the PCB by removing 2 1.5mm hex socket screws inside.

  • Enable serial debug on the HASP in the web admin page by checking "USB serial debug output enabled" and clicking "save settings".
  • Disassemble the HASP by removing the four #1 phillips screws holding the rear enclosure to the front face
  • Remove the two 1.5mm hex socket screws holding the PCB on, then pull the PCB out of the rear enclosure to expose the USB port
  • Connect the USB port to your PC, confirm that a COM port is created under Windows Device Manager > Ports.
  • Connect to your serial port with PuTTY (or similar terminal program) using serial speed 115200, parity 8N1, and the COM port identified in the step above.

Sharing your debug log

If you're having problems with HASPone and would like some help, capturing your debug log is a key step to allow others to see what's happening on your device. Copy the output from either method above, paste it into a new Gist, and then share a link to the Gist in the HASPone discussion forum or Discord chat.