Pre Release v1pi needs testing

Loaded the hot-spot version and tested it lightly as I’m not competent to test it properly :slight_smile:

I logged on from Mac, I note the IP address which brought a smile.

I uploaded various gcode calibration files and all were accepted and printed (still the same issue with backlash). I could move stuff round with the jog buttons. in cnc.js with no issues.

I didn’t have any issues with it so far, but will give it a better going over tomorrow when the day is fresh.

This is on a raspberry pi 4.

Rob

1 Like

:+1: Thanks Rob!

Jeff I was not getting anything back on the consol screen in CNCJS. I basically read that the connection was made. I unlocked it. This time around. Today I had downloaded your beta. I had been watching for it. I had issues with last one and I really was not too troubled by that either.
Todays download for raspberry pi no hotspot. Beta
Marlin v1’s 8t 16 32 recommended steppers w/end switches. Downloaded from V1.
im on an ardunio mega with a 1.4 ramps shield/board on it.
the PI is a 3-b
An added note. I do have a fully functional machine as I write this. I will work on the cncjs and maybe purfchase a pi4. it is possible that I have an issue with my pi. It is currently dropping off and saying that I am loosing the server every so many minutes. I flashed the drive 3 times today with no luck.

@jeffeb3

Spoke to soon. Am experiencing issues with:

  1. cnc.js is crashing regularly. This is unlikely to be wifi as I’ve pulled the Pi into my office as I work on my issues with backlash. Beats a draughty garage. I have a lot of wifi bandwith and all equipment is within 2m of each other, no social distancing here :slight_smile: I’m trying to find the log files and see if anything jumps out at me.

  2. The date has gone haywire on the pi. It thinks it’s last Friday

root@v1pi:/var/log# date
Fri 29 May 02:06:03 BST 2020
root@v1pi:/var/log#

Suspect this is due to having no internet connection as it’s on a private IP address, but I do have system dates in the future e.g.

root@v1pi:/var/log# ls -l /var/log/
total 1100
-rw-r--r-- 1 root     root       9004 Jun  1  2020 alternatives.log
drwxr-xr-x 2 root     root       4096 Jun  1  2020 apt
-rw-r----- 1 root     adm       29184 May 29 02:02 auth.log
-rw-r--r-- 1 root     root          0 May 27 08:24 bootstrap.log
-rw-rw---- 1 root     utmp       2304 May 29 01:51 btmp
-rw-r----- 1 root     adm      238777 May 29 02:03 daemon.log
-rw-r----- 1 root     adm        6022 May 29 00:17 debug
-rw-r--r-- 1 root     root     121500 Jun  1  2020 dpkg.log
-rw-r--r-- 1 root     root       2688 Jun  1  2020 faillog
-rw-r--r-- 1 root     root        547 Jun  1  2020 fontconfig.log
-rw-r----- 1 root     adm      114560 May 29 00:17 kern.log
-rw-rw-r-- 1 root     utmp     292292 May 29 01:51 lastlog
drwxr-x--- 2 www-data www-data   4096 May 27 08:25 lighttpd
-rw-r----- 1 root     adm      120214 May 29 00:17 messages
drwxr-xr-x 2 root     root       4096 Feb 20  2019 openvpn
drwx------ 2 root     root       4096 May 27 08:24 private
-rw-r--r-- 1 root     root         61 May 27 08:24 regenerate_ssh_host_keys.log
-rw-r----- 1 root     adm       89285 May 29 02:03 syslog
-rw-r----- 1 root     adm      298798 May 29 00:00 syslog.1
-rw-r----- 1 root     adm       16584 May 29 00:17 user.log
-rw-rw-r-- 1 root     utmp       4992 May 29 01:51 wtmp
``

e.g. /var/log/alternatives.log

Not so worried over the date as thats easily changed, cnc.js not being stable with excellent wifi is an issue (unless it's my Macbook's second wifi dongle).

cnc.js just crashed again whilst I was writing the last reply.

You can see the Macro I had just started to create in the background.

/var/log/messages doesn’t show anything. I’m trying to find the cnc.js log file now.

You can’t browse back to the server and need to restart the service.

I’m still looking for the log file.

Rob

The Pi doesn’t have a real time clock, so without internet, yeah, time will be off.

Well… technically, without an ntp service, your time will be off, or at least off from your ntp service…

Yes, it’s a pedantic nitpick, but you could run an ntp service on your own network somewhere without connecting to the internet.

I don’t think the clock should matter.

You can check to see if the process is running from the terminal with sudo service cncjs status. You can get the journalctl output with journalctl -u cncjs.service. That is showing me about the same thing on mine, but mine is working fine.

I think that error message in the website doesn’t mean it has any good indication that something is wrong, just that the communication between the cnc.js process and the web browser is broken. Ideally, we’d see an error message on the pi before blaming the process. It may still be a CPU or connection problem.

I haven’t tried a pi4. Maybe I should. Mine is still working since yesterday on the 3b+ in my garage.

