EdgeAI:   Jetson Nano with MiNiFi C++ Agent
Tags: 2020, agent, apachenifi110, apachenifi111
Published: 2020-02-19 22:51:12

---
title: EdgeAI:   Jetson Nano with MiNiFi C++ Agent
published: true
date: 2020-02-18 15:01:00 UTC
tags: 2020,agent,apache-nifi-1.10,apache-nifi-1.11
canonical_url: 
---

## **Build and Utilizing The Apache NiFi - MiNiFi C++ Agent For Jetson Nano**

**(EdgeAI:   Jetson Nano with MiNiFi C++ Agent)**  
  

  

**source.hostname**  
jetsonnano

  
**source.ipv4**  
192.168.1.217

  
**GetUSBCamera**

## FPS: .5
  

## Bootstrap and Build

## /opt/demo/nifi-minifi-cpp-source/build

bootstrap.sh  
  
**Options** :  Kafka, OpenCV, TensorFlow, USB Camera  
  
  

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

 Select MiNiFi C++ Features to toggle.

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

A. Persistent Repositories .....Enabled

B. Lib Curl Features ...........Enabled

C. Lib Archive Features ........Enabled

D. Execute Script support ......Enabled

E. Expression Language support .Enabled

F. Kafka support ...............Enabled

G. PCAP support ................Disabled

H. USB Camera support ..........Enabled

I. GPS support .................Disabled

J. TensorFlow Support ..........Disabled

K. Bustache Support ............Disabled

L. MQTT Support ................Enabled

M. SQLite Support ..............Disabled

N. Python Support ..............Enabled

O. COAP Support ................Enabled

S. SFTP Support ................Enabled

V. AWS Support .................Disabled

T. OpenCV Support ..............Enabled

U. OPC-UA Support...............Enabled
<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #ffffff; background-color: #224fbc} span.s1 {font-variant-ligatures: no-common-ligatures} span.s2 {font-variant-ligatures: no-common-ligatures; background-color: #dc0005} </style>  

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

## 

sudo apt-get install libcurl-dev libcurl4-openssl-dev -y

make

  

  
We can see when data arrives in NiFi from a MiNiFi Agent.  
  

