Chilipeppr disconnects from the SPJS

Hey all,

I’m getting restarted after not having run the mill for about a year. I just re-flashed my Due with the latest version of g2core and rebuilt the latest SPJS (on a Macbook Pro). I can connect to the board fine using the /dev/tty.usbmodemxxx port, but the connection drops sporadically. Sometimes it works for a few minutes, sometimes it happens almost immediately. There is no message either in Chilipeppr or in the SPJS console, the port just gets unchecked. I can usually just check the port again and it will reconnect to g2core fine, so it’s not that the board locks up, but beyond that I don’t know what to do to troubleshoot it. It’s not usable as is given that if the connection drops during a job, it loses track.

Any ideas? Are there compile options in g2core that could cause this? (I have a custom board that I’m building for.)



If you run SPJS in verbose mode, does that possibly give an error? I have not heard any other folks running into this problem. Also, I do have a decent Mac build in the releases on Github such that you shouldn’t have had to build it yourself. Maybe try the latest Mac build I have? It might be 1 or 2 revs back but the newer revs only added features for Cayenn protocol which isn’t used.

1 Like

It looks like the port is being closed:

2020/11/30 14:06:58 serial.go:546: About to marshal the serial port list. spl:{[{/dev/tty.usbmodem14301 tty.usbmodem14301 true true [] 115200 tinygg2 [default timed nodemcu tinyg tinyg_old tinyg_linemode tinyg_tidmode tinygg2 grbl marlin] 1.96 0}]}
2020/11/30 14:06:58 serial.go:141: Unregistering a port: /dev/tty.usbmodem14301
2020/11/30 14:06:58 serialport.go:372: Shutting down writer on /dev/tty.usbmodem14301
2020/11/30 14:06:58 serialport.go:377: Error closing port at operating system level. Maybe USB cable got pulled? /dev/tty.usbmodem14301 bad file descriptor
2020/11/30 14:06:58 serialport.go:266: writerBuffered just got closed. make sure you make a new one. port:/dev/tty.usbmodem14301
2020/11/30 14:07:07 hub.go:122: sendjson {“P”:"/dev/tty.usbmodem14301",“Data”:[{“D”:“g10 l20 p1 x0 y0 z0 \n”,“Id”:“console48”}]}
2020/11/30 14:07:07 serial.go:606: Sending err back: We could not find the serial port /dev/tty.usbmodem14301 that you were trying to write to.

I’ll try with a different cable, maybe it’s flaky.

Changing cable did not work, but using your build seems to have. Unclear then whether there’s something weird about building locally or if there’s been some regression since you released that Mac build?

That’s great news. I doubt there’s a regression, but I’m wondering now.

I don’t know anything about go but if you tell me how to build the same version locally I can give that a shot, too.

Well, it is just a standard Go build, so what you did is what I presume would work. I do wonder if the later builds of Go are the problem as they have done quite a few releases to Go since my last release on Github.