# Stream data from node-red to c program?

**URL:** https://discourse.nodered.org/t/stream-data-from-node-red-to-c-program/41266
**Category:** General
**Created:** [18 February 2021 23:05 UTC](https://discourse.nodered.org/t/stream-data-from-node-red-to-c-program/41266 "2021-02-18T23:05:13Z")
**Posts on this page:** 5
**Page:** 2

<div class="post-metadata">

### Author: ![sridhar2rok](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sridhar2rok](https://discourse.nodered.org/u/sridhar2rok)
#### Post date: [24 February 2021 15:30 UTC](https://discourse.nodered.org/t/stream-data-from-node-red-to-c-program/41266/21 "2021-02-24T15:30:15Z")

</div>

> [@Colin](#):
>
> `myprog`

@Colin I tried this, but still I get the error

![error](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/2/52478788f6bc8e1313ca2a86fb4194c1ac1fa363.jpeg)

[{"id":"88d894d0.d2b9e8","type":"inject","z":"2998129e.ad50de","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"-v -a3 -c1 -f434 -m100","payloadType":"str","x":180,"y":320,"wires":[["454465f3.2b008c"]]}]

---

<div class="post-metadata">

### Author: ![sridhar2rok](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sridhar2rok](https://discourse.nodered.org/u/sridhar2rok)
#### Post date: [24 February 2021 15:38 UTC](https://discourse.nodered.org/t/stream-data-from-node-red-to-c-program/41266/22 "2021-02-24T15:38:55Z")

</div>

@Colin, This my intended command : sudo ./RX\_Demo -v -a3 -c1 -f434 -m100

---

<div class="post-metadata">

### Author: ![a1ex](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@a1ex](https://discourse.nodered.org/u/a1ex)
#### Post date: [24 February 2021 15:44 UTC](https://discourse.nodered.org/t/stream-data-from-node-red-to-c-program/41266/23 "2021-02-24T15:44:13Z")

</div>

@sridhar2rok: I just entered the absolute path to my C program in the Command field, e.g.:

`C:/Users/JDoe/SomeFolder/CompiledCProgram.exe`

But getting the program to execute was only a fraction of the challenge for me. Most of my time was spent figuring out how to get the input data in just the right format for the program. That took a bit of experimenting and a lot of staring at debugger node outputs 😃

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [24 February 2021 15:55 UTC](https://discourse.nodered.org/t/stream-data-from-node-red-to-c-program/41266/24 "2021-02-24T15:55:57Z")

</div>

> [@sridhar2rok](#):
>
> This my intended command : sudo ./RX\_Demo -v -a3 -c1 -f434 -m100

Note that I said you have to use the full path to the command, not `./command`.  
Also if you need to use sudo then you will have to tell the system that the node-red user does not need to enter a password to run that command with sudo. Better is to make sure that the node-red user has access to whatever the command needs to access, so you don't need to use sudo.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [25 April 2021 15:56 UTC](https://discourse.nodered.org/t/stream-data-from-node-red-to-c-program/41266/25 "2021-04-25T15:56:37Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/stream-data-from-node-red-to-c-program/41266.md?page=1)
