How to enable logging on the hub?

I created a (dummy) driver and deployed it on the hub.
I paired the device and it was assigned automatically the correct driver, so it seems there is no problem with the driver or its installation.
However when I run
smartthings.exe edge:drivers:logcat
I get the following error:

Error: Unable to connect to Ensure hub address is correct and try again
The address seems to be correct and is pingable.
Is there anything needs to be done in order to enable logging on the hub?

Hi! Try using the complete command:

smartthings edge:drivers:logcat --hub-address=x.x.x.x --all

Make sure you:

  • Have the latest version of the SmartThings CLI
  • Use the correct IP address shown in the IDE > Hubs

Thank you for your reply.
Unfortunately, this did not help.
Firmware Version 000.038.00010
IP Address

$ smartthings.exe -v
@smartthings/cli/0.0.0-pre.28 win32-x64 node-v12.18.1

Could it be that I need to start logging service in the driver somehow?

No, that shouldn’t cause the error of Unable to connect to Ensure hub address is correct and try again. Even if you don’t print logs, it shows which Driver was detected for the device.
Is your computer connected to the same network as the Hub? this is the local IP address, so the logs can only be opened if they’re in the same network.
I’m able to listen for logs:

I double checked that the address is correct.
The laptop is in the same network and is able to ping the hub.
When I reboot the hub, the ping fails and returns when the hub is started again. So I’m pretty sure I have the correct address.

Perhaps the hub should be configured somehow to open a listener for logs?

Just run the command smartthings edge:drivers:logcat without supplying your ip address

It will prompt you to enter one.

Thank you for your replay.
Unfortunately, it didn’t help. I get the same error

Could you please clarify what starts log listener on the hub?
Will the logs be available if my driver crashes for example?

The logging command should prompt for the address of the hub and then the driver to listen to. The driver must already be installed on the hub.

Yes, the logger should always be available. The logger server is outside the sandboxes that runs each driver.

I’m really out of my depth on windows, but could you try running these commands and see if they are able to connect:

telnet 9495


telnet 39500

All those will do is try to open a connection to two different services that are on the hub.

If neither of those work your computer can’t reach the hub over TCP , you’re not on the network you think you are and you’re pinging something besides your hub, or there’s something else really weird going on.

Just as an idea you could also check your firewall rules for those port if you are using one.

Hi @psbarrett ,

Port 39500 seems to be reachable, while 9495 is not.

Is there any way to tell the hub from IDE to upload its logs somewhere? I can perhaps open an ftp server to collect them.
My guess is that the logger is either unable to start/bind to 9495 or just crashed.

I can also add that the MAC address of the target device starts with 28:6d:97.
Like 28:6d:97:xx:yy:zz
Is it expected for the hub or I’m connecting to something else?

Use nmap to see if the services on the ip you are trying to access are enabled and accessible

Thanks for your replay.
You mean to run nmap to see all open ports on the hub?
Are you suggesting that the logger server might be running on different port?
Did I get you right?

Hi @Andremain

Here is the results of port scanning

Does it help in any way?

I think you need the answer to the question you have already asked a couple of times. What makes the logging service start up?

Something has to happen to turn a hub that doesn’t listen on 9495 into one that does and in your case it seems to have been possible to successfully install a driver and pair a device without that something having happened. For all I know it could be a missing line from the driver that only affects logging.

@orangebucket , I tried to also install the “Hello world” driver that has some logging.
I did not do any modification to it, but still there is no logging.
I really doubt it has something to do with the driver.

My guess is either the hub needs to be configured somehow, perhaps enter a developer mode or the logging service inside the hub crashes for some reason.
Hub reset did not do any good, so it is probably related to specific hub configuration

Are the ports you want open?