Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Teensy 4.1 Ethernet support #19801

Merged
merged 29 commits into from
Oct 20, 2020
Merged

Add Teensy 4.1 Ethernet support #19801

merged 29 commits into from
Oct 20, 2020

Conversation

bilsef
Copy link
Contributor

@bilsef bilsef commented Oct 18, 2020

Description

Add generic M552, M553, M554 to set Ethernet parameters similar to other 3D printer firmware. Parameters can be saved to EEPROM.

Adds Telnet server for Teensy 4.1 built-in Ethernet, which behaves like second serial port.

Benefits

Added functionality

bilsef added 13 commits August 22, 2020 22:11
Initial commit with ethernet telnet support using Teensy 4.1 built in ethernet controller.
General cleanup.
Fix SERIAL_BOTH.
Fix bug where attempts to write to telnetClient when no client is connected would cause a hang.
Echos MAC Address with Ethernet settings
@ellensp
Copy link
Contributor

ellensp commented Oct 19, 2020

I don't think this should be called ETHERNET_SUPPORT
This is specific to the Teensy 4.1 so needs a more specific name.
Otherwise future users will enable this expecting their non Teensy 4.1 Ethernet to work.

@rhapsodyv
Copy link
Member

I don't think this should be called ETHERNET_SUPPORT
This is specific to the Teensy 4.1 so needs a more specific name.
Otherwise future users will enable this expecting their non Teensy 4.1 Ethernet to work.

Personally I prefer the generic name, plus some sanity checks to warn the user that it is only supported by X.
It’s that... Ethernet could be a very common thing (not that I think it will, but can).

@ellensp
Copy link
Contributor

ellensp commented Oct 19, 2020

This implementation modifies serial.h, most Ethernet wouldn't need to do this...

@Gamester17
Copy link
Contributor

FYI, this type of implementation will likely not quite specific to only Teensy 4.1 in the future as should be same in all that use an NXP i.MX RT series MCU, or at least all i.MX RT series MCUs that have 10/100Mbps Ethernet (i.MX RT1060, i.MX RT1061, i.MX RT1062, i.MX RT1064, i.MX RT1050 and i.MX RT1020):

https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus:IMX-RT-SERIES

@ellensp
Copy link
Contributor

ellensp commented Oct 19, 2020

Really? other MPU from the same series use the same ethernet, who would have though it.. What about all the other MPU's which vastly out number this one type?

Citing two (1 and a wish-list) examples as your case to make it global, is not working for me.

@thinkyhead
Copy link
Member

I've made some adjustments, the main one being that instead of enabling ETHERNET_SUPPORT you should just set SERIAL_PORT_2 to -2, since this implementation was already taking over the role of the second serial port.

Fix loading ethernet settings from EEPROM.
Remove trailing : when printing MAC Address.
Don't print bogus MAC Address when ethernet is disabled.
@bilsef
Copy link
Contributor Author

bilsef commented Oct 19, 2020

@thinkyhead, I tested your changes. Everything seems to be working except reading the parameters from EEPROM. It gives this message:
Error:Field esteppers mismatch.
I pushed a fix.

@thinkyhead thinkyhead merged commit 9baa944 into MarlinFirmware:bugfix-2.0.x Oct 20, 2020
thinkyhead pushed a commit to thinkyhead/Marlin that referenced this pull request Oct 21, 2020
sebsx pushed a commit to sebsx/Marlin that referenced this pull request Oct 25, 2020
Speaka pushed a commit to Speaka/Marlin that referenced this pull request Nov 2, 2020
vgadreau pushed a commit to vgadreau/Marlin that referenced this pull request Dec 9, 2020
tharts pushed a commit to tharts/Marlin that referenced this pull request Jan 6, 2021
kpishere pushed a commit to kpishere/Marlin that referenced this pull request Feb 19, 2021
W4tel-BiDi pushed a commit to W4tel-BiDi/Marlin that referenced this pull request Apr 5, 2021
thinkyhead pushed a commit to thinkyhead/Marlin that referenced this pull request Apr 28, 2021
thinkyhead pushed a commit to thinkyhead/Marlin that referenced this pull request Apr 29, 2021
thinkyhead pushed a commit that referenced this pull request Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants