# Socket.IO with CNCjs

**URL:** https://discourse.nodered.org/t/socket-io-with-cncjs/75719
**Category:** General
**Created:** [25 February 2023 05:53 UTC](https://discourse.nodered.org/t/socket-io-with-cncjs/75719 "2023-02-25T05:53:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![MadTooler](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/madtooler/32/76728_2.png) [@MadTooler](https://discourse.nodered.org/u/MadTooler)
#### Post date: [25 February 2023 05:53 UTC](https://discourse.nodered.org/t/socket-io-with-cncjs/75719/1 "2023-02-25T05:53:57Z")

</div>

I am running a raspberry pi4 with node-red and CNCjs together as part of a CNC motion control system. CNCjs is connected to a serial port where a raspberry pi pico (rp2040) is running grblHAL firmware. I am running into some roadblocks trying to use node-red as a pendant to control the machine through the CNCjs server.

CNCjs connects to the serial port and allows access to the port through a server. It requires a [socket.IO](http://socket.IO) connection to both send and receive allowed commands between the grblHAL and any networked device working as a pendant that uses the protocol. There are some pendant examples at [CNCjs main github page.](https://github.com/cncjs)

At this point, I am still trying to figure out how much I don't know so I can start researching the correct bits needed for the communication. For example: which socketio nodes, if any, are compatible and will handle the "token" handshaking. If and where I can use some of the js code examples from CNCjs within node-red, or if they are not compatible with nodejs. Or if there is already a working example of all of this somewhere that I overlooked.

Thanks for any help anyone can spare.

---

<div class="post-metadata">

### Author: ![MadTooler](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/madtooler/32/76728_2.png) [@MadTooler](https://discourse.nodered.org/u/MadTooler)
#### Post date: [15 March 2023 07:18 UTC](https://discourse.nodered.org/t/socket-io-with-cncjs/75719/2 "2023-03-15T07:18:09Z")

</div>

I think I am moving on from this for now. Instead of using CNCjs and limiting myself to communication over [socket.IO](http://socket.IO), I am trying to bring full sender capability into the NR environment. Maybe I will try to drag some of the CNCjs code bits into NR since they are in node.js. Anyone else interested in the same?

---

<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: [14 May 2023 07:18 UTC](https://discourse.nodered.org/t/socket-io-with-cncjs/75719/3 "2023-05-14T07:18:21Z")

</div>

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