[Direct-Connected] Issues Onboarding a Device (Error 38-001)

Hello, I have done all setup but I have some problems with device connection. In the log of esp8266 I can see that Smartthings app is connected to the device network but after that it quickly leaves the network without sending anything. Could you please help me solving this problem?

Hi, @fatehi.a5391
Do you see a specific error in the app when the device discovery fails? Which OS are you using, Android or iOS? There’s a known issue in iOS and the engineering team is working on it.

Hi, @nayelyz
Yes the app always returns error code 38-001. I have tested with different versions of Android OS (Android 8, 10, 14) but same error is issued.
Here is the terminal log of esp8266:

Hi, @fatehi.a5391
How long ago did you replicate the error where those logs came from?
To report the issue to the engineering team, we require the following, please:

  1. ESP logs of the complete onboarding startup process until it fails
  2. Screen recording showing the steps you follow in the ST app
  3. ST App’s logs:
  1. In the app, go to “Menu”
  2. Select the gear Icon and enter “About SmartThings”
  3. The SmartThings logo 10 times. This will open a new page
  4. Tap “report a problem” and select a frequency so the form passes the validation.
  5. This will let you get a log file which you need to share with us at build@smartthings.com, please.
  1. Timestamp with the timezone of when you tried to onboard the device. For example, 16:00 GMT-6

They all need to be from the same “exercise”, otherwise, the team won’t be able to compare what happens on each side.


Hi, @fatehi.a5391
Following up, the engineering team mentioned this error is generally thrown when the network you’re connected in has a security restriction for softAP causing the connection lost.
Could you confirm there’s nothing blocking on your network, please?

1 Like

Hi, @nayelyz
Thanks for your support. As I know there is no specific security restriction on my network, meanwhile I have tested with different networks and same result has been obtained. Also, I already have ran ESP8266 softAP mode application (with Arduino library WiFi core) many times without problem.

Hi, @fatehi.a5391
Thank you for the information, I shared it with the team to see what else we can check. I’ll keep you updated.

Hi, @fatehi.a5391
could you confirm you’re using the latest version of the ST app, please? For Android, it’s

The engineering team mentioned they could not replicate the issue in the latest app version, so they’re wondering what else could be the problem.

Hi, @nayelyz
Yes I checked the version and it is as you mentioned above.
Is there any way to manually set my router credentials on the esp8266 in order to it can be connected to the cloud or it only should be done via app?

This is the new feedback from the engineering team:

  1. Are you using the latest commit of the Direct-Connected SDK?
  2. This issue isn’t related to the router. This is a problem that occurs in the connection between the ESP8266 device set as softAP and the mobile device.
  3. Cloud connection occurs after communication between the ESP8266 device and mobile is completed and connected to the router.
  4. Setting the router credentials on the ESP8266 is possible, but it needs to communicate with the ST app to connect with the cloud before the device registration.

After investigating the logs of esp8266 in more details I could finally find the source of problem. It was actually related to the pinout configuration and because in my case the default input pin was always set to low it caused to long press be detected at startup and it seems by long pressing the device tries to reinitialize the connection. So by configuring input pin to a valid pin the connection with esp8266 module and also with the cloud was successfully established.
Thanks for your support.

Thank you for sharing your solution. It’s great it works now!