[![](https://1.bp.blogspot.com/-s9vi2kDHzDY/XktD4KMK8oI/AAAAAAAAZZs/EnbaUHiduuAOibiFRHTCcsGJyd71Per0wCLcBGAsYHQ/s640/atlasCemInputport.png)](https://1.bp.blogspot.com/-s9vi2kDHzDY/XktD4KMK8oI/AAAAAAAAZZs/EnbaUHiduuAOibiFRHTCcsGJyd71Per0wCLcBGAsYHQ/s1600/atlasCemInputport.png)
  

  

 We can publish to Kafka directly from our MiNiFi C++ agent.  

  

[![](https://1.bp.blogspot.com/-wHig94zITag/XktD44M79xI/AAAAAAAAZZ8/frbcIz3AgCgbJ2caF6jxrUHqfn5SUD5EwCLcBGAsYHQ/s640/cemPublishToKafka.png)](https://1.bp.blogspot.com/-wHig94zITag/XktD44M79xI/AAAAAAAAZZ8/frbcIz3AgCgbJ2caF6jxrUHqfn5SUD5EwCLcBGAsYHQ/s1600/cemPublishToKafka.png)

  
If CEM/Edge Flow Manager is a mystery to you, check out the live Swagger REST Documentation.
  

[![](https://1.bp.blogspot.com/-GKkLZi_VzHI/XktD5KATyEI/AAAAAAAAZaA/Nm6j6-SksmUzNfDCv_VmSBAb80KAuFKSgCLcBGAsYHQ/s640/cemSwagger.png)](https://1.bp.blogspot.com/-GKkLZi_VzHI/XktD5KATyEI/AAAAAAAAZaA/Nm6j6-SksmUzNfDCv_VmSBAb80KAuFKSgCLcBGAsYHQ/s1600/cemSwagger.png)
  
With MiNiFi C++ I can add a USB Camera.  

  

[![](https://1.bp.blogspot.com/-KIV5e81PjIQ/XktD57_E8ZI/AAAAAAAAZaI/qSNC0Vzpojo56Tae_ukLqIMyl3HWDrDjQCLcBGAsYHQ/s640/efmminificppusbcam.png)](https://1.bp.blogspot.com/-KIV5e81PjIQ/XktD57_E8ZI/AAAAAAAAZaI/qSNC0Vzpojo56Tae_ukLqIMyl3HWDrDjQCLcBGAsYHQ/s1600/efmminificppusbcam.png)
  

[![](https://1.bp.blogspot.com/-T8Ewmr1lwek/XktD6TcM-mI/AAAAAAAAZaQ/eOGQHKyeduoOm_zdQuFWDBNqUQrqJjU7QCLcBGAsYHQ/s640/getusbcamera.png)](https://1.bp.blogspot.com/-T8Ewmr1lwek/XktD6TcM-mI/AAAAAAAAZaQ/eOGQHKyeduoOm_zdQuFWDBNqUQrqJjU7QCLcBGAsYHQ/s1600/getusbcamera.png)
  

  

 In NiFi we can see the Host Information that MiNiFi attached.  

  

[![](https://1.bp.blogspot.com/-Q9AAzGZO8iY/XktD7-xapcI/AAAAAAAAZac/EnjeUvzR1u06wr3ZGc6AABD9rtfbiQ0LQCLcBGAsYHQ/s640/minifiappendhostinfo.png)](https://1.bp.blogspot.com/-Q9AAzGZO8iY/XktD7-xapcI/AAAAAAAAZac/EnjeUvzR1u06wr3ZGc6AABD9rtfbiQ0LQCLcBGAsYHQ/s1600/minifiappendhostinfo.png)

  

  

## Example Data

  

<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #ffffff; background-color: #224fbc} span.s1 {font-variant-ligatures: no-common-ligatures} </style>  

{"uuid": "nano\_uuid\_crr\_20200218002610", "ipaddress": "192.168.1.217", "top1pct": 54.833984375, "top1": "cab, hack, taxi, taxicab", "cputemp": "45.5", "gputemp": "43.5", "gputempf": "110", "cputempf": "114", "runtime": "4", "host": "jetsonnano", "filename": "/opt/demo/images/image\_esq\_20200218002610.jpg", "imageinput": "/opt/demo/images/2020-02-17\_1926.jpg", "host\_name": "jetsonnano", "macaddress": "ec:08:6b:18:0d:7f", "end": "1581985574.6246474", "te": "4.158604383468628", "systemtime": "02/17/2020 19:26:14", "cpu": 51.8, "diskusage": "5479.7 MB", "memory": 71.4, "id": "20200218002610\_8a12dd65-1038-41ac-b923-98fc907f5be0"}

  

## Example Config.yml Section

<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #ffffff; background-color: #224fbc} span.s1 {font-variant-ligatures: no-common-ligatures} </style>  

  name: AppendHostInfo

  class: org.apache.nifi.minifi.processors.AppendHostInfo

  max concurrent tasks: 1

  scheduling strategy: TIMER\_DRIVEN

  scheduling period: 1000 ms

  penalization period: 30000 ms

  yield period: 1000 ms

  run duration nanos: 0

  auto-terminated relationships list: []

  Properties:

    Hostname Attribute: source.hostname

    IP Attribute: source.ipv4

    Network Interface Name: wlan0

## Example Output

> <style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #ffffff; background-color: #224fbc} span.s1 {font-variant-ligatures: no-common-ligatures} </style>  
> 
> [2020-02-11 19:35:09.116] [org::apache::nifi::minifi::processors::ExecuteProcess] [info] Execute Command /opt/demo/rundemo.sh 
> 
> [2020-02-11 19:35:11.275] [org::apache::nifi::minifi::c2::C2Agent] [info] Checking 0 triggers
> 
> [2020-02-11 19:35:13.742] [org::apache::nifi::minifi::c2::C2Agent] [info] Checking 0 triggers
> 
> [2020-02-11 19:35:15.568] [org::apache::nifi::minifi::core::ProcessSession] [info] Transferring 899b5964-4d2f-11ea-8b9a-6e260e221e3d from ExecuteProcess - Python to relationship success
> 
> [2020-02-11 19:35:15.568] [org::apache::nifi::minifi::processors::ExecuteProcess] [info] Execute Command Complete /opt/demo/rundemo.sh status 0 pid 31004
> 
> [2020-02-11 19:35:15.569] [org::apache::nifi::minifi::core::ProcessSession] [info] Transferring 899b5964-4d2f-11ea-8b9a-6e260e221e3d from AppendHostInfo to relationship success
> 
> [2020-02-11 19:35:15.649] [org::apache::nifi::minifi::sitetosite::SiteToSiteClient] [info] Site to Site transaction 4d0b460e-e4f6-4ca1-8c56-30d310a0712b sent flow 1flow records, with total size 3581
> 
> [2020-02-11 19:35:15.785] [org::apache::nifi::minifi::sitetosite::HttpSiteToSiteClient] [info] Site to Site closed transaction 4d0b460e-e4f6-4ca1-8c56-30d310a0712b
> 
> [2020-02-11 19:35:15.841] [org::apache::nifi::minifi::sitetosite::SiteToSiteClient] [info] Site2Site transaction 4d0b460e-e4f6-4ca1-8c56-30d310a0712b peer finished transaction
> 
> [2020-02-11 19:35:15.841] [org::apache::nifi::minifi::io::HttpStream] [warning] Future status already cleared for http://ec2-35-171-154-174.compute-1.amazonaws.com:8080/nifi-api/data-transfer/input-ports/17979d5f-0170-1000-0000-000011f1cc00/transactions/4d0b460e-e4f6-4ca1-8c56-30d310a0712b/flow-files, continuing
> 
> [2020-02-11 19:35:16.236] [org::apache::nifi::minifi::c2::C2Agent] [info] Checking 0 triggers
> 
> [2020-02-11 19:35:16.263] [org::apache::nifi::minifi::core::ProcessSession] [info] Transferring 8a05413a-4d2f-11ea-8b9a-6e260e221e3d from TailFile to relationship success
> 
> [2020-02-11 19:35:16.264] [org::apache::nifi::minifi::processors::TailFile] [info] TailFile nano.log for 616 bytes
> 
> [2020-02-11 19:35:16.273] [org::apache::nifi::minifi::core::ProcessSession] [info] Transferring 8a05413a-4d2f-11ea-8b9a-6e260e221e3d from AppendHostInfo to relationship success
> 
> [2020-02-11 19:35:16.274] [org::apache::nifi::minifi::core::ProcessSession] [info] Transferring 8a05413a-4d2f-11ea-8b9a-6e260e221e3d from PublishKafka to relationship success
> 
> [2020-02-11 19:35:18.748] [org::apache::nifi::minifi::c2::C2Agent] [info] Checking 0 triggers
> 
> [2020-02-11 19:35:21.260] [org::apache::nifi::minifi::c2::C2Agent] [info] Checking 0 triggers

  

## Using Apache NiFi - MiNiFi C++ Agent Elsewhere

I am working on a Jetbot robot powered by NVidia Jetson Nano that will use the MiNiFi C++ agent.

  

[![](https://1.bp.blogspot.com/-LMjZfF08Ikc/XksqvuO8MwI/AAAAAAAAZW4/CiXSULD_9lcMWeJWyR4FX227IjO1rv6-ACLcBGAsYHQ/s640/IMG-7387.jpg)](https://1.bp.blogspot.com/-LMjZfF08Ikc/XksqvuO8MwI/AAAAAAAAZW4/CiXSULD_9lcMWeJWyR4FX227IjO1rv6-ACLcBGAsYHQ/s1600/IMG-7387.jpg)
  

[![](https://1.bp.blogspot.com/-wIgna8PhKzI/Xksqvla4KxI/AAAAAAAAZW8/F2u_n2NXop8EPWpKECTcUFqjLp2XxvswwCLcBGAsYHQ/s640/IMG-7388.jpg)](https://1.bp.blogspot.com/-wIgna8PhKzI/Xksqvla4KxI/AAAAAAAAZW8/F2u_n2NXop8EPWpKECTcUFqjLp2XxvswwCLcBGAsYHQ/s1600/IMG-7388.jpg)
  

[![](https://1.bp.blogspot.com/-4o6gNh12Cq0/XksqvgVb1kI/AAAAAAAAZXA/Z5RhUv4zCNMn6PhdnU0yQ5qdajQO1y3hACLcBGAsYHQ/s640/IMG-7389.jpg)](https://1.bp.blogspot.com/-4o6gNh12Cq0/XksqvgVb1kI/AAAAAAAAZXA/Z5RhUv4zCNMn6PhdnU0yQ5qdajQO1y3hACLcBGAsYHQ/s1600/IMG-7389.jpg)
  

[![](https://1.bp.blogspot.com/-2R5aRSvcJ20/XksqwDUkeMI/AAAAAAAAZXE/Bv69TJlm3bIRhLg28gPfheaC1dKq1qdHwCLcBGAsYHQ/s640/IMG-7390.jpg)](https://1.bp.blogspot.com/-2R5aRSvcJ20/XksqwDUkeMI/AAAAAAAAZXE/Bv69TJlm3bIRhLg28gPfheaC1dKq1qdHwCLcBGAsYHQ/s1600/IMG-7390.jpg)
  

[![](https://1.bp.blogspot.com/-JbWUdz3CrH4/XksqwYVnlJI/AAAAAAAAZXI/QorsD3sS7FcbeecRvsK0bMZz_Vy0m96IwCLcBGAsYHQ/s640/IMG-7391.jpg)](https://1.bp.blogspot.com/-JbWUdz3CrH4/XksqwYVnlJI/AAAAAAAAZXI/QorsD3sS7FcbeecRvsK0bMZz_Vy0m96IwCLcBGAsYHQ/s1600/IMG-7391.jpg)
  

[![](https://1.bp.blogspot.com/-2tzanLhcqZE/XksqwlyvXqI/AAAAAAAAZXM/1tpRnQ4f-3ADWq5IpP-jdS0iuRghfqUdgCLcBGAsYHQ/s640/IMG-7392.jpg)](https://1.bp.blogspot.com/-2tzanLhcqZE/XksqwlyvXqI/AAAAAAAAZXM/1tpRnQ4f-3ADWq5IpP-jdS0iuRghfqUdgCLcBGAsYHQ/s1600/IMG-7392.jpg)
  

[![](https://1.bp.blogspot.com/-HbIMnwptTEE/XksqwpohW5I/AAAAAAAAZXQ/2SjQvL_sCOkf7z1E6Z-DTEDkRePyvl0awCLcBGAsYHQ/s640/IMG-7393.jpg)](https://1.bp.blogspot.com/-HbIMnwptTEE/XksqwpohW5I/AAAAAAAAZXQ/2SjQvL_sCOkf7z1E6Z-DTEDkRePyvl0awCLcBGAsYHQ/s1600/IMG-7393.jpg)

  

## References

- [https://minifi.xnson.org/trying-minifi-on-the-jetson-nano](https://minifi.xnson.org/trying-minifi-on-the-jetson-nano)

- [https://github.com/apache/nifi-minifi-cpp](https://github.com/apache/nifi-minifi-cpp)

- [https://gist.github.com/achristianson/1dea217e5fcbc88b87e526d919dad2c0](https://gist.github.com/achristianson/1dea217e5fcbc88b87e526d919dad2c0)