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

Windows 7 & ChiliPeppr Howto? #56

Open imalipusram opened 7 years ago

imalipusram commented 7 years ago

Probably a really stupid problem with Windows 7, bit I simply don't get it working. On my Xubuntu system, there are no issues accessing the server and a serial port.

The json server and Firefox are allowed through the firewall, the server offers a port at 192.168.0.105:8989 (at least it says so, I also tried -addr ":9090") and enumerates 2 serial ports, but ChiliPeppr can't access the server. A scan at 192.168.0.* doesn't find it, too.

netstat shows 127.0.0.1 and 192.168.0.105 with some ports, but none related to the json server.

Starting the server with admin privileges also doesn't do the trick.

What am I missing? Any hints?

Thanks for your help!

chilipeppr commented 7 years ago

When you run the scan in ChiliPeppr, it doesn't see anything? Screenshot of ChiliPeppr would help me debug for you as well.

imalipusram commented 7 years ago

Output from the driver:

`l-port-json-server-1.88_windows_amd64>serial-port-json-server.exe -v

2016/12/14 17:01:10 main.go:89: Version:1.88 2016/12/14 17:01:10 main.go:96: Hostname: imalipusram-HP 2016/12/14 17:01:10 main.go:102: Garbage collection is on using Standard mode, meaning we just let Golang determine when to garbage collect. 2016/12/14 17:01:10 main.go:115: Starting server and websocket on 192.168.0.105:8989 2016/12/14 17:01:10 main.go:118: The Serial Port JSON Server is now running. 2016/12/14 17:01:10 main.go:119: If you are using ChiliPeppr, you may go back to it and connect to this server. 2016/12/14 17:01:10 seriallist_windows.go:198: DeviceId elements:[ROOT\PORTS\0001] 2016/12/14 17:01:10 seriallist_windows.go:198: DeviceId elements:[USB\VID_1A86 PID_7523\62B8FF3D0 0 2] 2016/12/14 17:01:10 seriallist_windows.go:231: index:0, name:COM5, friendly:HHD Software Virtual Serial Port (COM5) 2016/12/14 17:01:10 seriallist_windows.go:232: pid:, vid: 2016/12/14 17:01:10 seriallist_windows.go:231: index:1, name:COM12, friendly:USB-SERIAL CH340 (COM12) 2016/12/14 17:01:10 seriallist_windows.go:232: pid:7523, vid:1A86 2016/12/14 17:01:10 serial.go:123: Inside run of serialhub 2016/12/14 17:01:10 cayenn.go:62: UDP server running on port 8988 to listen for incoming device announcements. 2016/12/14 17:01:11 main.go:144: Your serial ports: 2016/12/14 17:01:11 main.go:151: {COM12 USB-SERIAL CH340 (COM12) [] 0 wch.cn 7523 1A86} 2016/12/14 17:01:11 main.go:151: {COM5 HHD Software Virtual Serial Port (COM5) [] ROOT\PORTS\0001 HHD Software Ltd. }`

Output from netstat:

`C:\Users\imalipusram>netstat

Active Connections

Proto Local Address Foreign Address State TCP 127.0.0.1:5939 imalipusram-HP:49161 ESTABLISHED TCP 127.0.0.1:49161 imalipusram-HP:5939 ESTABLISHED TCP 127.0.0.1:49220 imalipusram-HP:49221 ESTABLISHED TCP 127.0.0.1:49221 imalipusram-HP:49220 ESTABLISHED TCP 127.0.0.1:49224 imalipusram-HP:49225 ESTABLISHED TCP 127.0.0.1:49225 imalipusram-HP:49224 ESTABLISHED TCP 127.0.0.1:49226 imalipusram-HP:49227 ESTABLISHED TCP 127.0.0.1:49227 imalipusram-HP:49226 ESTABLISHED TCP 192.168.0.105:49160 server50302:5938 ESTABLISHED TCP 192.168.0.105:49205 a23-53-69-189:https CLOSE_WAIT TCP 192.168.0.105:49215 client:https CLOSE_WAIT TCP 192.168.0.105:49228 162.125.34.129:https ESTABLISHED TCP 192.168.0.105:49229 api:https CLOSE_WAIT TCP 192.168.0.105:49575 d:https CLOSE_WAIT TCP 192.168.0.105:49582 client:https CLOSE_WAIT TCP 192.168.0.105:49609 client:https TIME_WAIT TCP 192.168.0.105:49610 ec2-54-87-47-227:https ESTABLISHED TCP 192.168.0.105:49611 45.58.69.97:https TIME_WAIT TCP [::1]:22350 imalipusram-HP:49200 ESTABLISHED TCP [::1]:49200 imalipusram-HP:22350 ESTABLISHED`