I’ll leave the UI open for a while and see if it breaks itself.

Another thing to check is top. I tried running the hotspot version on a pi2b+ with a wifi dongle, and the dnsmasq was taking a ton of CPU. I’m not sure why. Again, the pi4 is much faster, so I doubt that’s the cause, but it might be a sign.

The point I was making (badly) about the clock was not that the date was out, but that I had a date in the future and in the past. I was expecting it to be consistently wrong.

The PI had never been connected to the Internet as it’s a wifi hotspot so was puzzled as to how dates had changed. If the date had come up three months in the past, that wouldn’t have surprised me.

I have to use the wifi hot spot as my wifi network will not reach to the garage. I live in a house built in 1832 and we have 25 inch (60cm) internal stone walls. It was built to last by the church as it was the local vicarage. This makes wifi hard work and even with a network router in the corner of the house next to the garage, I struggle to get a signal. 25" walls means even a simple hole requires specialist drilling. We are having a major house renovation later in the year and then I’ll run cat-6 to the garage and put dedicated kit in then as well as move all the servers there.

@jeffeb3

I think the issue is more than just a web browser disconnect. I’m having to restart cnc.js after this error occurs. If the browser connection was lost, I’d expect it to reconnect. I got the error shown above in my office with the raspberry PI on one end of the desk, my Macbook at the other and a Netgear router in the same room. There should be no wifi issues at all, indeed I’ve been using this wifi for the last 18 months and have probably moved a couple of TB’s with no known errors.

I was struggling to find a log file for cnc.js, I checked the normal areas in /var/log and sub directories. I then checked for any file ending in log with find but to no avail. I forgot about journalctl -u cncjs.service as I’m so used to old school UNIX. That’s my bad and I have to keep reminding myself about new stuff like systemd.

Now I do have a Raspberry pi 4, but it’s got 2GB of memory and I keep an eye on top. It looks good TBH but now I can check the logs, I’ll look more closely.

What I will try and do is bridge the two wireless wifi networks using a spare wifi router. This means I could monitor the Pi. from my office which is the furthest point away it can be :slight_smile: . Life is never simple. I do have 50m of armoured cat 6 cable but I’d have to drill somewhere to get it into the house and I simply don’t have a 25" drill.

Its a non stop roller coaster :slight_smile:

Thanks to all for the help,

Rob

Networking is complicated. It may not be a wifi signal strength issue but still a connection issue.

Ok. Restart, you mean restart from the landing page? That runs sudo service cncjs restart. Seeing the status before that would be Helpful. It sounds like you know what you’re doing, so maybe we could kill it, and run it manually with the same arguments, then we wouldn’t have to worry about a log. There may be a debug cli option as well.

@jeffeb3

The networking here is fine. I used to be a Cisco/IBM certified network architect but I don’t do much now as other people do that sort of thing at work.

Anyway, the network in this case is the Raspberry PI running in AP mode and the Macbook connecting to it. The Netgear is a red herring. I can’t change much on the Macbook but will look more at the Raspberry Pi 4 and see if there is something going on. I’d love a decent log file to look at. It could be the http server that’s going awry, but I’ll get to the bottom of it.

When I restart, I have to go to the command line on the Pi and restart the service, I don’t go back to the landing page to restart it as I tend to work better on the command line. I’ve just had 2.4m x 1.2m of 18mm MDF delivered for the spoil board (it will be cut down) and that’s now leaning against the CNC table so can’t get to my PI until I get the jigsaw out and get that down to a manageable size. So thats this evenings job, then get the wifi router in bridge mode and get it out to the garage.

Rob

1 Like

Ok. I just checked and mine is still running, so definitely not an issue here, unless you need to do something to encourage it to break. I was just messing with the macros and didn’t come up with any errors.

Here’s how you can run it manually (as pi, not root):

sudo service cncjs stop
node /usr/local/bin/cnc --host=0.0.0.0 --port=8000

Mine prints out this:

Warning: The "cnc" executable is deprecated and will be removed in the next major release. Use "cncjs" instead to avoid deprecation.

2020-06-04T13:39:49.166Z - info init Loading configuration from "/home/pi/.cncrc"
2020-06-04T13:39:50.085Z - info init Starting the server at http://127.0.1.1:8000

I haven’t seen that warning before, so I’ll probably fix that, and I forgot to bump the version, so I’ll need to make a new image anyway.

1 Like

Thanks for putting the v1pi together @jeffeb3!

1 Like

I saw that as well. I am running stuff from node.js that was supposed to be deprecated years ago and it’s still there :slight_smile:

Mine locks up after about 5 minutes. No keyboard or mouse movement. I’ll troubleshoot some more after work, well after I help my dad move a dresser after work…

You’re running with an X server? Which pi do you have?

Pi 4, 4gb model.

Okay, so far I got it working with midori instead of chromium. Well, it doesn’t crash anyway. Have to take the whole thing out and hook it back up to the cnc.