User Tools

Site Tools


tina2:octoprint

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tina2:octoprint [2023/01/31 08:48]
mao
tina2:octoprint [2023/09/07 14:28] (current)
caojie
Line 11: Line 11:
 [[https://github.com/WEEDO3DTECH/OctoPi/releases/download/v1.8.6/2022-09-22-raspios-bullseye-armhf-lite-eww.xz|Download our custom version of OctoPi]] .\\ [[https://github.com/WEEDO3DTECH/OctoPi/releases/download/v1.8.6/2022-09-22-raspios-bullseye-armhf-lite-eww.xz|Download our custom version of OctoPi]] .\\
 ====2.Install image tool==== ====2.Install image tool====
-Download the latest version of [[https://www.raspberrypi.com/software/|Raspberry Pi Imager]] and install it. If you want to use Raspberry Pi Imager from a second Raspberry Pi, you can install it from a terminal using **sudo apt install rpi-imager**\\+Download the latest version of [[https://www.raspberrypi.com/software/|Raspberry Pi Imager]] and install it. \\
 ====3.Flash image==== ====3.Flash image====
 Then: Then:
Line 20: Line 20:
 ====4.Connect Printer==== ====4.Connect Printer====
 Select TINA2 from the "Printer Profile" settings, and connect the printer with 1000000 baud rate. Select TINA2 from the "Printer Profile" settings, and connect the printer with 1000000 baud rate.
-{{:octoprint:tina2-octoprint-connection.png?400|}}+{{:octoprint:tina2-octoprint-connection.png?600|}}\\
  
 ---- ----
Line 47: Line 47:
   wget http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-kernel-headers_1.20201126-1_armhf.deb    wget http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-kernel-headers_1.20201126-1_armhf.deb 
 (If your Linux kernel version is not 5.4.79, download the corresponding one from http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/ ; \\ (If your Linux kernel version is not 5.4.79, download the corresponding one from http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/ ; \\
-Use this command to check which version of your Linux kernel: **uname -r**)\\+Use this command to check which version of your Linux kernel is: **uname -r**)\\
 \\ \\
 Install the header file : Install the header file :
Line 53: Line 53:
 {{:octoprint:4install-header.png?400|}} {{:octoprint:4install-header.png?400|}}
  
-===b)Download the CH340 serial driver source code and unzip it===+===b)Download the CH340/CH341 serial driver source code and unzip it===
   wget http://www.weedo3dprinter.com/lib/exe/fetch.php/firmware/ch341ser_linux-kernel5.4.79.zip   wget http://www.weedo3dprinter.com/lib/exe/fetch.php/firmware/ch341ser_linux-kernel5.4.79.zip
   unzip ch341ser_linux-kernel5.4.79.zip   unzip ch341ser_linux-kernel5.4.79.zip
Line 67: Line 67:
 {{:octoprint:7copy.png?400|}} {{:octoprint:7copy.png?400|}}
  
-====5.Change OctoPrint source file===+====5.Change OctoPrint source file====
 ===a)Test Connection=== ===a)Test Connection===
 +{{:octoprint:tina2-octoprint-test-connected.png?600|}}\\
 +**If you can connect the printer**,skip to section 6.\\
 +\\
 {{:octoprint:tina2-octoprint-test-connection.png?600|}}\\ {{:octoprint:tina2-octoprint-test-connection.png?600|}}\\
-**If you can not connect the printer**, you need to change the serial communication python file.+**If you can not connect the printer**, you need to change the serial communication python file.\\ 
 ===b)change the serial communication python file=== ===b)change the serial communication python file===
-Open the serial communication python file+Open the serial communication python file.\\
 Its path seems like this: Its path seems like this:
   /home/pi/oprint/lib/python3.7/site-packages/octoprint/util/comm.py   /home/pi/oprint/lib/python3.7/site-packages/octoprint/util/comm.py
 If your python version is not python3.7, just replace "python3.7" with your real version.\\ If your python version is not python3.7, just replace "python3.7" with your real version.\\
 Write this code after opening the serial port and save it: Write this code after opening the serial port and save it:
-  time.sleep(0.5)+  #set default
   serial_obj.setDTR(False)   serial_obj.setDTR(False)
   serial_obj.setRTS(False)   serial_obj.setRTS(False)
