question

95504669 avatar image
0 Votes"
95504669 asked asergaz commented

Create an App to run Azure SDK commands sample requirements

Hi. We have been using Azure SDK commands to work with Avnet board and now we are creating a simple app (either a desktop app or web app or mobile app) to enable our device onboarding easily. So that the manufacturer need not run all the SDK commands manually and every commands will be encapsulated inside the app. Do you have a sample .net c# code to integrate the Azure sphere SDK and run the commands through the code? Please advise
Thank you...

azure-iot-sdkazure-sphere
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

asergaz avatar image
0 Votes"
asergaz answered asergaz commented

Hi @95504669 ,
Consider using Azure Sphere for VS Code

"Azure Sphere Extension adds support for developing Azure Sphere applications in VS Code, including editing, building, packaging, deploying, and debugging."

Azure Sphere for VS Code Extension makes use of The Azure Sphere public API that you can easily integrate with your C# code. Here is a C# example using Azure Sphere Public API to get tenants available to the authenticated user: Overview of the Azure Sphere Public API/Make a request.

UPDATE (based on comments)

As part of manufacturing process, individual devices need to connect to a PC to complete factory-floor operations. During this time, manufacturers/customers will have an option to load an application onto a device.

During manufacturing, you must connect each Azure Sphere chip to a factory-floor PC ... You can simultaneously connect as many Azure Sphere devices to your PC as the PC's USB subsystem will support. ... We recommend that you request the Manufacturing Samples package to help you perform manufacturing tasks at scale... Support for multiple attached devices is provided only on Windows and only by the Azure Sphere CLI..

From: Factory-floor operations - Azure Sphere | Microsoft Docs

Thank you!

Remember:
- Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
- Want a reminder to come back and check responses? Here is how to subscribe to a notification.






· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi asergaz

Thank you for your prompt response. Yes, We already using VS Code and built azure sphere apps and successfully completed the deployment process through using cloud deployment methodology. I wanted to automate the onboarding process using a web application or mobile application without exposing the Azure SDK Commands to the manufacturer. That means, I want to create a .Net Core application and run the following commands internally (by connecting the sphere board) instead of opening the azsphere command prompt in the laptop. How to achieve this?. I hope the VS Code cant help to create a custom app with user interface. I need to integrate and execute the sphere commands in user friendly way basically.

161028-image.png


0 Votes 0 ·
image.png (278.4 KiB)

Hi @95504669 ,

Unfortunately, in order to onboard a new device to Azure Sphere Tenant you need to exclusively use Azure Sphere CLI. Azure Sphere CLI can be used from Bash, PowerShell, or a command prompt window. In VS Code Extension you will notice that is using Powershell when onboarding a new device.

Take a look at @matsujirushi tool that is using C#: Azure Sphere Explorer .

@matsujirushi can confirm, but I believe the tool does not allow you to onboard a new device to an Azure Sphere Tenant.

Thanks!


0 Votes 0 ·

Thank you asergaz for your response. We will be using the commands for the devices as you mentioned.


1 Vote 1 ·
Show more comments

Thanks for the reply but that's a bad news. If we need to manufacture big number of the azure boards that would be the big pain point to onboard the device. And also, we should be exposing all the critical information to the third party manufacturer to put them in the command prompt. How are you handling this issue currently with the existing sphere client?.

I'm more interested to understand the Azure Sphere Explorer that you mentioned in the above link. Is that the Windows or Desktop application that integrates Azure sphere CLI commands?

Thank you for your support.

0 Votes 0 ·
Show more comments