You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your toolchain will also need to include the developer versions of OpenSSL, curl, and uuid.
39
38
### Editing Files
40
39
41
40
You will need to create two files and modify one file during the course of this procedure. If you are using Ubuntu, then the simplest editor to use is nano. For example, if you wish to create a new file in your current directory simply type:
@@ -195,7 +194,7 @@ SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
Having created the two files, we are now ready to build the SDK. Enter the following commands:
213
-
```
212
+
```bash
214
213
chmod a+x mlinuxenv.sh
215
214
cd ../../cmake
216
215
../build_all/linux/mlinuxenv.sh
217
216
make install
218
217
```
219
218
This will build the SDK and create the Python library. To check that the binary Python library has been built correctly enter:
220
-
```
219
+
```bash
221
220
file ~/mlinux-out/lib/*.so
222
221
```
223
222
This should result in two lines of output, one for _iothub\_client.so_ and one for _iothub\_service\_client.so_. The details should say that they are _ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked_ which is the appropriate architecture for your target machine.
224
223
224
+
## Testing Your Binaries
225
+
You simply need to copy the appropriate .so file found in the last step to your device. If your device is intended to send device to cloud messages then you will need to copy _iothub\_client.so_ to your device. If you wish to send cloud to device messages or view and manipulate the device registry then you will need to copy _iothub\_service\_client.so_ to your device.
226
+
227
+
There are sample Python scripts in the Azure IoT SDK. The device versions can be found at _\<Root of SDK\>/device/samples_ and the service versions at _\<Root of SDK\>/service/samples_.
228
+
229
+
One caveat that one should be aware of, one may occasionally encounter Python builds that **do not support** binary imports.
230
+
225
231
## Conclusion
226
232
227
233
This document has described the procedure to cross compile the Azure IoT SDK binary Python library targeting a MultiTech device.
0 commit comments