Onefinity out of the box share for uploading gcode from network

Out of the box network share support for uploading gcode directly from prefered design software.

Temporary solution
note: This generage a share called ‘GCODE’ instead of ‘upload’ in order to not interfere with future 1F implementation.

# SSH to your cnc using user and password.              # usually user=bbmc password=onefinity

sudo -i                                                 # enter same password

############
# MOUNT OS RW
############
sudo mount -o remount,rw /boot                          # makes the file system writable
sudo apt-mark hold hostapd                              # prevent update to hostapd  

##############
# SETUP SAMBA.  REF.: https://pimylifeup.com/raspberry-pi-samba/
##############
sudo apt-get update -y                                  # update
sudo apt-get install samba samba-common-bin -y          # install the packages that we require to setup Samba

sudo nano /etc/samba/smb.conf                           # save it by pressing CTRL + X then Y followed by ENTER.
# +++ replace the file content by this (remove '# ' at the beginning on each line
#
# [global]
# netbios name = ONEFINITY
# server string = One Machine Infinite Possibilities
# workgroup = WORKGROUP
# hosts allow =
# socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
# remote announce =
# remote browse sync =
#
# [GCODE]
# path = /var/lib/bbctrl/upload
# comment = Onefinity_GCODE
# browsable = yes
# read only = no
# valid users =
# writable = yes
# guest ok = yes
# public = yes
# create mask = 0777
# directory mask = 0777
# force user = bbmc
# force create mode = 0777
# force directory mode = 0777
# hosts allow =

sudo smbpasswd -a bbmc                                  # define user bbmc  (when asked for psw input onefinity
sudo systemctl restart smbd                             # restart the samba service 
cd /var/lib/bbctrl                                      # before you can upload files, you will need to 
sudo chmod a+w upload                                   # set appropriate permissions on the RPI

# to connect from the network. use user bbmc and pwd onefinity 

############
# MOUNT OS RO
############
sudo mount -o remount,ro /boot                          # makes the file system read-only

############
# RESTART SYSTEM
############
sudo reboot
2 Likes

Hi Ghislain,

That is awesome information.

How would you go about reversing this process so that you can access a share on a Windows machine from the controller so that it is listed under the “Other Location” tab when you click on the
Browse button?

I found this link : Raspberry Pi Documentation but haven’t tried it yet as I didn’t want to break anything on the controller.

Thanks

Bonjour Stepane,

Sound possible and you should be able to access your remote share from the 1F UI. Look at the active solution here to make your test:

note: refer to my temporary solution and use the ‘mount os rw’ and ‘mount os ro’ section. it was caveat when I started the test for my temporary solution.

This is what I get when try to run the following command :
sudo mount.cifs //192.168.0.12/CNC_Stuff /home/pi/CNC_Stuff -o user=bbmc (also tried the account name for my Windows machine)

mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
:frowning: