On occasion, the Beaglebone board running the Pocket NC can end up in a state where it continually logs a single error over and over. This can cause the Beaglebone's disk to run out of space, making connection over USB impossible. The steps below show how to clear those logs and free up disk space.
Step 1: Checking and Clearing Space
Browser UI loads but does not connect
Indicator in lower left is red and says "Connecting..."
No red light, blinking or solid, from the E-Stop button.
E-Stop button is the leftwards of the two silver buttons to the left of the USB slot.
Use command line interactions to find one or more large files on the BeagleBone, delete or truncate that file to clear space, then reboot.
Establish a command line session over SSH.
Windows PC: you will need to install an SSH client. We recommend PuTTY.
Once PuTTY is installed and launched, we'll just need to input the IP address (192.168.7.2 if connecting over USB) to the Host Name field, everything else can be left default.
Macs: this can be done with the default MacOS Terminal
Open a Terminal window and enter ssh firstname.lastname@example.org
2. You will be prompted for a password, which is pocketnc
3. Next check that the disk space is in fact full and there is not some other issue causing connection problems:
Enter command df
Under the Filesystem column, there will be a row labeled either /dev/mmcblk1p1 or /dev/disk/by-uuid/ (if its the second possibility there will also be a string of random letters and digits unique to your BeagleBone). Check this row's value under column Available. If this is 0, then disk space is full.
4. There are two causes of full disks that we've observed. It can be a combination, but usually one factor is dominant:
You've uploaded lots of G-code. The BeagleBone has about 1.5GB of free disk space available to store G-code when it ships. If you know this to be the case go to step 5, other wise skip to step 6.
A software error caused a high volume of automatic logging messages to be generated, which continued until all disk space was consumed.
5. If you have uploaded numerous or large G-code programs, we'll check that first, if not skip to the next step to check log files.
cd ~/ncfiles to Change Directory into the location we store G-code programs.
ls -sh to print a list of files and their sizes.
Pick one to delete. Be sure its saved elsewhere if you still need it!
rm file_name.ngc with file_name replaced with the actual name of your file
If the file name contains space characters, you'll need to wrap the file name in quote characters.
rm "a file name with spaces.ngc"
In case you'd like to delete all G-code programs you can enter rm *.ngc
6. Automatic log files can also become quite large and eventually consume all disk space.
cd /var/log to Change Directory into the location log files are stored.
ls -sh to print a list of files and their sizes. File size is the fifth column, and filename is the last.
We'll identify a large file to clear. It doesn't need to be the largest, just large enough that clearing it frees up enough disk space for the UI to connect This is usually linuxcnc.log
sudo truncate -s 0 linuxcnc.log
7. Reboot the machine
sudo shutdown -r now if you want to shut down from the command line.
Otherwise power cycle the whole machine. Don't forget to remove USB cable or the BeagleBone will not shutdown.
8. After powering back up, if the UI now succesfully connnects, please go into the "Conf." tab, Status sub-tab, and then click Clear Logs. This will automatically truncate any log files that were not truncated in step 6. We recommend this gets checked semi-regularly, though we are working on a fix to make this unnecessary.
An example using Terminal on a Mac:
To prevent this error from occuring again, occasionally check the Conf > Status tab to keep an eye on how much space G-code and log files are taking up. You can click the Clear Logs button at the bottom to delete your log files. If your logs seem to fill up space often, please contact us.
Step 2: Re-Installing the Tool Table
In the case where the tool table on your "Tooling" page is missing after performing the above steps:
Enter command cp pocketnc/Settings/tool.tbl.default pocketnc/Settings/tool.tbl