I used the sd card method and i checked after flashing that the file is renamed to FIRMWARE.CUR
Okay, I wanted to try your process on the Mainsail rPi OS version on an rPi4
Now, when I do `sudo nano cmdline.txtā, I get:
No console=serial0,115200
at the start (or anywhere).
There is ttyAMA0
, on boot up, however:
Is this what youāre seeing?
Yes this is exactly what i get
If thatās the case, why did you put down that you did the process:
- Remove
console=serial0,115200
in/boot/cmdline.txt
- Add
dtoverlay=pi3-miniuart-bt
at the end of file/boot/config.txt
- Modify the configuration of
[mcu]
inprinter.cfg
toserial: /dev/ttyAMA0
and enablerestart_method: command
by SSH- added
enable_uart=1
in/boot/config.txt
to get /dev/ttyAMA0
?
Can you put a jumper between Pins 8 & 10 (UART0-TX and UART0-RX) of your Raspberry Pi and see if you can communicate between them with minicom?
To install:
sudo apt install minicom
To run (in this instance):
minicom -D /dev/ttyAMA0
That should show if the rPiās serial port is working.
After i run minicom -D /dev/ttyAMA0
it shows
Welcome to minicom 2.8
OPTIONS: I18n
Port /dev/ttyAMA0, 08:03:04
Press CTRL-A Z for help on special keys
but i cant type anything in minicom
Okay, letās review:
-
Youāre running the Mainsail OS on your Raspberry Pi 4B. Now, When I do this, I am running without doing any of the changes you outlined above.
-
I have my Raspberry Pi Pins 8 & 10 jumpered like this:
- Iām running minicom using the statement
minicom -D /dev/ttyAMA0
and when I enter text into the communications program, I see it echoed back like:
Are we talking about the same situation - is there anything different?
If you are set up the same way I am, then the serial port on your Raspberry Pi isnāt working.
When im in minicom and i press STRG + A then Z and then E i get the same echo back like you have.
What is āSTRGā?
STRG is CTRL
Okay, let me find an Octopus Pro (I know I have at least one around), program it as you have and then wire it the way you have.
It will take a while - but I should have it done by the end of today.
When im in minicom and i press STRG + A then Z and then E i get the same echo back like you have.
Thatās enabling āechoā mode in minicom. NOT echoing back the OUTPUT signal.
With the echo you have turned on, you could literally be sending the data to /dev/null and it would āechoā it back to youā¦
Which is NOT the test that @mykepredko wanted you to do.
He wanted you to test the electrical pathway through to the transmit pin on the board, and the return path from the receive pin back. Itās why he sent you the photo showing the loop back connection on the board.
So itās something with my rPi?
Can you show how youāre testing the rPi?
As @BevanWeiss asked, do you have a jumper like I have on my rPi?
Okay, Hereās what I did to test the serial connection.
-
I started with an Octopus Pro V1.01 - sorry, I donāt have an Octopus Pro V1.1 but based on your rPi problems, it shouldnāt matter.
-
I am using a Raspberry Pi 4B that was loaded with the Mainsail OS from the Raspberry Pi Imager. Before going forward, I did all the updates for Klipper/Moonraker/Mainsail/etc. from the Mainsail Web Page. I did NOT access or modify any files from SSH.
-
I checked to see if
/dev/ttyAMA0
still exists (it does) and checked the serial loop back connection with minicom - things are still working.
-
I formatted a 4GB Micro SD Card using āSD Card Formatterā as specified by BTT in the user manual.
-
I created a Klipper image for USART2 on the Octopus Pro V1.01 using the MCU thatās on the board. I checked the settings against the user manual and the schematics:
-
I build the firmware and, using Notepad++, loaded klipper.bin onto my PC, renamed it to
firmware.bin
. Before programming, there was a flashing LED on the Octopus Pro and afterward it was constantly on. As well, the file on the SD Card changed toFirware.CUR
as expected. -
Using the pinout information in the user manual, I made up a 1x5 terminal block for connecting the five left pins of J26, the USART2 header:
-
On the other end of the cable, I put the three bottom ones (TX2, RX2, & GND) into a 1x3 connector and the two power lines to a separate 1x2 connector. Iāll discuss why below.
-
Next, I connected the two devices together - the bottom right three pins of the Octopus Pro J26 (USART2) connector, as discussed above to pins 6 (GND), 8 (USART0-TX) and 10 (USART0-RX) of the rPi. Note that the five pins connected to ā5Vā on the Octopus Pro are not connected. The rPi is connected to a Raspberry Pi Power Supply.
-
Moment of truth. To test the connection, I took my basic test
printer.cfg
(which tests the connection as well as display the MCU temperatures and allows me to access the LED built into the Octopus Pro), set the serial connection for/dev/ttyAMA0
:
[include mainsail.cfg]
[virtual_sdcard]
path: /home/biqu/printer_data/gcodes
on_error_gcode: CANCEL_PRINT
[mcu]
serial: /dev/ttyAMA0
[temperature_sensor mcu_temp]
sensor_type: temperature_mcu
[temperature_sensor rpi]
sensor_type: temperature_host
min_temp: 10
max_temp: 100
[printer]
kinematics: none
max_velocity: 300
max_accel: 3000
[led work_led]
red_pin: PA13
#green_pin:
#blue_pin:
#white_pin:
# The pin controlling the given LED color. At least one of the above
# parameters must be provided.
cycle_time: 0.010
# The amount of time (in seconds) per PWM cycle. It is recommended
# this be 10 milliseconds or greater when using software based PWM.
# The default is 0.010 seconds.
hardware_pwm: False
# Enable this to use hardware PWM instead of software PWM. When
# using hardware PWM the actual cycle time is constrained by the
# implementation and may be significantly different than the
# requested cycle_time. The default is False.
initial_RED: 0.05
#initial_GREEN: 0.00
#initial_BLUE: 0.0
#initial_WHITE: 0.0
# Sets the initial LED color. Each value should be between 0.0 and
# 1.0. The default for each color is 0.
and clicked on SAVE & RESTART
:
As one last point, I recommend that you power your rPi from your Octopus board. This is nicely set up by BTT at the USART2 connector (and its 5V Buck power supply can handle the current) - by connecting the 1x2 connector that was left over:
This is a much simpler and more elegant way to wire your Raspberry Pi to your Octopus Pro.
Iām going to suggest that you follow the steps Iāve outlined above; start with a freshly programmed SD Card for your Raspberry Pi and proceed from there. Iām recommending that you start from the beginning as there is some confusion on how youāve set up your Raspberry Pi - If you follow my steps above and there are any problems, we should be able to figure them out. If you deviate from the steps outlined above, document them for reporting back.
I would suggest that you create a new loopback cable and a new five conductor Octopus Pro to rPi cable as Iāve shown above. Itās always a good idea to colour code your wires to make them easier to keep track of.
Note that Iām working with an Octopus Pro V1.01 and not a V1.1 like you are. There should be no difference other than how you configure Klipper for it.
Based on what youāve said, if there is a problem with the Raspberry Piās USART2 port, then it will show up in step 3.
Regardless, if at any point you get a different result from me then stop. Get a copy of the SSH terminal window, take a picture of your set up with the requirement that you provide as MUCH information as possible.
Letās see how things work out for you.
At step 3 i still get no echo back.
You started from scratch and you made up a loopback cable like mine?
Then I guess your rPi UART0 is bad.
Your options are:
- Get another rPi
- Enable UART5 (Pins 32/33)
- Connect with USB
I will just upgrade to a rPi 5 thanks for helping out
It is still possible that the serial port does work. But that you just have it configured āwrongā. Iām not the PI expert though, so I canāt say how to configure it correctly for serial port mode.
If you have an overlay active that is re-configuring those pins as GPIO (instead of USART)⦠that would do it⦠or if youāve done other configuration which is resulting in the port already being allocated to something else⦠I had issues with brltty taking the klipper usb serial port under a recent Ubuntu install.
Lots of possible issues unfortunately, of which one is an electrical failure of the PI processor itself. If youāve done weird things like hook these pins directly up to +5V / GND signals⦠failure is more likely, but only youād know about thatā¦
A methodical and systematic process of diagnosing is best though.
Try to confirm at the highest level first (i.e. that you can open the expected port), then that the expected output changes when you send something to that port⦠then when you loop it back that you can receive back what you have sent out⦠and then you can connect it to the other endā¦
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.