johnlauer / serial-port-json-server

A serial port JSON websocket server for Windows, Mac, Linux, Raspberry Pi, or BeagleBone Black that lets you communicate with your serial port from a web application. This enables web apps to be written that can communicate with your local serial device such as an Arduino, CNC controller, or any device that communicates over the serial port.
http://chilipeppr.com
GNU General Public License v2.0
355 stars 174 forks source link

Opening Port while Port IS open results in magical parsing #41

Open TemperedEnterprises opened 8 years ago

TemperedEnterprises commented 8 years ago

You really need to lighten up a bit. I mean I guess it is possible to miss the reference to WarGames on pissing on a spark plug - but the is no doubt that it is not nice to condescend to someone and then tell them to replace parts that could NEVER have caused this issue.

I no longer care. I don't hold grudges. But I also don't like fan clubs rife with hero warship. Like getting booted from the other OpenBuilds community without ever even posting there.


At any rate your users still like and use your product. Notwithstanding your personality and the sensitivity therein, it is some nice work. Threading is some of the most difficult programming there is. SO:


Steps to reproduce Bug:

  1. Start Serial-Port-JSON-Server
  2. Open Port in chilipeppr
  3. open built in webserver website of Serial-Port-JSON-Server
  4. type "open [port] 115200 tinyg" even though the port is already open.
  5. observe lost characters in the responses.

So clearly NOT a usb cable at work here. I, do take full responsibility for finding the bug. In my haste to develop something working without having a JSON parser for your server - I just opened the port on connect instead of checking to see if it was open. This lead to the problem.

Might I suggest a:

if(!PortOpen) Port.Open

logic addendum. As a server that is (moving to?) to multiple interface apps and multiple users simultaneously you will no doubt find issues not before seen.

I was able to duplicate the error with two instances of Chilipeppr as well. I basically opened while refreshing the other and opened again. The result was the same.

My guess is that you have 2 threads reading the serial port in the buffer mechanism and one thread is getting half the data while the other half is going to a half garbage collected instance.

At any rate - nice to meet you John.

JEROME4095 commented 8 years ago

TemperedEnterprises. This is an open forum we help each other join the cause or otherwise check out peace and love my friend peace and love if this is your corporate name its not doing yourself any favors peace and love I hope all is well with you.

Help us that what we do ! Here is help. Some is better than other but it's help and we learn in the process

Blessings to!
TemperedEnterprises Jerome

Sent from my iPhone

On Feb 10, 2016, at 15:14, TemperedEnterprises notifications@github.com wrote:

You really need to lighten up a bit. I mean I guess it is possible miss the reference to WarGames on pissing on a spark plug - but the is no doubt that it is not nice to condescend to someone and then tell them to replace parts that could NEVER have caused this issue.

I no longer care. I don't hold grudges. But I also don't like fan clubs rife with hero warship. Like getting booted from the other OpenBuilds community without ever even posting there.

At any rate your users still like and use your product. Notwithstanding your personality and the sensitivity therein, it is some nice work. Threading is some of the most difficult programming there is. SO:

Steps to reproduce Bug:

Start Serial-Port-JSON-Server Open Port in chilipeppr open built in webserver website of Serial-Port-JSON-Server type "open [port] 115200 tinyg" even though the port is already open. observe lost characters in the responses. So clearly NOT a usb cable at work here. I, do take full responsibility for finding the bug. In my haste to develop something working without having a JSON parser for your server - I just opened the port on connect instead of checking to see if it was open. This lead to the problem.

Might I suggest a:

if(!PortOpen) Port.Open

logic addendum. As a server that is (moving?) to multiple interface apps and multiple users simultaneously you will no doubt find issues not before seen.

I was able to duplicate the error with two instances of Chilipeppr as well. I basically opened while refreshing the other and opened again. The result was the same.

My guess is that you have 2 threads reading the serial port in the buffer mechanism and one thread is getting half the data while the other half is going to a half garbage collected instance.

At any rate - nice to meet you John.

— Reply to this email directly or view it on GitHub.

TemperedEnterprises commented 8 years ago

If you say so. This all started because I told John that a bad USB couldn't cause this problem and then made a joke about wargames and pushing on a spark plug.

To this John said I was rude and the whole community turned on me. So over nothing.

Then I still trapped and found your bug. But all you care about is the pecking order and how John don't like being told that it couldn't be a USB cable. For the record, it wasn't.

So no matter what, my name will stand on what I've said and done. If you don't like that, well everyone gets an opinion.

So is it about the work it the fame and vanity. You decide.

I'm about the work.