-{{:octoprint:tina2-octoprint-change-py.png?400|}}+  serial_obj.oopen() 
 +  # force reboot printer 
 +  time.sleep(0.1) 
 +  serial_obj.setDTR(True) 
 +  serial_obj.setRTS(True) 
 +  time.sleep(1) 
 +  serial_obj.setDTR(False) 
 +  serial_obj.setRTS(False) 
 +  # wait 
 +  time.sleep(3) 
 +(**Be careful**, the OctoPrint source file uses spaces as indent.) 
 +{{:octoprint:tina2-octoprint-change-py.png}}\\ 
 ====6.Reboot your Raspberry Pi and Connect the printer with its baud rate==== ====6.Reboot your Raspberry Pi and Connect the printer with its baud rate====
 ===a)Reboot your Raspberry Pi, then add tina2 settings to the profile.=== ===a)Reboot your Raspberry Pi, then add tina2 settings to the profile.===
Line 88: Line 104:
  
 ===b)Connect printer with 1000000 baud rate=== ===b)Connect printer with 1000000 baud rate===
----\\+{{:octoprint:tina2-octoprint-connection.png?600|}}\\
  
 ---- ----
Line 97: Line 113:
 Install OctoPrint following the [[https://community.octoprint.org/docs|OctoPrint community documents]].\\ Install OctoPrint following the [[https://community.octoprint.org/docs|OctoPrint community documents]].\\
 \\ \\
-**If you can connect the printer with OctoPrint**, skip to section 3.\\+**If you can connect the printer by baud rate 1000000**, skip to section 4.\\
 \\ \\
 **If you can not connect the printer with OctoPrint**, continue with section 2 to update the serial driver of CH341: **If you can not connect the printer with OctoPrint**, continue with section 2 to update the serial driver of CH341:
Line 107: Line 123:
 ===b)Install your Linux kernel header package=== ===b)Install your Linux kernel header package===
   sudo apt install raspberrypi-kernel-headers   sudo apt install raspberrypi-kernel-headers
-===c)Download the CH340 serial driver source code and unzip it===+===c)Download the CH340/CH341 serial driver source code and unzip it===
   wget http://www.weedo3dprinter.com/lib/exe/fetch.php/firmware/ch341ser_linux-kernel5.4.79.zip   wget http://www.weedo3dprinter.com/lib/exe/fetch.php/firmware/ch341ser_linux-kernel5.4.79.zip
   unzip ch341ser_linux-kernel5.4.79.zip   unzip ch341ser_linux-kernel5.4.79.zip
Line 120: Line 136:
   sudo depmod   sudo depmod
 {{:octoprint:7copy.png?400|}} {{:octoprint:7copy.png?400|}}
-====3.Reboot your Raspberry Pi and Connect the printer with its baud rate====+ 
 +====3.Change OctoPrint source file==== 
 +===a)Test Connection=== 
 +{{:octoprint:tina2-octoprint-test-connected.png?600|}}\\ 
 +**If you can connect the printer**,skip to section 4.\\ 
 +\\ 
 +{{:octoprint:tina2-octoprint-test-connection.png?600|}}\\ 
 +**If you can not connect the printer**, you need to change the serial communication python file.\\ 
 + 
 +===b)change the serial communication python file=== 
 +Open the serial communication python file which is usually placed in the site-packages of the python directory.\\ 
 +  {your python installed directory}/site-packages/octoprint/util/comm.py 
 +Write this code after opening the serial port and save it: 
 +  time.sleep(0.5) 
 +  serial_obj.setDTR(False) 
 +  serial_obj.setRTS(False) 
 +(**Be careful**, the OctoPrint source file uses spaces as indent.) 
 +{{:octoprint:tina2-octoprint-change-py.png?400|}} 
 + 
 +====4.Reboot your Raspberry Pi and connect the printer with its baud rate====
 ===a)Reboot your Raspberry Pi, then add TINA2 settings to the profile.=== ===a)Reboot your Raspberry Pi, then add TINA2 settings to the profile.===
 {{:octoprint:tina2-octoprint-settings_1_.png?400|}} {{:octoprint:tina2-octoprint-settings_1_.png?400|}}
Line 126: Line 161:
 {{:octoprint:tina2-octoprint-settings_3_.png?400|}} {{:octoprint:tina2-octoprint-settings_3_.png?400|}}
  
-===b)Connect printer with 1000000 baud rate===+===b)Connect the printer with 1000000 baud rate=== 
 +{{:octoprint:tina2-octoprint-connection.png?600|}}
  
tina2/octoprint.1675126084.txt.gz · Last modified: 2023/01/31 08:48 by mao