Hello Everyone,
This post will be fairly long and detailed so I will start with a brief right here:
I am getting no response on Serial from Marlin on a custom board while using Octoprint as a controller.
Now on to more details... sorry if this is a little long winded, trying to cover every base.
I am trying to get Marlin running on an AthenaII 3D printer which is developed at my University. The printer uses a custom board and custom firmware by default but I want to get it working with Marlin. For more details on the printer itself I've provided links to the printer and custom board below:
Printer: https://www.appropedia.org/AthenaII
Board: https://github.com/phidiasllc/athena_board
Default Firmware: https://github.com/mtu-most/franklin
After installing Octoprint on the controlling computer as well as uploading a compiled version of Marlin onto the board, I get no serial response when trying to connect via Octoprint. The N0 M110 N0*125 codes that Octoprint outputs through serial simply timeouts with no response. I've been trying to figure out what is going on but have made no progress. I've detailed the setup and steps I've done below. Maybe someone can see something I am missing? or knows what I am doing wrong?
The following are some relevant specs for the board (Let me know if you need more):
Printer Board:
Controlling Computer:
These boards are directly connected to each other daughter-board style. I control the Orange Pi computer with SSH. The Octoprint server on the Orange Pi works and can also be accessed by my desktop.
I am compiling Marlin using Arduino 1.8.10 on my desktop and am uploading it via the Orange Pi using avrdude manually through the SPI bus on the AVR. This is how I am using it (athenapi is a linuxgpio SPI programmer):
I am compiling Marlin as through it is being uploaded onto a Sanguinolulu with a 1284P just to get the serial working. I didn't change the configuration other than the board. None of the steppers or other components are connected. It is just the Orange Pi and the ATmega1284P with its circuitry. I don't get any compilation errors other than this:
From what I have seen, this isn't a huge error as long as it completes compilation and everything should work fine. After transferring the .hex file, uploading goes fine otherwise. AVRdude completes with no errors. The issue starts when I try to send anything to the board through the serial lines. Neither Octoprint nor Minicom get any response from the board. I've tried a series of things to diagnose and fix this issue.
I've changed the Serial Port on Marlin between 0 and 1. According the the fastio headers it should be on serial 0.
I've tried different Marlin versions: 1.1.x, 1.1.x-bugfix, 2.1-dev, 2.0.x-bugfig; with no difference.
I've tried different baud rates on both Marlin and Octoprint. Including having Octoprint sweep through baud rates.
I've checked that Octoprint can send and receive by shorting Rx and Tx. It does, however I can't seem to get it to work when the ATmega1284P is connected...
I've tried checking that other Arduino programs work, they do.
I've uploaded an Arduino serial echo server to see if serial was broken. It appears to work, however minicom gives me the wrong values back... but that might be my minicom setup.
So from what I've tried, it seems there might be some hardware issue with the UART/Serial but the previous firmware used serial as well and had no issues with communicating. Is Marlin more picky about how UART operates? I did have to replace the ATmega1284P once when I fried it on a short but I had no issues with it after the replacement. Maybe its possible I damaged something during my debugging? But I was having this issue before removing the electronics from my printer as well.
I can't seem to wrap my head around why this isn't working. I feel like I might be missing something really simple or obvious. Does anyone have any clue what might be going on?
Thanks in advance,
Jacob 'The JLo'
This post will be fairly long and detailed so I will start with a brief right here:
I am getting no response on Serial from Marlin on a custom board while using Octoprint as a controller.
Now on to more details... sorry if this is a little long winded, trying to cover every base.
I am trying to get Marlin running on an AthenaII 3D printer which is developed at my University. The printer uses a custom board and custom firmware by default but I want to get it working with Marlin. For more details on the printer itself I've provided links to the printer and custom board below:
Printer: https://www.appropedia.org/AthenaII
Board: https://github.com/phidiasllc/athena_board
Default Firmware: https://github.com/mtu-most/franklin
After installing Octoprint on the controlling computer as well as uploading a compiled version of Marlin onto the board, I get no serial response when trying to connect via Octoprint. The N0 M110 N0*125 codes that Octoprint outputs through serial simply timeouts with no response. I've been trying to figure out what is going on but have made no progress. I've detailed the setup and steps I've done below. Maybe someone can see something I am missing? or knows what I am doing wrong?
The following are some relevant specs for the board (Let me know if you need more):
Printer Board:
Processor : ATmega1284P Frequency : 16MHz Crystal Oscillator Fuse-bits : e=0xFF,L=0xF7, H=0xD9 Serial Port: Rx0/Tx0 (Pins 8/9)
Controlling Computer:
Model : Orange Pi Zero OS : Armbian Controller: Octoprint
These boards are directly connected to each other daughter-board style. I control the Orange Pi computer with SSH. The Octoprint server on the Orange Pi works and can also be accessed by my desktop.
I am compiling Marlin using Arduino 1.8.10 on my desktop and am uploading it via the Orange Pi using avrdude manually through the SPI bus on the AVR. This is how I am using it (athenapi is a linuxgpio SPI programmer):
avrdude -p atmega1284p -c athenapi -U flash:w:Marlin.ino.hex
I am compiling Marlin as through it is being uploaded onto a Sanguinolulu with a 1284P just to get the serial working. I didn't change the configuration other than the board. None of the steppers or other components are connected. It is just the Orange Pi and the ATmega1284P with its circuitry. I don't get any compilation errors other than this:
Error while detecting libraries included by /tmp/arduino_build_437632/sketch/temperature.cpp
From what I have seen, this isn't a huge error as long as it completes compilation and everything should work fine. After transferring the .hex file, uploading goes fine otherwise. AVRdude completes with no errors. The issue starts when I try to send anything to the board through the serial lines. Neither Octoprint nor Minicom get any response from the board. I've tried a series of things to diagnose and fix this issue.
I've changed the Serial Port on Marlin between 0 and 1. According the the fastio headers it should be on serial 0.
I've tried different Marlin versions: 1.1.x, 1.1.x-bugfix, 2.1-dev, 2.0.x-bugfig; with no difference.
I've tried different baud rates on both Marlin and Octoprint. Including having Octoprint sweep through baud rates.
I've checked that Octoprint can send and receive by shorting Rx and Tx. It does, however I can't seem to get it to work when the ATmega1284P is connected...
I've tried checking that other Arduino programs work, they do.
I've uploaded an Arduino serial echo server to see if serial was broken. It appears to work, however minicom gives me the wrong values back... but that might be my minicom setup.
So from what I've tried, it seems there might be some hardware issue with the UART/Serial but the previous firmware used serial as well and had no issues with communicating. Is Marlin more picky about how UART operates? I did have to replace the ATmega1284P once when I fried it on a short but I had no issues with it after the replacement. Maybe its possible I damaged something during my debugging? But I was having this issue before removing the electronics from my printer as well.
I can't seem to wrap my head around why this isn't working. I feel like I might be missing something really simple or obvious. Does anyone have any clue what might be going on?
Thanks in advance,
Jacob 'The JLo'