How to Build Direct Connected Devices

@jody.albritton, when I flash a different program I made in ESP-IDF for Windows 10, it is successful, and has the following output:

esptool.py esp32 -p COM4 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x8000 partition_table/partition-table.bin 0x16000 ota_data_initial.bin 0x1000 bootloader/bootloader.bin 0x20000 aqm.bin
esptool.py v3.1-dev
Serial port COM4
Connecting…
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 44:17:93:7b:c9:f8
Uploading stub…
Running stub…
Stub running…
Changing baud rate to 460800
Changed.
Configuring flash size…
Flash will be erased from 0x00008000 to 0x00008fff…
Flash will be erased from 0x00016000 to 0x00017fff…
Flash will be erased from 0x00001000 to 0x00007fff…
Flash will be erased from 0x00020000 to 0x00120fff…
Compressed 3072 bytes to 178…
Writing at 0x00008000… (100 %)

The only real differences I see is that the successful flash is using esptool.py v3.1-dev (vs v2.8) and where ota_data_initial.bin is located (0x16000 vs 0x11000).

1 Like

@jody.albritton I managed to get around the issue above by moving to a native Ubuntu install (no Windows WSL). I now have most everything working, but I cannot figure out how to use the Firmware Update capability. I’ve followed the ota_demo example, but I don’t see anywhere on the SmartThings Developer Workspace where I can upload the latest firmware I want to OTA update to the device. I did see that the Firmware Update capability is “proposed” so maybe it’s not ready yet? Or is it not available when the project is in “Test”, but will be available once it’s “Published”?

Hi, @Bobby! I will check if an OTA firmware update is possible as you described with the engineering team. I’ll let you know their feedback :smiley:

Update:

To make an OTA firmware update for direct-connected devices, you need to own a server for this purpose because the firmwareUpdate capability is only used to provide the firmware information, which means the update cannot be done through the SmartThings platform.

Observations and questions

  1. ESP-IDF >= 4.3 is compatible with Apple Silicon but smartthings SDK is reliant on an older version (3.3). ESP32 builds for a direct connected device are not possible using the excellent instructions on GitHub or in the forum. You can build on Raspberry so it’s not a question about ARM or Intel. I would really appreciate instructions/info on how to use the Smartthings SDK (for ESP32) with the latest ESP-IDF. The script-magic that happens with setup.py and build.py should be possible to bypass with a correct, possibly nitpicky, setup of an ESP-IDF project for the ESP32.

  2. Serial numbers containing dashes (-) cannot be entered on an Android phone, e.g. STDKxxxx-beta-01. They can, however, be registered in the web interface.

  3. Currently my onboarding config states that a QR code should be used BUT… the user must enter a serial number anyway. At least on an Android phone.

  4. Old (test) onboarding configs, i.e. names, are visible in the app as testing device types although they have been deleted from the developer workspace. AFAIK there is no CLI command to list onboarding configs.

I would really like to be able to call someone about the development issues I have. The company I work for, as a consultant, is planning to launch a product (direct connected device) this spring and they would not hesitate to pay for support.

Cheers.

I can’t promise it will be any better than responses you get here, and they may just direct you back to this forum, but Samsung does have a separate channel for partner developers.

Start here:

Follow all the links to “developers“ and eventually you will get here:

And ultimately you will get to the page where you can enroll as a partner. They say you will get quick technical responses there, but I have no idea what the reality is. But in your situation it might be worth a try.

https://developer.samsung.com/partner/enroll

Hi @nayelyz, have you gotten any feedback from the engineering team? I await with bated breath :slight_smile:

Sorry, I updated my first post so maybe you didn’t receive a notification about that, here I include it again:

OK, yeah I missed that.

the firmwareUpdate capability is only used to provide the firmware information, which means the update cannot be done through the SmartThings platform.

If this is the case, why is the command “updateFirmware” in the capabilities reference document? What would that command actually do if the SmartThings platform is only providing firmware information? Is there any more documentation showing how this flow is expected to work?

Not so far, sorry. The team is continuously working on improving the documentation, I’ll report this to get feedback about the capability function. I’ll let you know in case I receive more info.

1 Like

Do you provide docker image which already pre-installed all development environment?

1 Like

Welcome back to the Community Forum, @goguma!

I asked the internal team and they mentioned there’s no docker image for this purpose. The development environment depends on which chipset each developer uses so, that’s why it is not provided.

Hi @nayelyz, is there any update on documentation for the OTA update functionality?

Linking this post related to this question, continuing the conversation there:

A post was split to a new topic: [Direct-Connected] Issue with Raspberry device

Hello, I have been following the instruction and was able to compile and flash the firmware onto ESP32, as well as set up device profile for the switch example. The problem happens when I try to add device in my ST app. The error is "This device isn't supported in your Samsung account's country or region. (Error code: 07-008)". On Product Info section in Developer Workspace, I set the availability to be United States. I checked my account’s country of region and it is also US. Any idea on what the error can be? Thanks!

Hi @jackj
I will send you a message asking for some information, and I will continue to support you there. :saluting_face:

I successfully developed a few esp8266 direct connect devices. For my next device, I need to control a servo and I am struggling. If you could share an example or an helpful link, I would appreciate.

Currently my workaround is annoying because it requires 2 boards:

  • Board 1: ino project to control the servo using an api I expose
  • Board 2: SmartThings direct connect device that calls the Board 1 api

Hello everyone, this is just a bit update about the Add device (Onboarding Process)
because the steps regarding “My Testing Devices” in this tutorial are outdated and we received some questions about it.

Currently, when you go to “add device” in the app, you get two options at the top, in this case, you need to select “partner devices”.
Then, you’ll see “My testing devices” at the top section called “Recommendations” on that page.

1 Like

I had the same issue please can u help me ,
I had error 07-008 in the smartthings app when i want to add my device ( my region is tunisia and my device availability is tunisia also )

Hi @chiraz only to confirm the following

  1. Are you using the same account on the app and in the workspace?