Have tried adding the screenshot from ChiliPeppr as .png and .jpg, doesn't work ("Something went really wrong, and we can’t process that file. Try again.")

Please find it here: https://i1.wp.com/luan78zao.files.wordpress.com/2016/12/screenshot_chilipeppr_part.jpg?ssl=1&w=450

chilipeppr commented 7 years ago

All of your output looks correct. The screenshot didn't come through.

What about ad blockers? Do you have any of those?

On Wed, Dec 14, 2016 at 6:54 AM, imalipusram notifications@github.com wrote:

Output from the driver:

`l-port-json-server-1.88_windows_amd64>serial-port-json-server.exe -v

2016/12/14 17:01:10 main.go:89: Version:1.88 2016/12/14 17:01:10 main.go:96: Hostname: imalipusram-HP 2016/12/14 17:01:10 main.go:102: Garbage collection is on using Standard mode, meaning we just let Golang determine when to garbage collect. 2016/12/14 17:01:10 main.go:115: Starting server and websocket on 192.168.0.105:8989 2016/12/14 17:01:10 main.go:118: The Serial Port JSON Server is now running. 2016/12/14 17:01:10 main.go:119: If you are using ChiliPeppr, you may go back to it and connect to this server. 2016/12/14 17:01:10 seriallist_windows.go:198: DeviceId elements:[ROOT\PORTS\0001] 2016/12/14 17:01:10 seriallist_windows.go:198: DeviceId elements:[USB\VID_1A86 PID_7523\62B8FF3D0 0 2] 2016/12/14 17:01:10 seriallist_windows.go:231: index:0, name:COM5, friendly:HHD Software Virtual Serial Port (COM5) 2016/12/14 17:01:10 seriallist_windows.go:232: pid:, vid: 2016/12/14 17:01:10 seriallist_windows.go:231: index:1, name:COM12, friendly:USB-SERIAL CH340 (COM12) 2016/12/14 17:01:10 seriallist_windows.go:232: pid:7523, vid:1A86 2016/12/14 17:01:10 serial.go:123: Inside run of serialhub 2016/12/14 17:01:10 cayenn.go:62: UDP server running on port 8988 to listen for incoming device announcements. 2016/12/14 17:01:11 main.go:144: Your serial ports: 2016/12/14 17:01:11 main.go:151: {COM12 USB-SERIAL CH340 (COM12) [] 0 wch.cn 7523 1A86} 2016/12/14 17:01:11 main.go:151: {COM5 HHD Software Virtual Serial Port (COM5) [] ROOT\PORTS\0001 HHD Software Ltd. }`

Output from netstat

`C:\Users\imalipusram>netstat

Active Connections

Proto Local Address Foreign Address State TCP 127.0.0.1:5939 imalipusram-HP:49161 ESTABLISHED TCP 127.0.0.1:49161 imalipusram-HP:5939 ESTABLISHED TCP 127.0.0.1:49220 imalipusram-HP:49221 ESTABLISHED TCP 127.0.0.1:49221 imalipusram-HP:49220 ESTABLISHED TCP 127.0.0.1:49224 imalipusram-HP:49225 ESTABLISHED TCP 127.0.0.1:49225 imalipusram-HP:49224 ESTABLISHED TCP 127.0.0.1:49226 imalipusram-HP:49227 ESTABLISHED TCP 127.0.0.1:49227 imalipusram-HP:49226 ESTABLISHED TCP 192.168.0.105:49160 server50302:5938 ESTABLISHED TCP 192.168.0.105:49205 a23-53-69-189:https CLOSE_WAIT TCP 192.168.0.105:49215 client:https CLOSE_WAIT TCP 192.168.0.105:49228 162.125.34.129:https ESTABLISHED TCP 192.168.0.105:49229 api:https CLOSE_WAIT TCP 192.168.0.105:49575 d:https CLOSE_WAIT TCP 192.168.0.105:49582 client:https CLOSE_WAIT TCP 192.168.0.105:49609 client:https TIME_WAIT TCP 192.168.0.105:49610 ec2-54-87-47-227:https ESTABLISHED TCP 192.168.0.105:49611 45.58.69.97:https TIME_WAIT TCP [::1]:22350 imalipusram-HP:49200 ESTABLISHED TCP [::1]:49200 imalipusram-HP:22350 ESTABLISHED`

