Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Something is missing in tutorials #14

Open
lorenzofiamingo opened this issue Jun 28, 2024 · 1 comment
Open

Something is missing in tutorials #14

lorenzofiamingo opened this issue Jun 28, 2024 · 1 comment

Comments

@lorenzofiamingo
Copy link

lorenzofiamingo commented Jun 28, 2024

I was struggling to run the command idf.py set-target esp32c6 in the "Explore the smart light example" tutorial.
This was the error I encountered:

// ...
CMake Error at third_party/connectedhomeip/config/esp32/components/chip/CMakeLists.txt:308 (message):
The 'gn' command was not found. Make sure you have GN installed.Or have
followed necessary build preparations stated in BUILDING.md.

Following the suggestions in this link I tried running source path/to/connectedhomeip/scripts/activate.sh . This command also failed, but after that I tried re-runningidf.py set-target esp32c6 and this time it worked. I think some dependency, which was somehow installed by source path/to/connectedhomeip/scripts/activate.sh , is missing in the tutorial.

However, this wasn't enough to make the example work, as now idf.py build wasn't working. I thought the problem was the new swift-driver missing:

$ ~/Library/Developer/Toolchains/
swift-DEVELOPMENT-SNAPSHOT-2024-06-13-a.xctoolchain
swift-latest.xctoolchain

$ TOOLCHAINS=org.swift.59202406131a swift --version
<unknown>:0: warning: using (deprecated) legacy driver, Swift installation does not contain swift-driver at: '/Library/Developer/CommandLineTools/usr/bin/swift-driver-new'
Apple Swift version 6.0 (swiftlang-6.0.0.4.52 clang-1600.0.21.1.3)
Target: arm64-apple-darwin24.0.0

I fixed this using:

$ sudo xcode-select \
  --switch /Applications/Xcode-beta.app/Contents/Developer

Then I was able to build and flash and monitor, but when I try to connect to Matter the Home app displays "Unable to Connect to Network". Now I'm not being able to find a solution for this... any idea?

@vtthanh83
Copy link

vtthanh83 commented Jul 14, 2024

Hi @lorenzofiamingo

First I also met the same issue, however my case it was git-lfs missing issue during esp-matter clone which caused the connectedhomeip repo was not successfully loaded. After installing git-lfs and re-cloning esp-matter repo, running esp-matter/install.sh would install all the tool needed including gn, you don't have to re run source path/to/connectedhomeip/scripts/activate.sh as calling this script is a part of esp-matter/install.sh if the esp-matter repo is cloned fully without issue.

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants