Close

Marlin...sort of.

A project log for Lerdge 3d Printer Mainboard Hacking

Breaking the encryption on the Lerdge series mainboards so I can try porting Marlin 2.0 to it.

jc-nelsonJ.C. Nelson 12/24/2018 at 02:081 Comment

Today, while taking a break, I sat down and studied why it was that something like simple serial communication didn't work. I could bit-bang serial, sure, but the USARTs are present and hooked up for a reason.

I began studying how the firmware initialized the USART (which it does while upgrading the bootloader) and noticed that much of the time, the USB_OTG init was used.

Which would not leave those pins free for Serial.

So I made a few changes to the pins map and tried again, and this time, got a beautiful spew, so long as I keep the baud rate slow. That may be a side effect of my FTDI clone, or maybe it's some initialization issue with the serial port, but the very next thing I did was set Marlin's serial port to 1, baud rate to 9600, and compiled. After booting it attached to the adapter...

--- Miniterm on /dev/cu.usbserial-A4012RZG  9600,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
start
echo: External Reset
Marlin bugfix-2.0.x

echo: Last Updated: 2018-01-20 | Author: (xC0000005, Lerdge-X Config)
echo:Compiled: Dec 23 2018
echo: Free Memory: 51139  PlannerBufferBytes: 1344
echo:Hardcoded Default Settings Loaded
echo:  G21    ; Units in mm (mm)

echo:Filament settings: Disabled
echo:  M200 D3.00
echo:  M200 D0
echo:Steps per unit:
echo:  M92 X80.00 Y80.00 Z4000.00 E500.00
echo:Maximum feedrates (units/s):
echo:  M203 X300.00 Y300.00 Z5.00 E25.00
echo:Maximum Acceleration (units/s2):
echo:  M201 X3000.00 Y3000.00 Z100.00 E10000.00
echo:Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
echo:  M204 P3000.00 R3000.00 T3000.00
echo:Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> X<max_x_jerk> Y<max_y_jerk> Z<max_z_jerk> E<max_e_jerk>
echo:  M205 B20000.00 S0.00 T0.00 X10.00 Y10.00 Z0.30 E5.00
echo:Home offset:
echo:  M206 X0.00 Y0.00 Z0.00
echo:PID settings:
echo:  M301 P22.20 I1.08 D114.00
echo:SD init fail

This is a thing of beauty. It's sitting on my table, blinking. It doesn't receive anything. I know or a fact the purple pin (lower left, if you're holding it so the USB adapter is facing upwards) is the TX. Nothing else works. Connecting to the right pin (the upper right, which is where a normal ESP2866 module would have RX) doesn't let me send anything. There's something missing - I'm just not sure what, yet.

Discussions

cmshelton2010 wrote 12/25/2018 at 00:11 point

Now You did all that while taking a break!

  Are you sure? yes | no