[image: Uploading screenshot_chilipeppr_part.jpg…]

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/johnlauer/serial-port-json-server/issues/56#issuecomment-267054136, or mute the thread https://github.com/notifications/unsubscribe-auth/AHidbS3jr4Fuv_hZJkBR_XKQmFnJxqXtks5rIAM2gaJpZM4LMp_5 .

imalipusram commented 7 years ago

What about ad blockers? Do you have any of those? of course! -> disabled. upload works. screenshot_chilipeppr_part

johnlauer commented 7 years ago

BTW, you’re on an old version.

From: imalipusram [mailto:notifications@github.com] Sent: Wednesday, December 14, 2016 6:45 AM To: johnlauer/serial-port-json-server serial-port-json-server@noreply.github.com Subject: Re: [johnlauer/serial-port-json-server] Windows 7 & ChiliPeppr Howto? (#56)

Output from the driver:

`l-port-json-server-1.88_windows_amd64>serial-port-json-server.exe -v

2016/12/14 17:01:10 main.go:89: Version:1.88 2016/12/14 17:01:10 main.go:96: Hostname: imalipusram-HP 2016/12/14 17:01:10 main.go:102: Garbage collection is on using Standard mode, meaning we just let Golang determine when to garbage collect. 2016/12/14 17:01:10 main.go:115: Starting server and websocket on 192.168.0.105:8989 2016/12/14 17:01:10 main.go:118: The Serial Port JSON Server is now running. 2016/12/14 17:01:10 main.go:119: If you are using ChiliPeppr, you may go back to it and connect to this server. 2016/12/14 17:01:10 seriallist_windows.go:198: DeviceId elements:[ROOT\PORTS\0001] 2016/12/14 17:01:10 seriallist_windows.go:198: DeviceId elements:[USB\VID_1A86 PID_7523\62B8FF3D0 0 2] 2016/12/14 17:01:10 seriallist_windows.go:231: index:0, name:COM5, friendly:HHD Software Virtual Serial Port (COM5) 2016/12/14 17:01:10 seriallist_windows.go:232: pid:, vid: 2016/12/14 17:01:10 seriallist_windows.go:231: index:1, name:COM12, friendly:USB-SERIAL CH340 (COM12) 2016/12/14 17:01:10 seriallist_windows.go:232: pid:7523, vid:1A86 2016/12/14 17:01:10 serial.go:123: Inside run of serialhub 2016/12/14 17:01:10 cayenn.go:62: UDP server running on port 8988 to listen for incoming device announcements. 2016/12/14 17:01:11 main.go:144: Your serial ports: 2016/12/14 17:01:11 main.go:151: {COM12 USB-SERIAL CH340 (COM12) [] 0 wch.cn 7523 1A86} 2016/12/14 17:01:11 main.go:151: {COM5 HHD Software Virtual Serial Port (COM5) [] ROOT\PORTS\0001 HHD Software Ltd. }`

Output from netstat

`C:\Users\imalipusram>netstat

Active Connections

Proto Local Address Foreign Address State TCP 127.0.0.1:5939 imalipusram-HP:49161 ESTABLISHED TCP 127.0.0.1:49161 imalipusram-HP:5939 ESTABLISHED TCP 127.0.0.1:49220 imalipusram-HP:49221 ESTABLISHED TCP 127.0.0.1:49221 imalipusram-HP:49220 ESTABLISHED TCP 127.0.0.1:49224 imalipusram-HP:49225 ESTABLISHED TCP 127.0.0.1:49225 imalipusram-HP:49224 ESTABLISHED TCP 127.0.0.1:49226 imalipusram-HP:49227 ESTABLISHED TCP 127.0.0.1:49227 imalipusram-HP:49226 ESTABLISHED TCP 192.168.0.105:49160 server50302:5938 ESTABLISHED TCP 192.168.0.105:49205 a23-53-69-189:https CLOSE_WAIT TCP 192.168.0.105:49215 client:https CLOSE_WAIT TCP 192.168.0.105:49228 162.125.34.129:https ESTABLISHED TCP 192.168.0.105:49229 api:https CLOSE_WAIT TCP 192.168.0.105:49575 d:https CLOSE_WAIT TCP 192.168.0.105:49582 client:https CLOSE_WAIT TCP 192.168.0.105:49609 client:https TIME_WAIT TCP 192.168.0.105:49610 ec2-54-87-47-227:https ESTABLISHED TCP 192.168.0.105:49611 45.58.69.97:https TIME_WAIT TCP [::1]:22350 imalipusram-HP:49200 ESTABLISHED TCP [::1]:49200 imalipusram-HP:22350 ESTABLISHED`

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

imalipusram commented 7 years ago

BTW, you’re on an old version.

Downloaded through the link on the chilipeppr/grbl page. Will check and update tomorrow (I'm on the other side of the globe - good night!). Thanks, John!

imalipusram commented 7 years ago

Ok. updated to the latest release (1.92 WINx64), gave it permission to cross the firewall. Same result: netstat doesn't list the server, ChiliPeppr can't find it. On my xubuntu machine, netstat lists (using port 9090): [snip] tcp 0 0 localhost:48662 localhost:9090 ESTABLISHED [snip] tcp6 0 0 localhost:9090 localhost:48662 ESTABLISHED [snip]

chilipeppr commented 7 years ago

Thought you already determined the core problem is your ad blocker?

imalipusram commented 7 years ago

Ad blocker was the cause for posting the image to this board. I assume the problem is between the server and the operating system, as I can't see the server with netstat.

chilipeppr commented 7 years ago

My guess is your ad blocker is blocking the websocket or your firewall on your server is blocking any app from acting as a server on a port.

imalipusram commented 7 years ago

I am using Adblock plus within Firefox. It shouldn't block anything outside the browser, I hope. However, there is something running called "Windows Defender" (came with the OS) and Avira antivirus software. Might be one of them is the culprit and is happily blocking, but giving no alert. Will dive into and report. Thanks!

Edit: I haven't noticed any ads being displayed on ChiliPeppr with AdblockPlus turned off (I am currently on Xubuntu).

However, I noticed when turning it on, the JSON connection was dropped. After re-laoding the page (/grbl) everything appeared to be fine, however. But I couldn't reproduce this.

imalipusram commented 7 years ago

Meanwhile, I have tested it on another Win7 32bit machine where the serial port server gets connected to Chilipeppr without any problem. But it still doesn't work on this machine, tested with 1.88 and 1.92. It's an HP Envy notebook with Win7 64bit. On the non working machine in question I noticed an "Ajax error" flashing up shortly while loading Chilipeppr. Might this hint to the underlying problem?

chilipeppr commented 7 years ago

Screenshots help folks give you help

On Mar 26, 2017 6:41 PM, "imalipusram" notifications@github.com wrote:

Meanwhile, I have tested it on another Win7 32bit machine where the serial port server gets connected to Chilipeppr without any problem. But it still doesn't work on this machine, tested with 1.88 and 1.92. It's an HP Envy notebook with Win7 64bit. On the non working machine in question I noticed an "Ajax error" flashing up shortly while loading Chilipeppr. Might this hint to the problem?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/johnlauer/serial-port-json-server/issues/56#issuecomment-289334686, or mute the thread https://github.com/notifications/unsubscribe-auth/AHidbQOvBkv_OgV-S0DBsQFAbhdlCCzMks5rpxPbgaJpZM4LMp_5 .