serial-port-json-server icon indicating copy to clipboard operation
serial-port-json-server copied to clipboard

SerialPort config how..?

Open sfkristof opened this issue 8 years ago • 6 comments

Hi!

What can I do if I would like this tool with a device where I have to use such a serial port config: baud=9600, databits=7, stopbits=1, parity=even, flow control=none? I couldn't find any possibility to set these and without this the communication is not working. I tried to use it with a serial port proxy program where I could config these and then it was working.

Thanks in advance!

Kristof

sfkristof avatar Sep 05 '16 11:09 sfkristof

You would have to modify the source code to add these extra control parameters into the incoming commands as well as into the code that actually opens the serial port. Then you could do a pull request to add those changes into the mainstream. It's odd that after SPJS being out for over 3 years this question has only come up now. I think that most USB serial ports never care about databits, stopbits, and parity. Are you totally sure your implementation needs this?

chilipeppr avatar Sep 05 '16 15:09 chilipeppr

Yes, this is exactly what I did and now it's working! I modified the OPEN command to manage these like this: open <dataBits> <stopBits> <bufferType> I don't know why this device uses such a config but it does. About the forking: I also had to modify this import as a dependency to the SPJS: github.com\johnlauer\goserial How should I fork both projects and indicate that the SPJS has a dependency to another fork?

sfkristof avatar Sep 06 '16 06:09 sfkristof

I can manually tweak stuff to make the dual dependency work. If you want to do a pull request to send back your changes to me that would be great. I'll try to include them in the main build. Any chance you could tweak the Readme as well with docs on how to send the settings in the open command?

chilipeppr avatar Sep 06 '16 12:09 chilipeppr

Of course! Cool, where should I send my version to? (All sources in a ZIP with a txt about the changes is OK?)

sfkristof avatar Sep 06 '16 12:09 sfkristof

Oh, no, you should do it as a pull request in Github.

From: sfkristof [mailto:[email protected]] Sent: Tuesday, September 6, 2016 5:17 AM To: johnlauer/serial-port-json-server [email protected] Subject: Re: [johnlauer/serial-port-json-server] SerialPort config how..? (#53)

Of course! Cool, where should I send my version to? (All sources in a ZIP with a txt about the changes is OK?)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/johnlauer/serial-port-json-server/issues/53#issuecomment-244932224, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AA8jlfawhaLdPLjpxloQFJCXNyJP2Xn0ks5qnVmkgaJpZM4J0_U2.

johnlauer avatar Sep 06 '16 12:09 johnlauer

I forked both projects and created 2 pull requests, please tell me if there is still anything to do with them.

sfkristof avatar Sep 06 '16 14:09 sfkristof