Skip to content

Script and wire to reset a BTT Octopus via a Raspberry PI GPIO pin and flash klipper on it.

License

Notifications You must be signed in to change notification settings

gabtremblay/octopus_software_dfu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

octopus_software_dfu

Script and wire to reset a BTT Octopus via the Raspberry PI GPIO pins and flash klipper on it

Prerequisites

  • You should already be able to compile klipper on your raspberry pi and use "make flash FLASH_DEVICE=..." to flash your octopus via USB while the device is in DFU mode.

Required parts

  • 3x wires
  • 5x female dupont connector
  • 1x schotky diode such as 1N5817
  • 1x capacitor roughly between 1 µF to 100 µF (altough you could probably get away with 0.1 uF)
  • Heat shrink tubing or tape

Create a two sided wire

  • Use two dupont connector to make a long enough straight cable to reach between your raspberry pi gpio pins and the TFT header on the BTT Octopus with a female connector on both end.

Creating the reset wire

We're using the TFT reset line on the BTT Octopus to reset the board. This pin needs to be pulled-down. In order to avoid driving the NRST pin high we use a low forward voltage schotky diode.

  • Create the reset wire like that

  • You can tiddy it up with some heat shrink tubing or tape

Connecting the wires to the octopus

  • Connect the BOOT0 left pin to your straight cable

  • On the two-ended wire side, connect the reset wire (Long) To TFT_RST and the short one to TFT_GND)

  • RST is pin 1, GND is pin 4 on the TFT connector

Connect both wires to the raspberry py

  • Connect the BOOT0 cable to the raspberry pi GPIO26 (Board pin 37)
  • Connect the reset wire to the raspberry pi GPIO19 (Board pin 35)

Using the script

  • Copy flash_octopus.sh to your klipper directory

  • run chmod 755 flash_octopus.sh

  • run make menuconfig

  • run make

  • make sure your octopus is connected via usb to your raspberry pi

  • run ./flash_octopus.sh

  • If sucessful, it should look like this. (All warnings are generated by the klipper make file)

pi@Hackpi:~/klipper $ ./flash_octopus.sh
Octopus board GPIO Flasher
Trying to reboot in DFU Mode
Found DFU Device 0483:df11
Invoking klipper dfu flash
  Flashing out/klipper.bin to 0483:df11
sudo dfu-util -d ,0483:df11 -R -a 0 -s 0x8008000:leave -D out/klipper.bin

dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash  "
Downloading to address = 0x08008000, size = 26396
Download        [=========================] 100%        26396 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state
dfu-util: can't detach
Resetting USB to switch back to runtime mode
Rebooting to klipper, please wait
Flashing complete

About

Script and wire to reset a BTT Octopus via a Raspberry PI GPIO pin and flash klipper on it.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages