I can't figure out what the error is or how to solve it.
I'm trying to run a basic code on a RPi3 from that sends an osc message to sonic pi on the same device.
this is the code:
var osc = require("osc");
var udpPort = new osc.UDPPort({
// This is the port we're listening on.
localAddress: "127.0.0.1",
localPort: 4600,
// This is where sclang is listening for OSC messages.
remoteAddress: "127.0.0.1",
remotePort: 4559,
metadata: true
});
// Open the socket.
udpPort.open();
And this is the error thrown:
events.js:292
throw er; // Unhandled 'error' event
^
Error: bind EADDRINUSE 192.168.1.23:4559
at dgram.js:337:20
at processTicksAndRejections (internal/process/task_queues.js:85:21)
Emitted 'error' event on instance at:
at Socket.<anonymous> (/home/pi/Tools-for-Instagram/node_modules/osc/src/platforms/osc-node.js:79:18)
at Socket.emit (events.js:327:22)
at dgram.js:339:14
at processTicksAndRejections (internal/process/task_queues.js:85:21) {
errno: -98,
code: 'EADDRINUSE',
syscall: 'bind',
address: '192.168.1.23',
port: 4559
}