Share Files With Your Mekanika CNC

How to Create a Shared Folder on Your CNC Machine

Our CNC machines are all equipped with a Raspberry Pi 4B, making it very easy to set up a shared folder that allows you to send files and G-codes over your local network. This article explains how to achieve this in a few steps.

Access a Folder Stocked on your CNC from your Windows 10 PC

1. Configure your Computer

First, you need to configure your computer to share files over your local network. Navigate to the list of WiFi networks, make sure that your computer is connected to the right network, and click on Properties.

Cnc Shared Folder Wifi Properties

Verify that the Private network profile is selected.

Cnc Shared Folder Configure Wifi

Then, turn on network discovery and file & printer sharing options by following these steps:

  1. Open the Control Panel.
  2. Select Network and Internet > Network and Sharing Center > Advanced sharing settings.
  3. Select Turn on network discovery.
  4. Select Turn on file and printer sharing under Private.
  5. Save the changes.

Cnc Shared Folder Turn Features Off

Finally, open the Control Panel, select Programs, and click on Turn Windows features on or off.

Cnc Shared Folder Turn windows Features Off

Scroll down and verify that the SMB 1.0 Client is checked.

Cnc Shared Smb 1.0

Reboot your computer.

2. Connect your CNC Machine to the Network

Turn on your control unit and wait for the system to start.

Minimize the PlanetCNC window to see the desktop. Click on the bottom-right WiFi icon and turn on the WiFi.

Mekanika Cnc Shared Folder Turn on Wifi on tour raspberry pi

You should see a list of all the local networks available. Click on the name of your network and type the password if needed.

You can also directly connect your control unit to your router using an ethernet cable and skip the WiFi configuration part.

Reboot the Raspberry Pi by clicking on the raspberry icon, Logout, and then Reboot.

Cnc Shared Folder Network Discovery Reboot

3. Start Sharing Files

Back to your computer, open the file explorer and navigate to Network. You should see a device called RASPBERRYPI.

Mekanika Cnc Shared Folder Raspberry pi

Double click on this device to access the Shared Folder of your machine.

If prompted, you can type in the default username and password of the Raspberry Pi:
username: pi
password: raspberry

You can now access the Shared folder and copy files in it. They will automatically appear in the same folder on your machine.

Cnc Shared Folder Pc Access

Cnc Shared Folder Raspberry Pi Access

To access that folder from your machine, simply click on the bottom-left shortcut and navigate to Shared.

Access a Folder Stocked on your CNC from your Mac

Make sure that your computer is connected to your local network before starting.

Turn on your control unit and wait for the system to start.

Minimize the PlanetCNC window to see the desktop. Click on the bottom-right WiFi icon and turn on the WiFi.

shared folder on a mekanika cnc turn on the wifi

You should see a list of all the local networks available. Click on the name of your network and type the password if needed.

You can also directly connect your control unit to your router using an ethernet cable and skip the WiFi configuration part.

Reboot the Raspberry Pi by clicking on the raspberry icon, Logout, and then Reboot.

Shared folder on a mekanika cnc machine reboot the machine

Back to your Mac computer, open the Finder, and navigate to Network. You should see a device called RASPBERRYPI. Double click on it.

shared folder Mac Finder

If prompted, you can type in the default username and password of the Raspberry Pi:
username: pi
password: raspberry

You can now access the Shared folder and copy files in it. They will automatically appear in the same folder on your machine.

To access that folder from your machine, simply click on the bottom-left shortcut and navigate to Shared.

shared folder MAC for cnc mekanika

Access a Folder Stocked on your Computer from your CNC (IN BETA TESTING)

This is our recommended setting:
Configuring a shared folder on your personal computer so you can access your files when navigating on your CNC machine. This way, you can work on your projects on your computer, save the G-code files in this shared folder, then go to your machine and open those files directly without the need for a USB key.

