Hi,
I’m new on meteor,
I’m developing a simple serial terminal using meteor:
something like that:
So, I had to first start the client app, set the port config (port name and baud rate) and then click on connect.
I can make the server connecting to a hard-coded serial port name, but the issue I’m facing is how to start connection only when the client clicks the “Open” button.
robfallows,
Thank you for the quick answer,
issue fixed.
Just for sharing, I was using this:
Meteor.methods({
// function openSerialPort
openSerialPort: function(serialPortName, serialBaudRate) {
// Open serial Port var port = new SerialPort(serialPortName, {
baudRate: parseInt(serialBaudRate)
});
// serial port events
port.on('open',...);
port.on('data',...);
port.on('error',...);
}
});
I had to remove the var for port declaration, so it will be considered as global variable…
It works.
Thnaks