Partager des fichiers avec votre CNC Mekanika

Comment créer un dossier partagé sur votre machine CNC

Nos machines CNC sont toutes équipées d'un Raspberry Pi 4B. Il est donc très facile de mettre en place un dossier partagé qui vous permet d'envoyer des fichiers et des codes G sur votre réseau local. Cet article explique comment y parvenir en quelques étapes.

Dossier partagé stocké sur votre machine CNC (Windows 10)

Étape 1 : configurer votre ordinateur

Tout d'abord, vous devez configurer votre ordinateur pour partager des fichiers sur votre réseau local. Naviguez jusqu'à la liste des réseaux WiFi, assurez-vous que votre ordinateur est connecté au bon réseau, puis cliquez sur Propriétés.

Cnc dossier partagé propriétés wifi

Vérifiez que le profil "Réseau Privé" (Private Network) est sélectionné.

Cnc dossier partagé configuration wifi

Ensuite, activez les options de découverte du réseau et de partage de fichiers et d'imprimantes en suivant ces étapes :

  1. Ouvrez le panneau de configuration (Control Panel)
  2. Sélectionnez Réseau et Internet > Centre Réseau et Partage > Paramètres de partage avancés  (Network and Internet > Network and Sharing Center > Advanced sharing settings).
  3. Sélectionnez l'option "Activer la découverte du réseau" (Turn on network discovery).
  4. Sélectionnez l'option "Activer le partage de fichiers et d'imprimantes" (Turn on file and printer sharing) sous la section "Privé" (Private).
  5. Enregistrez les modifications.

Cnc dossier partagé désactiver features windows

Enfin, ouvrez le Panneau de configuration (Control Panel), sélectionnez Programmes (Programs), puis cliquez sur Activer ou désactiver les fonctionnalités de Windows (Turn Windows features on or off).

Cnc Shared Folder Turn windows Features Off

Faites défiler vers le bas et vérifiez que la case Client SMB 1.0 est cochée.

Cnc dossier partagé Smb 1.0

Redémarrez votre ordinateur.

Étape 2 : connectez votre machine CNC au réseau

Allumez l'unité de commande de votre machine et attendez que le système démarre.

Minimisez la fenêtre PlanetCNC pour voir le bureau. Cliquez sur l'icône WiFi en bas à droite et activez le WiFi.

Cnc dossier partagé allumer wifi

Vous devriez voir une liste de tous les réseaux locaux disponibles. Cliquez sur le nom de votre réseau et tapez le mot de passe si nécessaire.

Vous pouvez également connecter directement votre unité de commande à votre routeur à l'aide d'un câble Ethernet et sauter la partie de configuration du WiFi.

Redémarrez le Raspberry Pi en cliquant sur l'icône Raspberry, Déconnexion, puis Redémarrage (Reboot).

Cnc dossier partagé relancer l'ordinateur

Étape 3 : commencer à partager des fichiers

De retour sur votre ordinateur, ouvrez l'explorateur de fichiers et naviguez jusqu'à Réseau (Network). Vous devriez voir un périphérique appelé RASPBERRYPI.

Cnc dossier partagé Raspberry Pi

Double-cliquez sur ce périphérique pour accéder au dossier partagé (Shared folder) de votre machine.

Si vous y êtes invité, vous pouvez saisir le nom d'utilisateur et le mot de passe par défaut du Raspberry Pi
- Nom d'utilisateur : pi
- Mot de passe : raspberry

Vous pouvez maintenant accéder au dossier partagé et y copier des fichiers. Ils apparaîtront automatiquement dans le même dossier sur votre machine.

Cnc dossier partagé chemin accès PC

Cnc dossier partagé Raspberry Pi Accès

Pour accéder à ce dossier depuis votre machine, il suffit de cliquer sur le raccourci en bas à gauche et de naviguer jusqu'à Shared.

Dossier partagé stocké sur votre machine CNC (Mac OS)Dossier partagé stocké sur votre machine CNC (Mac OS)

Assurez-vous que votre ordinateur est connecté à votre réseau local avant de commencer.

Allumez l'unité de commande de votre machine et attendez que le système démarre.

Minimisez la fenêtre PlanetCNC pour voir le bureau. Cliquez sur l'icône WiFi en bas à droite et activez le WiFi.

Cnc Shared Folder allumer Wifi MAC

Vous devriez voir une liste de tous les réseaux locaux disponibles. Cliquez sur le nom de votre réseau et tapez le mot de passe si nécessaire.

Vous pouvez également connecter directement votre unité de commande à votre routeur à l'aide d'un câble Ethernet et sauter la partie de configuration du WiFi.

Redémarrez le Raspberry Pi en cliquant sur l'icône Raspberry, Déconnexion, puis Redémarrage (Reboot).

Cnc Shared Folder Network Discovery Reboot

De retour sur votre ordinateur, ouvrez le Finder et naviguez jusqu'à Réseau (Network). Vous devriez voir un périphérique appelé RASPBERRYPI. Double-cliquez dessus.

Cnc Shared Folder Mac Finder

Si vous y êtes invité, vous pouvez saisir le nom d'utilisateur et le mot de passe par défaut du Raspberry Pi
- Nom d'utilisateur : pi
- Mot de passe : raspberry

Vous pouvez maintenant accéder au dossier partagé et y copier des fichiers. Ils apparaîtront automatiquement dans le même dossier sur votre machine.

Pour accéder à ce dossier depuis votre machine, il suffit de cliquer sur le raccourci en bas à gauche et de naviguer jusqu'à Shared.

Cnc Shared Folder Mac

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.

À propos de Mekanika

Mekanika est une entreprise belge basée à Bruxelles dont l'ambition est de rendre la production locale plus accessible grâce à une approche 100% open-source.

Nous concevons et produisons des machines de haute qualité pour le fraisage CNC et la sérigraphie, qui ont été reconnues pour leur fiabilité et leur facilité d'utilisation. Nos outils sont livrés en kits et entièrement documentés, permettant facilement de les adapter à des besoins spécifiques.

Visitez notre boutique pour en savoir plus, ou consultez notre ressources en ligne et tutoriels pour continuer à apprendre.

Articles connexes

Resuming an Interrupted Milling Progam on PlanetCNC
Reprendre un usinage interrompu sur PlanetCNC

Planet CNC offre la possibilité de démarrer un G-Code à partir d'une ligne spécifique plutôt que depuis le début. Cette fonctionnalité peut s'avérer utile pour reprendre un travail interrompu pour diverses raisons, telles qu'une panne de programme/ordinateur, une coupure de courant ou un arrêt d'urgence.Planet CNC offre la possibilité de démarrer un G-Code à partir d'une ligne spécifique plutôt que depuis le début. Cette fonctionnalité peut s'avérer utile pour reprendre un travail interrompu pour diverses raisons, telles qu'une panne de programme/ordinateur, une coupure de courant ou un arrêt d'urgence.Planet CNC offre la possibilité de démarrer un G-Code à partir d'une ligne spécifique plutôt que depuis le début. Cette fonctionnalité peut s'avérer utile pour reprendre un travail interrompu pour diverses raisons, telles qu'une panne de programme/ordinateur, une coupure de courant ou un arrêt d'urgence.

Quentin Liard

Quentin Liard

Customer Support

 <img src="image.jpg" alt="">
Comprendre et optimiser ta table à dépression

Découvre comment maximiser les performances de ta table à vide en apprenant des conseils pratiques sur les stratégies de coupe, l'entretien du spoilerboard et bien d'autres choses encore.

Maxime Gravet

Maxime Gravet

Product Engineering