Socket.IO with CNCjs

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 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.

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.

I think I am moving on from this for now. Instead of using CNCjs and limiting myself to communication over 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?

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