The only condition: both the computer and the machine have to be connected to the same internet network to see the files on the machine (it can be by Ethernet cable or WiFi, it doesn't matter as long as the network is the same).
 

1.A. Windows 11 - PC Configuration

 
First we need to setup the shared folder on your Windows 11 PC.

1.1. Windows user with password

To access the folder from an external machine, you'll be requested the password of a user of the PC.

  • For security reasons, we recommend creating a new separate account that has no access to important things on your computer and will be only used to share the files. 
    Go to Settings > Accounts Other Users > Add an account, and keep note of the Username and Password you choose.
  • If you don't want to create one, or if your network is very secure, you can also use your regular Windows account.
    But if you use a PIN and not a password to connect to your account, it won't be usable from an external machine: you will have to create a real password in Settings > Accounts > Sign-in options.

1.2. Shared folder configuration

  • Right-click on the folder you want to share > Properties > Sharing > Advanced Sharing
  • Check "Share this folder" (you can put a sharing name if you want it to be different than the folder's name)
  • Click OK

Advanced Sharing Windows11

  • We'll now give permissions to the account we just created so it can access the folder.
  • Click on Share > select the account and click Add (in my example I called the account "admin").
  • Give Read/Write permissions to the account, then click Share and Finish.
    (if you made the settings while logged as the sharing account, it will already be "owner" of the folder which is fine).
  • If a pop-up to activate Windows network discovery appears, click Yes.

Share Permissions Windows11

  • Note the PC name (e.g., "MYPC") and the Folder's Share Name (e.g., "shared-folder") to enter the info in the machine later.
    They are shown in the sharing window in "Network path" (in my example the path is "\\QUENTINMEKANIKA\shared-folder" so, my PC name = QUENTINMEKANIKA and Share name = shared-folder).

 

1.B. Mac OS Configuration (to be tested)

1.1. Shared folder configuration

  • On your Mac, choose Apple menu > System Settings, click General in the sidebar, then click Sharing.
  • Take note of the Computer's Name for the next steps.
  • Below Content & Media, click the Info button next to File Sharing.
  • Turn on File Sharing.
  • Click Options, then turn on “Share files and folders using SMB.”
  • Add the folder you want to share with the +.
  • Take note of the name of the folder too for the next steps.

 

2. CNC Machine Configuration 

IMPORTANT: Using the Virtual Keyboard

In several steps you will be required to type some text on the machine, but it doesn't have a keyboard.
Connecting an external keyboard to the machine can bring some complications, so here's a solution: the virtual keyboard.

  • Go to Raspberry Logo > Accessories > Virtual Keyboard (it may also be accessible by a shortcut on the taskbar)
  • A keyboard will appear on the screen, you can use it as a regular keyboard using the touchscreen.
  • Special characters are accessible through the shift button on the left

2.1. Connecting the CNC to the Internet

If it is not the case yet, we need to give internet access to the Raspberry Pi (the computer) of the machine. Remember it has to be on the same network as the computer sharing the file.
 
The easiest way is to connect an Ethernet cable at the back of the control unit. Otherwise you can connect it by WiFi this way:
  • Turn on your control unit and wait for the system to start.
  • Minimize the PlanetCNC window to see the desktop.
  • Click on the bottom-right WiFi icon (2 bars with red crosses) and turn on the WiFi.
  • You should see a list of all the local networks available after a while.
  • Click on the name of your network and type the security key using the virtual keyboard.

Wifi Raspberry Pi

2.2. The Configuration Script for the CNC Machine

  • Download this Mekanika File Sharing Setup Script (contact us to get the file for the moment) and extract the 2 scripts inside on a USB drive.
  • Plug the USB drive into the machine and Copy the 2 files to the Raspberry Pi's Desktop (you can drag and drop from the USB drive or press and hold on the files to access the right click menu).
  • Open a Terminal (Black icon in the taskbar at the bottom)
  • Use the virtual keyboard to enter this line (exactly) then press Enter:
bash ~/Desktop/setup_fileshare.sh
  • The installation script will begin, follow the instructions in the terminal.
    When there is a list, type the number of your choice  then press Enter
    When a question ends with y/n you have to type Y for yes or N for no then press Enter
Raspberry Pi Command in Terminal
  • The installation script will begin, follow the instructions in the terminal.
    When there is a list, type the number of your choice then press Enter (e.g. 1 for English, 2 for French)
    When a question ends with y/n you have to type Y for yes or N for no, then press Enter.

Pi Share Mekanika

  • Complete the instructions until it says you are done, then restart the machine:
    Raspberry logo > Shutdown > Reboot.
That's it !
 

3. How it works

  • The shared folder will be accessible on the CNC at  the folder you specified (by defaut it will be the name of your computer and folder) and visible on the explorer just like a regular folder.
  • As long as your computer is on the same network, you'll have access to the files in the shared folder.
  • You can add more users sharing their files or more folders to share by launching the same script again. You can then choose to add the user/folder to the same "/mnt/shared" folder or create a separate one.
  • If you can't see files inside the folder: go to View > Reload Folder to refresh the folder.

4. Common Issues in the configuration script

  • Failed to access the computer:
    you are probably not on the same network, or your IP configuration 
  • "Could not resolve"
    > Try using the PC's IP address (e.g., 192.168.1.1) instead of its name

5. Uninstall

You can uninstall one or all users/shared folders by launching the uninstall script with the command:

bash ~/Desktop/uninstall_fileshare.sh

Then follow the instructions on screen.

About Mekanika

Mekanika is a Belgian company based in Brussels whose ambition is to make local production more accessible thanks to a 100% open-source approach.

We design and produce high quality machines for CNC milling and screen printing, which have been recognized for their reliability and ease of use. Our tools are delivered as kits and fully documented, allowing to easily adapt them to specific needs.

Visit our shop to find out more, or check out our online resources and tutorials to continue learning.

Related Articles

Resuming an Interrupted Milling Progam on PlanetCNC
Resuming an Interrupted Milling Progam on PlanetCNC

Planet CNC offers the option of starting a G-code from a specific line instead of from the beginning. This can be useful for resuming a job that was stopped for various reasons, such as a program/computer crash, a power outage or an emergency stop.

Quentin Liard

Quentin Liard

Customer Support

 <img src="image.jpg" alt="">
Understanding & Optimizing Your Vacuum Table

Find out how to maximize the performance of your vacuum table by learning practical tips on cutting strategies, spoilerboard maintenance and many more.

Maxime Gravet

Maxime Gravet

Product Engineering