St-device-sdk-c switch_example wifi problem

I have set up an Ubuntu machine up and working and installed the st-device-sdk-c and all the other bits that were needed. I eventually managed to a successful compile and flashed an 8266 board with the switch_example from github. I have set up the device in the developer workspace and put it in test mode.

I can see the 8266 power up and can even see the wifi ap it creates. The problem is Im not sure what is supposed to happen next.

Am I supposed to on a phone connect to the device access point then get prompted for my normal wifi credentials? I have tried connecting to the device access point from the phone but I dont know the password.

Follow the “Test your Device” section in the link below.

FYI, the smarthings app needs to be on version number “v1.7.51” for Android, “v1.6.51” for iOS (haven’t been released yet as of today)

Thanks for the reply. So if Im understanding you correctly

  1. As of today there is NO WAY to join my own devices because the phone apps are not at the correct version.

  2. The 8266 does not need to join the WiFi network to get connected? Surely somehow I have to enter wifi credentials to put it on my normal wifi network? Where and when does this happen? I have seen nothing that explains this.

Hello, @bmc

Developers have reported that they’ve been blocked by an update pop-up, even if they’re supporting the latest app version.

Our team keeps investigating this issue to enable the possibility to deploy test devices.

Regarding the testing process, once you access your integration at the My Testing Devices section (following @edukinara indications), you’ll be prompted to follow the Onboarding process that you’ve created at the Developer Workspace, including connecting to your wifi network.

Thanks for the further info.

So in short, no way to join a device at the moment, we need to wait for a new version of the app or something to be fixed on the cloud servers.

On the slightly more positive side, I did generate the QR code via the python script (The other link in docs doesnt seem to work!) and I got a bit further with the adding devices.

What I am seeing is

  1. Have enabled developer mode in the app.
  2. Start the add new device function in the app
  3. Select the scan QR code option
  4. Press a couple of Nexts in the app
  5. Then get a pop up that asks if I want to join my devices Access Point.
  6. Select to Join.
  7. Then I can see in the monitor window, phone connect to wifi and some messages get exchanged to cloud servers over my mobile data via the app on the phone?
  8. There are errors in this exchange and it stops.


I had the same problem for a while and support referred me to this post.

I want to let you know that I have just updated the app and can go to the next step.
So the problem is fixed.
PS. the update wasn’t available earlier.

My app version is

1 Like

Great news - for you:)

I dont seem to have the update to the app yet. Nothing on the iPhone anyway, probabbly take a couple of days to work its way through the system. My Galaxy S5 trys to update but gets an error about no longer being compatible with my device. My current Android version is 1.7.47-22:frowning:

@bmc: By the way I got mine from Galaxy store (not Google Play). Maybe there S5 will still show as supported.

@Bartek are you testing on an ESP8266? Any luck going through on-boarding without an encryption error?

@edukinara: I got to the point where I have the device configured and registered with Serial Number STDK0AvqwrgCad7A and device_info.json and onboarding_config.json in switch_example/main folder.

Code compiled and uploaded to device.
I can even see the WiFi network.

When I try to do Search Nearby nothing is found.
When I go to add device from My testing devices it gets all the way through

but then I get the error that serial number doesn’t match

Error code: 81-001

What does it mean and where should look?

PS. I double checked that the SN and public key are the same in the code and Workspace.

If you are on the latest app version (1.7.51 on Android), try deleting and re-registering your test device in DWS.

Yes I’m on 1.7.51 and created new project, new device, etc

So eventually the app updated on the iPhone. I tried deleting the app from my S5 but now i cant even get the .49 version back on! grrrr

So on the iPhone things are no better, in fact possibly a bit worse. When i try to add the device it just keeps failing. I tried deleting the device in the workspace and recreating - no luck. Even created a new serial etc in the SDK, generating new serial and keys and recompile and flash and adding that serial etc to workspace.

When I see the devices wireless displayed, it wont let me connect now, just prompts for password.

Hi, @Bartek

Thank you for sharing.

This issue has been detected and it is being reviewed. As a workaround, please run the following command before flashing your device and let me know if the behavior is different:

    # Add the to your PATH if necessary --port <your_port> erase_flash

I ran the (located in bsp/esp8266/components/esptool_py/esptool/ ) and then flashed the device again.
Unfortunately I still get Error code: 81-001

I just submitted the error from the SmartThings app (it said it would include the logs which I hope can help).

Ive also tried erasing the flash - no difference.

Cant get the devices to connect to the wifi now at all.

Anyone got any idea what is or isnt going on? The new iPhone app wont even get me on the wifi now.

Not really. It looks like the signature validation is not working correctly but don’t have info see if the problem is in the mobile app or the device.

@edukinara: are you able to reproduce this behavior?

I believe I can reproduce on the ESP8266.
ESP32 has no issues connecting on both iPhone and Android.

@Bartek, did you grab logs from the esp when trying to on-board?
You can monitor via serial using ./build esp8266 <your-project-name> monitor