-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this only used:“ baudRate: 9600, dataBits: 8, parity: 'none', stopBits: 1, flowControl: ??f #206
Comments
I'm having a hard time following this issue. Can you restate? |
i alter -unix file and rebuild : ::
switch (data->parity)
{
case SERIALPORT_PARITY_NONE:
options.c_cflag &= ~PARENB;
options.c_cflag &= ~CSTOPB;
// options.c_cflag &= ~CSIZE;
//options.c_iflag &= ~INPCK;
// options.c_cflag |= CS8;
break;
case SERIALPORT_PARITY_ODD:
options.c_cflag |= PARENB;
options.c_cflag |= PARODD;
// options.c_cflag &= ~CSTOPB;
//options.c_cflag &= ~CSIZE;
// options.c_cflag |= CS7;
options.c_iflag |= (INPCK | ISTRIP);
//snprintf(str, sizeof(str ), "Invalid odd setting %d", data->baudRate);
break;
case SERIALPORT_PARITY_EVEN:
options.c_cflag |= PARENB;
options.c_cflag &= ~PARODD;
// options.c_cflag &= ~CSTOPB;
//options.c_cflag &= ~CSIZE;
//options.c_cflag |= CS7;
options.c_iflag |= (INPCK | ISTRIP);
//snprintf(str, sizeof(str ), "Invalid even setting %d", data->baudRate);
break;
default:
snprintf(data->errorString, sizeof(data->errorString), "Invalid parity setting %d", data->parity);
close(fd);
return;
} |
i think the linux and windos ver should split in switch (data->parity) |
If I understand what you are saying (It would help if you said the problem again a different way.). When you set the baud rate to 2400 with parity 'even' node-serialport sends bad data? |
dada no problem , use with parity 'none' could used. |
@robinxc please try the branch : https://github.com/voodootikigod/node-serialport/tree/databits see if this resolves your issues. |
this only used:“ baudRate: 9600, dataBits: 8, parity: 'none', stopBits: 1, flowControl: false ” ??
when set: baudRate: 2400 or parity: 'even' ,send unreadable code
The text was updated successfully, but these errors were encountered: