configure_edison --setup
/etc/opkg/base-feeds.conf
file: src/gz all http://repo.opkg.net/edison/repo/all src/gz edison http://repo.opkg.net/edison/repo/edison src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32
$ vi /etc/opkg/base-feeds.conf
$ opkg update
$ opkg install git $ git clone git@github.com:Azure/azure-iot-sdks.git
wpa_cli status
/c/iothub_client/samples/iothub_client_sample_amqp/iothub_client_sample_amqp.c
file /c/iothub_client/samples/iothub_client_sample_amqp/iothub_client_sample_amqp.c
replace the parameters in the connectionString line with your information, as shown below (static const char * ....). Be sure to do it, otherwise the example will not work. static const char* connectionString = “HostName=[YOUR-HOST-NAME];CredentialType=SharedAccessKey;CredentialScope=Device;DeviceId=[YOUR-DEVICE-ID];SharedAccessKey=[YOUR-ACCESS-KEY];
/c/build_all/linux
and follow these steps: $ opkg install util-linux-libuuid-dev $ ./build_proton.sh $ ./build.sh
/lib
folder in Yocto.libqpid-proton.so.2
to shared libraries. To do this, you need to find it by running the following command in the terminal: $ find -name 'libqpid-proton.so.2'
Copy the name of the found directory to the clipboard.[directory_to_libqpid-proton.so.2]
result of the search command from the first step: 2. $ cp [directory_to_libqpid-proton.so.2] /lib
$ ldconfig
$ ldconfig -v | grep "libqpid-p*"
/c/iothub_client/samples/iothub_client_sample_amqp/iothub_client_sample_amqp/linux
make -f makefile.linux
./iothub_client_sample_amqp
# ./iothub_client_sample_amqp hub_client/samples/iothub_client_sample_amqp/linux# Starting the IoTHub client sample AMQP... IoTHubClient_SetNotificationCallback...successful. IoTHubClient_SendTelemetryAsync accepted data for transmission to IoT Hub. IoTHubClient_SendTelemetryAsync accepted data for transmission to IoT Hub. IoTHubClient_SendTelemetryAsync accepted data for transmission to IoT Hub. IoTHubClient_SendTelemetryAsync accepted data for transmission to IoT Hub. IoTHubClient_SendTelemetryAsync accepted data for transmission to IoT Hub. Press any key to exit the application. Confirmation[0] received for message tracking id = 0 with result = IOTHUB_CLIENT_CONFIRMATION_OK Confirmation[1] received for message tracking id = 1 with result = IOTHUB_CLIENT_CONFIRMATION_OK Confirmation[2] received for message tracking id = 2 with result = IOTHUB_CLIENT_CONFIRMATION_OK Confirmation[3] received for message tracking id = 3 with result = IOTHUB_CLIENT_CONFIRMATION_OK Confirmation[4] received for message tracking id = 4 with result = IOTHUB_CLIENT_CONFIRMATION_OK
Source: https://habr.com/ru/post/276757/
All Articles