Coder Social home page Coder Social logo

azure-sphere-samples's Introduction

Azure Sphere Samples

This repository contains samples for the Azure Sphere platform that are created and maintained by Microsoft.

You may also be interested in:

Please also see the Codethink, MediaTek, and Azure RTOS repositories for more sample applications for the MT3620 real-time cores:

Using the samples

See the Azure Sphere Getting Started page for details on getting an Azure Sphere development kit and setting up your PC for development. You should complete the Azure Sphere Installation Quickstarts and Tutorials to validate that your environment is configured properly before using the samples here.

Clone this entire repository locally. The repository includes the hardware definition files that are required to run the samples on a range of Azure Sphere hardware.

Each folder within the samples subdirectory contains a README.md file that describes the samples therein. Follow the instructions for each individual sample to build and deploy it to your Azure Sphere hardware to learn about the features that the sample demonstrates.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (for example, label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Licenses

For information about the licenses that apply to a particular sample, see the License and README.md files in each subdirectory.

Samples by category

Categories Samples
Application lifecycle Deferred update
Device to Cloud
Power down
External MCUs Device to Cloud
External MCU update
Wi-Fi setup via BLE
Microsoft Azure Azure IoT
Multi-core samples Hello World
Inter-core communication
Networking & time Certificates
Custom NTP
DHCP
DNS service discovery
HTTPS cURL Easy
HTTPS cURL Multi
Private network services
System time
Wi-Fi
Wi-Fi setup via BLE
WolfSSL API
Peripherals, sensors, & devices Hello World
ADC
GPIO
I2C
PWM
SPI
UART
Power & memory External MCU low power
Power down
Storage Mutable storage

azure-sphere-samples's People

Contributors

bawilless avatar cawhitworth avatar dafang982 avatar gloveboxes avatar gtrevi avatar jamesadevine avatar lukka avatar marcaw avatar matsujirushi avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar mikehall-ms avatar msftgits avatar pennyo avatar rebeccaleigh avatar richardtaylorrt avatar robotdad avatar tokenstar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-sphere-samples's Issues

AzureIoT Sample MSB3073 Error when compiling

This is the output when compiling:
Gravità Codice Descrizione Progetto File Riga Stato eliminazione
Errore MSB3073 uscita dal comando "%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoProfile -NonInteractive -File "C:\Users\pier\Desktop\azure-sphere-samples-master\Samples\AzureIoT\AzureIoT\script\validate_manifest.ps1
:VCEnd" con codice 1. AzureIoT C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 128

Factory RESET

what is the key sequence to factory reset the device?

Don't send me a link for the azsphere client.

If the device is in debug mode.... you can't install it on another device,

The software fails with: Product or related product not found: {D0C37DF0-56F6-4D80-BDFC-74EEB20F578D}

Please, do not send me to some dumb link.

My question is clear: how do you factory reset the device without software>

as in, "hold user button1 and reset", boot the device, wait ten seconds and the led will blink 4 times.

seriously, My question is clear

CurlEasyHttps hangs at "setting TCP_NODELAY"

Switched the CA bundle to the Mozilla one, many sites hang somewhere around here -

// Perform the download of the web page.
if ((res = curl_easy_perform(curlHandle)) != CURLE_OK) {
    LogCurlError("curl_easy_perform", res);
} else {
    Log_Debug("\n -===- Downloaded content (%zu bytes): -===-\n", block.size);
    Log_Debug("%s\n", block.data);
}

Target URL https://api.github.com/, same result with any *.azurewebsites.net site (try https://amisecure.azurewebsites.net).

Debug window output (https://api.github.com/):

Remote debugging from host 192.168.35.1
cURL easy interface based application starting.
This sample periodically attempts to download a webpage, using curl's 'easy' API.
 -===- Starting download -===-
*   Trying 192.30.253.117...
* TCP_NODELAY set

Tried to force TLS 1.2, same result, no go.

if ((res = curl_easy_setopt(curlHandle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2)) != CURLE_OK) {
    LogCurlError("curl_easy_setopt CURLOPT_SSLVERSION", res);
    goto cleanupLabel;
}

https://example.com/ works fine and libcurl handshakes TLS 1.2 with remote (from verbose output). Something's not right.

How do cipher suites work on the Sphere? Is everything in software, whatever OpenSSL supports that's what we get?

Headers for CPP

Please correct "system" header files for C++ compatible

`
#ifdef __cplusplus
extern "C"
{
#endif

...................

#ifdef __cplusplus
}
#endif
`

where to find the Edit Template for adding new Measurement

Dear Sir,

I follow instruction from the readme of AzureIoT example.
I can't find the edit template from Device Explorer->select your device->device page in "Add new measurements, settings, and properties" segment.
Can you help to check the flow?
Thanks.

Best Regards,
Billy

I2C app has wrong whoami value

I2C accelerometer application starting.
INFO: WHO_AM_I=0x6c (I2CMaster_WriteThenRead)
ERROR: Unexpected WHO_AM_I value.
Closing file descriptors.
Application exiting.

Once I change the code to accept this value it works.
I found the datasheet for the IC: https://www.st.com/resource/en/datasheet/lsm6dso.pdf
Check page 49 where it says that is hardcoded as 0x6C

I also found the board schematic here: http://cloudconnectkits.org/sites/default/files/AES-MS-MT3620-SK-G_SCH_2019-03-06.PDF

would be also good to have these linked in the documentation for these samples.

Xplat Azure Sphere CLI/Tools

Hello folks!

I've looking on how the tooling for Azure Sphere works and it comes to:

  1. The net461 azsphere CLI
  2. Azure Sphere Device Comms Service: C:\Program Files (x86)\Azure Sphere Device Communication Service
  3. Azure Sphere SDK (toolchain, sysroot): C:\Program Files (x86)\Microsoft Azure Sphere SDK
  4. Some VS Extensions

The CLI has no reason it couldn't be turned it netcoreapp2.x as it doesn't have native dependencies on the OS that I've found out.

The SDK is basically an arm-poky-linux-musleabi toolchain with its sysroot, so it can be easily built for other OSes like Linux/OSX while the sysroot is the same.

The Comms service is an asp.net core app bridging the CLI commands to interact with the device. This one have a few PInvokes on the Win32 APIs that could be easily wrapped in a simple abstraction and implement the other OS calls easily.

The VS extensions could be easily made VSCode extensions an much of what is happening on it can basically use the existent GDB debugger from VSCode to allow debugging.

So, can someone tell me if there is a plan to shortly make the SDK cross-platform? The majority of IoT companies don't use Windows for development and given that VSCode and specially .Net Core are presented so mature, people could really use the support.

If the SDK were OSS'd (everything but the VS extensions like in other projects), I would contribute the port myself. Otherwise, soon the community will come with unofficial ports that would work, but is not something companies would use as it is not stamped by MSFT.

Thanks! Keep the great work!

Using I2C in an RT capable application

How can we use I2C in a RT app using the M4 subsystems without using a High level application?
An RT app is provided for UART but not for I2C or SPI.

Nrf52 Sample help

When you compile this sample and the WindowsApp and try to get it to work, it is a hit or miss proposition. It appears that the problem is that Windows10 automatically pairs with the Nrf52 board so when you run the WinodwsApp in the Sample, it fails to connect. Sometimes, you can go into the windows bluetooth and manually disconnect it so it isn't paired and it will work (but this appears to be a hit or miss and thus there is no consistency in operation). When the WindowsApp from the Sample is able to capture the device, it works as documented, but the problem is how to get it to consistently work when using Windows 10.

Can you provide a sequence of steps to get the WindowsApp to consistently connect with the Nrf52 board such that the Windows10 Bluetooth application doesn't interfere?

Broken Pipe Exception and no PDB available

ld-musl-armhf.so.pdb contains the debug information required to find the source for the module ld-musl-armhf.so.1

I keep getting broken pipe exception in visual Studio while using TCP socket and the PDB does not seems to be available. The stack trace also does not show any user code only : ld-musl-armhf.so.1![Unknown/Just-In-Time compiled code]

SIGKILL after 6hrs

I am running the sample on I2C and so far it seems that the board stop working every 6 hrs:
INFO: 21653: vertical acceleration: -0.03g
INFO: 21653: Temperature: 29.12 C 84.42 F
INFO: 21654: vertical acceleration: -0.03g
INFO: 21654: Temperature: 29.21 C 84.58 F
INFO: 21655: vertical acceleration: -0.03g
INFO: 21655: Temperature: 29.14 C 84.45 F

Child terminated with signal = 0x9 (SIGKILL)

Ran the program twice and every single time after 21665 seconds (6:00hrs) I get the error above.

Can somebody please explain the behaviour?

I thought that the board supposed to keep running the app no matter what. and if the app is unresponsive was supposed to restart it.

Multiple Ethernet controllers

Hello folks!

We're planning on build our device using Azure Sphere and we came to a point where we need to have multiple Ethernet connections on a single Azure Sphere MCU. For this particular case, it will be 9 Ethernet controllers.

I was walking thru the docs and that led me to this link which tells me how to do the wiring for a single ethernet controller. So far so good. Except that we need to have 9 of those.

We know that we can use multiple devices on the SPI but you need to use the CSx (the GPIO) pin to switch to which one we want to read/write data on the SPI. Also, there is the board configuration image that must be built, and I only see docs on how use the --preset one, and not how actually create that image.

So, how can I:

  1. Attach multiple ethernet connectors to our Azure Sphere-based device
  2. Build a custom configuration image ourselves

Thank you! I would really appreciate any help on this.

how to get a non blocking socket?

tried the following:
`#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <fcntl.h>

struct addrinfo hints, * res;
int sockfd;

// first, load up address structs with getaddrinfo():

memset(&hints, 0, sizeof hints);
hints.ai_family = AF_INET; //for IPv4 ; AF_UNSPEC for either IPv4 or IPv6;
hints.ai_socktype = SOCK_STREAM; //TCP

getaddrinfo(addr, port, &hints, &res);

// make a socket:

sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);

   **fcntl(sockfd, F_SETFL, O_NONBLOCK);**`

but it looks that F_SETFL is not defined ?

How do I get a non blocking socket ?

System Time and NTP

Hello,

I'm looking at the SystemTime example and I see the note saying the system time may be overwritten by NTP if the device is connected to the Internet.

I actually WANT the system time to be overwritten by the network time, but that's not happening. I am connected to the Internet but my time always shows May 1935.

Is there something I need to do to make NTP work?

Thanks,
Joel

Sending data from a RT application to a High-Level one

Hello,
I built a simple M4 application which acts as a software serial receiver. The receiver logic works fine, in fact I'm able to send the received characters over the debug UART.
The data received from this application should be sent to a High-Level application, and this should happen as soon as new data is available.
In the IntercoreComms sample, I can see that the bare metal app sends back the message it received from the high-level one after editing it.
I've seen that before the actual message there are 20 bytes, 16 for the component ID and 4 that are reserved. This part before the payload is left as it is by the M4 application. My question is, is it possible to have a bare metal app send a message to a high-level one without needing the last one to send continuously "empty" messages?
Are the reserved bytes constant or calculable in some way?
I've tried to send a character from the real time app by using a reserved byte sequence I've seen in another issue.

This is the non-working part of the M4 app, the EnqueueData and the UART-related functions are taken from the mt3620-intercore.c/h and mt3620-uart-poll.c/h files used in the IntercoreComms sample.

// 16: Component ID, 4: reserved, 1: character.
char data[16 + 4 + 1] = { /* Component ID of High-Level appn: */ 0x4e, 0xf2, 0xce, 0xfc, 0x2c, 0x95, 0x41, 0x8a, 0x98, 0x7e, 0x3f, 0xda, 0x13, 0x3f, 0xd6, 0x63, /* Reserved: */ 0x00, 0x28, 0x00, 0x03, /* Data: */ 0x00 };

// This is the byte I want to send
data[20] = serial.lastCharRead;
EnqueueData(inbound, outbound, sharedBufSize, data, 21);

// I can correctly read the byte on the TX line
Uart_WriteStringPoll(&serial.lastCharRead);

This is the High-Level app implementation:

const char* lowLevelAppId = "005180bc-402f-4cb3-a662-72937dbcde47";
int sockfd = 0;

int initSSSocket() {
	sockfd = Application_Socket(lowLevelAppId);

	if (sockfd == -1) {
		Log_Debug("INTERCORECOMM: Error while opening socket to M4 RT application. Error: \"%s\" (%d).\n", strerror(errno), errno);
		return -1;
	}

	return 0;
}

int readStringSS(char** data) {

	// Stop when empty or on \r\n
	char c;
	int result;
	do {
		result = recv(sockfd, &c, 1, MSG_DONTWAIT) > 0;

		// We received a character
		if (result)
			strncat(*data, &c, 1);

		// Break on \r\n
		char* ending = strrchr(*data, '\r');
		if (ending && !strcmp(*data, "\r\n")) break;
	} while (result > 0);

	if (strlen(*data)) {
		Log_Debug("INTERCORECOMM: New data (%s).\n", *data);
		return 0;
	}
	else {
		return -1;
	}
}

In the High-Level app the initialization succeeds and the initSSSocket() function returns 0.
Did I do something wrong? Are there any other resources on the inter-core communication process? On the Azure Sphere documentation there is not much information on the message structure other than

The message format is similar to a datagram.

Do the reserved bytes contain length or other variable information?

Thanks,
Riccardo

EDIT: Pointer correction

Linker scripts should ensure required vector table alignment

The ARM docs require the vector table be aligned on (at least) a 128-byte boundary.

Show example source code comment

// ARM DDI0403E.d SB1.5.2-3
// From SB1.5.3, "The Vector table must be naturally aligned to a power of two whose alignment
// value is greater than or equal to (Number of Exceptions supported x 4), with a minimum alignment
// of 128 bytes.". The array is aligned in linker.ld, using the dedicated section ".vector_table".

However, it appears that the linker.ld files in the repo only guarantee 16-byte alignment.

Click to show the five currently linker.ld files

.text : ALIGN(16) {
KEEP(*(.vector_table))
*(.text)
} >CODE_REGION

.text : ALIGN(16) {
KEEP(*(.vector_table))
*(.text)
} >CODE_REGION

.text : ALIGN(16) {
KEEP(*(.vector_table))
*(.text)
} >CODE_REGION

.text : ALIGN(16) {
KEEP(*(.vector_table))
*(.text)
} >CODE_REGION

.text : ALIGN(16) {
KEEP(*(.vector_table))
*(.text)
} >CODE_REGION

NOTE: Yes, I realize the files "work" at the moment. However, it makes sense to avoid fragility in linker scripts, which includes explicitly listing the alignment requirements where needed, rather than relying on items being the first listed in a section, and the section being the first section, and the memory region itself thus happening to meet the alignment requirement....

I think either of the following would be a correct fix:

  1. Create a new section, prior to listed one, with alignment specified as 128 instead of 16, and move .vector_table to that new section.
  2. Just modify the alignment of the existing .text section to 128. This has the potential to waste some bytes if that alignment is not needed for other entries of that section, but would still be correct.

Please confirm if this is a bug, and I'll gladly submit a PR. I'd lean towards option #1 for the PR, so alternatives or arguments for/against either of the above (or a better solution altogether) are welcome!

Unable to receive data from RTApp to High Level Application (Intercomms sample)

I am unable to receive data from my RT Application to High Level application. The High level application keeps on sending hello world but never receives anything. I receive this error in RT App

///
openocd: Error: libusb_handle_events() failed with LIBUSB_ERROR_IO
openocd: Error: unable to purge ftdi rx buffers: LIBUSB_ERROR_IO
openocd: Error: MPSSE failed
openocd: Error: Could not initialize the debug port
///

how can I resolve this?

Small edit for "Run the sample with an IoT hub"

Under the heading: "Configure the sample application to work …"
Step 6. I suggest you add an example of what is required
eg Append the following: to step 6:
For example:
"AllowedConnections": [ "global.azure-devices-provisioning.net", "mysphere.azure-devices.net" ],
Where mysphere.azure-devices.net is your the hostname for the Azure IoT Hub.

Trouble compiling large Cmake project in Visual Studio

Hi all,

I'm having trouble with my own CMake based Azure Sphere project using, using Visual Studio. The CMake File contains many source file entries. The compilation of the individual object files succeeds, but the final two commands fail. (Presumably the linking phase.)

afbeelding

Checking the build directory, I found these files present as expected:
afbeelding

But when comparing to smaller projects I noticed that no response file (.rsp) is generated in the smaller projects and compilation succeeds (for those smaller projects).

[110/113] cmd.exe /C "cd . && C:\PROGRA~2\MI3C21~1\Sysroots\2_BETA~1\tools\gcc\ARFCD8~1.EXE -B "C:/Program Files (x86)/Microsoft Azure Sphere SDK/Sysroots/2+Beta1905/tools/gcc" -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot="C:/Program Files (x86)/Microsoft Azure Sphere SDK/Sysroots/2+Beta1905" -nodefaultlibs -pie -Wl,--no-undefined -Wl,--gc-sections @CMakeFiles\BdrPlatform.rsp -o BdrPlatform.out && cd ." FAILED: BdrPlatform.out cmd.exe /C "cd . && C:\PROGRA~2\MI3C21~1\Sysroots\2_BETA~1\tools\gcc\ARFCD8~1.EXE -B "C:/Program Files (x86)/Microsoft Azure Sphere SDK/Sysroots/2+Beta1905/tools/gcc" -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot="C:/Program Files (x86)/Microsoft Azure Sphere SDK/Sysroots/2+Beta1905" -nodefaultlibs -pie -Wl,--no-undefined -Wl,--gc-sections @CMakeFiles\BdrPlatform.rsp -o BdrPlatform.out && cd ."

Any help, ideas and/or thoughts on the matter would be extreme welcome!

Sample: Wi-Fi setup and device control via BLE - reference solution

Hi, I'm trying to run this sample and I am running into a few issues I hope you can help with.
#1 There are two binaries for the RF52 board:
pca10040_Softdevice_WifiSetupAndDeviceControlViaBleApp.hex
usi_evb_Softdevice_WifiSetupAndDeviceControlViaBleApp.hex

However, in your readme, you say to program the board with 'Softdevice_WifiSetupAndDeviceControlViaBleApp.hex'. So which is supposed to be used (and why are there two images here)?

#2 After experimenting, it appears that the 'pca10040' image is the one that works (at least it responds to the UART messages being sent). But when I try to pair the windows App with the board it says (from reset):

Opening SAMPLE_BUTTON_1 as input
Opening SAMPLE_BUTTON_2 as input.
Opening SAMPLE_RGBLED_BLUE
Opening SAMPLE_RGBLED_RED
Opening SAMPLE_RGBLED_GREEN
Opening SAMPLE_LED
INFO: Sending "Initialize BLE device" request with device name set to: Azure_Sphere_BLE_15ade5.
INFO: "Initialize BLE Device" succeeded.
INFO: Sending "Set Passkey" request.
INFO: "Set Passkey" succeeded.
INFO: BLE device is advertising to bonded devices only.
INFO: SAMPLE_BUTTON_1 is held; deleting all BLE bonds...
INFO: Sending "Delete all BLE bonds" request.
INFO: All BLE bonds are deleted successfully.
INFO: SAMPLE_BUTTON_1 was pressed briefly, allowing new BLE bonds...
INFO: Sending "Change BLE mode" request mode set to: 2.
INFO: BLE device is advertising to all devices.
INFO: Received BLE connection event.
INFO: Disabling advertising to all.
INFO: BLE device is now connected to a central device.
INFO: Received BLE disconnection event.
INFO: BLE device is advertising to bonded devices only.

The windows app never asks for a passcode and it appears that there is an immediate 'disconnect event' occurring after which it begins advertising to only bonded devices.

I am guessing it tries to connect (but is maybe failing?) then reverts back to advertising to only already bonded devices.

So the question is why does the Sample not work as described in the README file and what can I do to get it to work as advertised?

#3 Question: Once the Sample works as it is described in the README, I wanted to eliminate the RTS/CTS signal requirement. Is there a reason that RTS/CTS is required for this application? it looks like the messages being sent will fit within the RX/TX FIFO. Can I make the following change(s):
uartConfig.flowControl = UART_FlowControl_None; // UART_FlowControl_RTSCTS;
and loopback RTS/CTS on the RF52 board (PO.22 <-> PO.23) and have it work correctly without RTS/CTS?

Network is not up using wired-ethernet

modified main.c and app_manifest.json of HTTPS_Curl_Easy, but it got error message.
"Not doing download because network is not up."
Could you tell me how to fix?

Setup:

  1. azsphere recover
  2. azsphere image package-board-config --preset lan-enc28j60-isu0-int5 --output enc28j60-isu0-int5.imagepackage
  3. azsphere device prep-debug
  4. azsphere device sideload deploy --imagepackage enc28j60-isu0-int5.imagepackage

Application:

  1. clone https://github.com/Azure/azure-sphere-samples/tree/master/Samples/HTTPS/HTTPS_Curl_Easy
  2. Modify main.c and app_manifest.json
    image
    image

Output:

Remote debugging from host 192.168.35.1
cURL easy interface based application starting.
This sample periodically attempts to download a webpage, using curl's 'easy' API.
Not doing download because network is not up.

Not doing download because network is not up.

Not doing download because network is not up.

Not doing download because network is not up.

FYI
https://social.msdn.microsoft.com/Forums/en-US/8b07758e-08c3-4e04-ac70-e3afcd6d42a7/network-is-not-up-using-wiredethernet?forum=azuresphere

Unclear LSM6DS3 Address in I2C sample

Hi,
I have a question about the I2C sample in "azure-sphere-samples/Samples/LSM6DS3_I2C/LSM6DS3_I2C/main.c"
In line 43 the address is declared as 0x6A (01101010). I checked the Datasheet and it says the address would be 0xD4 (11010100). Seems like the address is shifted by 1 but I don't know why.
Would be nice if someone could explain this to me.

// DocID026899 Rev 10, S6.1.1, I2C operation
// SDO is tied to ground so the least significant bit of the address is zero.
static const uint8_t lsm6ds3Address = 0x6A;

Thanks in advance.

Linux kernel Source code

Where is the Linux kernel source code used by the Azure Sphere board?

I can only see the headers files and object files in the SDK directory.

Missing documentation on "extend the sample hardware definition"

On the hardware definitions page: https://github.com/Azure/azure-sphere-samples/tree/master/Hardware#extend-the-sample-hardware-definitions, there is a link that looks like it should take the reader to a page that explains how the hardware definitions abstraction layer is implemented and how to extend the definitions to support additional hardware features. This link is the second link on the third line under the "Hardware definitions" header at the top of the README.md file.

When you click on this link it does not go anywhere other than the page that the link is located on. Is there documentation on the hardware abstraction layer and how to extend it? If so, this link should be updated. If not, it would be very helpful if that information could be made available.

Thank you

A compile error form example AzureIoT

I'm try to build the example code AzureIoT but was stoped when click the build button on the very beginning. Is it because of authorization or authentication on my account or PC/network? But at least the compiling should be OK, and the error may happen at run-time, is that right?

Severity Code Description Project File Line Suppression State
Error MSB3073 The command "%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoProfile -NonInteractive -File "D:\azure-sphere-samples\Samples\AzureIoT\AzureIoT\script\validate_manifest.ps1
:VCEnd" exited with code 1. AzureIoT C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 133

show iot central config not recognizing real device

So when attempting to follow the azure sphere azure iot sample, i get all the way to the part where you copy the results of the command "ShowIoTCentralConfig". When I run that, it recognizes my iot central application 'aadev' but states i only have simulated devices. I've added my azure sphere with the correct device id. I have also uploaded and validate my tenant cert.

My device status in IoT Central is set to Registered. It is not blocked. I have attempted to approve it manually with no results.

Is there a step missing, or is this a bug in IoT Central/Azure Sphere/ShowIoTCentralConfig?

External MCU update for FW bin about 5MB

Dear Sir,

We have a customer case is interest AzureSphere OTA function.
But their main chip FW image is about 5MB.
How to make the external FW image update for this kind huge size and go through Azure Sphere Security Service?

Best Regards,
Billy

Unable to build ExternalMcuUpdateNrf52

Schweregrad	Code	Beschreibung	Projekt	Datei	Zeile	Unterdrückungszustand
Fehler		 implicit declaration of function 'Storage_OpenFileInImagePackage' [-Werror=implicit-function-declaration]
     self->fd = Storage_OpenFileInImagePackage(path);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1.exe: all warnings being treated as errors	ExternalMcuUpdateNrf52	E:\proj\Workspace_IoT\sphere\azure-sphere-samples\Samples\ExternalMcuUpdateNrf52\AzureSphereApp\ExternalMcuUpdateNrf52\file_view.c	39	


1>------ Neues Erstellen gestartet: Projekt: ExternalMcuUpdateNrf52, Konfiguration: Debug ARM ------
1>file_view.c: In function 'OpenFileView':
1>file_view.c(39,16): error :  implicit declaration of function 'Storage_OpenFileInImagePackage' [-Werror=implicit-function-declaration]
1>file_view.c(39,16): error :      self->fd = Storage_OpenFileInImagePackage(path);
1>file_view.c(39,16): error :                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1>file_view.c(39,16): error : cc1.exe: all warnings being treated as errors
1>Die Erstellung des Projekts "ExternalMcuUpdateNrf52.vcxproj" ist abgeschlossen -- FEHLER.
========== Alles neu erstellen: 0 erfolgreich, 1 fehlerhaft, 0 übersprungen ==========

invalid hardware definition for the AVNET Starter Kit

after changing the hardware definition for the project to the AVnet Starter Kit found that is invalid:
{"Name": "SAMPLE_LSM6DS3_I2C", "Type": "I2cMaster", "Mapping": "AVNET_MT3620_SK_ISU1_I2C", "Comment": "MT3620 SK: Connect external LSM6DS3 to I2C using SOCKET1, pin MISO (SDA) and pin MOSI (SCL)."},

but the I2C lsm6DS0 is actually wired to the other socket and changing it to:
{"Name": "SAMPLE_LSM6DS3_I2C", "Type": "I2cMaster", "Mapping": "AVNET_MT3620_SK_ISU2_I2C", "Comment": "MT3620 SK: Connect external LSM6DS3 to I2C using SOCKET1, pin MISO (SDA) and pin MOSI (SCL)."},

fixed it.

Maybe the LSM6DS3 should also be renamed to the real LSM6DS0 included with the board too.

Mutual authentication

I am currently trying to send the x509 certificate(to my understanding produced as a result of remote attestation) to an API so that Azure Sphere can authenticate itself. I have been follow the explanation here: https://docs.microsoft.com/en-us/azure-sphere/app-development/curl

After using MyCallback, I get the following output:

Press button A to initialize a set of parallel, asynchronous web transfers.
Opening SAMPLE_LED
Opening SAMPLE_BUTTON_1 as input.
Using libcurl/7.61.0 wolfSSL/4.1.0 c-ares/1.14.0

Trying ***...
TCP_NODELAY set

Connected to *** port 443 (#0)
successfully set certificate verify locations:
CAfile: ***
CApath: /etc/certs/
ssl func callback error 2
ALPN, offering http/1.1

ALPN, server did not agree to a protocol
SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
GET *** HTTP/1.1

(*** are masked output values)

I am not sure how to debug "ssl func callback error 2."
It seems that "Loading the device auth certificate for this tenant failed."

Any suggestions how to debug this?

target API set must be changed to 2+beta 1905 to build

in this readme file https://github.com/Azure/azure-sphere-samples/blob/master/Samples/AzureIoT/README.md

The step below to enable ethernet should include a line to ask the user to change the Target API SET property to 2+beta 1905, otherwise it won't build

4.- In main.c, add the following lines before any other networking calls:

err = Networking_SetInterfaceState("eth0", true);
if (err < 0) {
Log_Debug("Error setting interface state %d\n",errno);
return -1;
}

Avnet Starter Kit wrong hardware define in sample_hardware?

Hardware\avnet_mt3620_sk\inc\hw\sample_hardware.h contains the following lines linking a LSM6DS3 to ISU1:

// MT3620 SK: Connect external LSM6DS3 to I2C using SOCKET1, pin MISO (SDA) and pin MOSI (SCL).
#define SAMPLE_LSM6DS3_I2C AVNET_MT3620_SK_ISU1_I2C

// MT3620 SK: Connect external LSM6DS3 to SPI using SOCKET1, pin MISO (MISO), pin SCK (SCLK), pin MOSI (MOSI) and SOCKET2 pin CS (CSB).
#define SAMPLE_LSM6DS3_SPI AVNET_MT3620_SK_ISU1_SPI

// MT3620 SPI Chip Select (CS) value "B". This is not a peripheral identifier, and so has no meaning in an app manifest.
#define SAMPLE_LSM6DS3_SPI_CS MT3620_SPI_CS_B

However the onboard LSM6DSO is connected to ISU2 not ISU1. See the block diagram here:
http://cloudconnectkits.org/sites/default/files/Block%20Diagram%20-%20Azure%20Sphere%20MT3620%20Starter%20Kit%20%28v2%29.pdf

ShowIoTCentralConfig reports no registered IoT Central applications

For the Azure IoT sample, when I attempt to setup my Azure Sphere with my IoT application, running step 4 ShowIoTCentralConfig reports that i don't appear to have any registered IoT Central applications. I do have one associated with the school/work account that i'm logging in under and that user is an administarator for that IoT Central application. I've already uploaded and validated the devices certificate. What can I do to correct this?

Additionally, is there a way to get DPS to work with IoT Central?

C# support example

Is the board capable of using C# code, maybe transformed to a lower level language using LLVM, like Xamarin is able to do for iOS and Android ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.