• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Connect Ubuntu PC Directly to DUET EtherNet Without a Router?

Scheduled Pinned Locked Moved
Duet Web Control
direct ethernet connection ubuntu
8
37
2.7k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    3mm @SupraGuy
    last edited by 3mm 21 Mar 2021, 16:10

    @SupraGuy said in Connect Ubuntu PC Directly to DUET EtherNet Without a Router?:

    Crossover cable issue has been addressed.

    If I were dealing with a Linux PC, I'd probably use a separate network card and configure DHCP on that interface.

    Google gave me a basic link to configure it here

    This also allows you to use it with a switch for other network functions for things that you might not want connected to the Internet. You can also edit the configuration file to always assign the same IP address by MAC address, allowing you to always be able to find any given host by IP address, when desired.

    My ISP router doesn't support assigning addresses to devices, so I shut off it's DHCP server entirely, and have set up DHCP services on a Linux machine so that I can always find things like my MotionEye cameras, the Duet, and a few other things on the network.

    Edit: The advantage to doing it this way is that you can still take the Duet based printer somewhere else and still easily connect it to most networks.

    @SupraGuy

    Unfortunately, my PC is a laptop, and actually I did try (using ubuntu 14.04 LTS) the DHCP method, but I was suffering the EtherNet dropout problem and DC42 asked that I capture the failure modality using WireShark, which I was unable to cause to work properly with that version of Linux. So I dug out an HP-8640p LapTop onto which I loaded a different version Linux OS & WireShark. However I could not cause that configuration to easily swap between static IP and DHCP, as I would like to be able to connect the LapTop to the InterNet occasionally, and other times only to the printer. Then I broke that OS somehow and I've given up trying to resolve that problem, I'm just going to rebuild the OS with a standard Ubuntu 20.04.10 LTS Linux. The Net Mapping (NetPlan) software is very powerful, but seems a bit sketchy, in my opinion.

    Thanks for your suggestions - 3mm

    There are 10 types of people: Those who understand binary and those who don't.

    1 Reply Last reply Reply Quote 0
    • undefined
      SupraGuy
      last edited by 22 Mar 2021, 05:10

      Seems to me that you should be able to run dhcpd on the wired interface to your laptop, and then use wireless for Internet. Even easier with laptops, usually, since wired connections are less common for places other than your home, I'd think.

      Of course if you don't do wireless, it's still pretty easy to assign a static IP address that your Internet router doesn't hand out.

      Say for example your router is on 192.168.0.1/24 You can assign 192.168.0.2/24 to the eth0 device, and configure the default gateway to 192.168.0.1. If it's not present (you're connected to the printer) then you don't get Internet, which is fine.

      Set up your router to hand out addresses from 192.168.0.10 - 192.168.0.99

      Set up your laptop to hand out addresses from 192.168.0.100-192.168.0.199. Reserve the MAC address for the Duet to 192.168.0.100. Set up the default route to 192.168.0.1, probably DNS servers too. (I'd set up DNS on my Linux machine for the LAN and use the router as a forwarder, or my ISP DNS, but that's more work.)

      If you are plugged into the Duet, it gets it's address (192.168.0.100) and you're good to go. If you're plugged into the router, you have Internet. If something else connects to the network while you're plugged in, it MIGHT get an address from you, or it might get one from the router (Most things will query the router first, particularly if they were plugged into it before) but either way, it will work for Internet access.

      Or... Just use wireless for Internet. I can understand wanting wired though. My internet is faster than my wireless, so everything that needs speed gets a wired connection.

      Lead screw driven printer, powered by Duet 2 Wifi
      MPCNC powered by Duet 2 Wifi
      CoreXY printer driven by Duet 3 6HC
      LowRider CNC powered by Duet 2 Wifi

      undefined 1 Reply Last reply 24 Mar 2021, 04:28 Reply Quote 0
      • undefined
        3mm @droftarts
        last edited by 24 Mar 2021, 03:58

        @droftarts said in Connect Ubuntu PC Directly to DUET EtherNet Without a Router?:

        @3mm Thanks for the information. You didn't update to 2.05.1? The M122 command reports "Used output buffers: 6 of 24 (8 max)", which is high. There were quite a lot of fixes in later RRF 2.x versions for this issue.

        To update, you should be able to upload this file to DWC: https://github.com/Duet3D/RepRapFirmware/releases/download/2.05.1/Duet2Firmware-2.05.1.zip
        Download it as a zip (don't unzip it), and upload it to the Duet via DWC > Settings > General > Upload Files button.

        Note that this WILL update DWC to version 2.x, which is a bit different from 1.x. You can go back to 1.x if you prefer it.

        Ian

        @droftarts (& DC42),

        Ok, I uploaded v2.05 to the printer, and while, the new user interface is taking a bit of time with which myself to become accustomed, the http time-out (EtherNet dropout) problem has vanished, or so it seems. I have not tested every function but the newer version seems to have remedied the problem.

        Thanks for the link and the instruction for installation.

        3mm

        There are 10 types of people: Those who understand binary and those who don't.

        1 Reply Last reply Reply Quote 0
        • undefined
          3mm @SupraGuy
          last edited by 24 Mar 2021, 04:28

          @SupraGuy

          Well I finally have it working. I discarded the xubuntu 20.04, just too buggy and virtually no information that matched the mods from the ubuntu fork. Now, I need to do is make hack together an EtherNet 'switch', a couple of toggle switches that routes the laptop either to my InterNet router or to the printer, OR the printer to the InterNet router! I've got all the configurations working. Essentially very similar to your strategy.

          Thanks for the indepth answer.

          3mm

          There are 10 types of people: Those who understand binary and those who don't.

          undefined 1 Reply Last reply 24 Mar 2021, 06:56 Reply Quote 0
          • undefined
            3mm @3mm
            last edited by 24 Mar 2021, 06:56

            @droftarts,

            Note that this WILL update DWC to version 2.x, which is
            a bit different from 1.x. You can go back to 1.x if you prefer it.

            I clicked the 'Revert' to older user interface button, but where is the revert back button? I'd be interested to try to use that new interface for a time, to see how it works. Need I reinstall the whole FW packaged to regain that user interface?

            Thanks in advance...3mm

            There are 10 types of people: Those who understand binary and those who don't.

            undefined 1 Reply Last reply 24 Mar 2021, 09:12 Reply Quote 0
            • undefined
              droftarts administrators @3mm
              last edited by droftarts 24 Mar 2021, 09:12

              @3mm the 2.05.1 release has an early version of DWC 2, and includes a button to revert to DWC 1 for the current session. Note that DWC 1 is no longer being developed. Later versions of DWC (and you can use up to DWC 3.2.2) do not have the revert button. If you want to use DWC 1, which is still on the SD card, you can:

              1. (Temporary) Appending '/reprap.htm' after the printer IP address/name in your browser address bar (updating to 2.x won't have deleted the old DWC v1.x files, but it's worth updating them too if you haven't already).
              2. (Permanent) Deleting the ‘index.html’ and/or 'index.html.gz' file in the www folder on the SD card.

              Make sure you are using the latest DWC 1.22.6 version; it’s in the 2.05.1 repository.
              Manual for DWC 2 and 3 is here https://duet3d.dozuki.com/Wiki/Duet_Web_Control_v2_and_v3_(DWC)_Manual

              Ian

              Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

              undefined 1 Reply Last reply 25 Mar 2021, 08:11 Reply Quote 1
              • undefined
                3mm @droftarts
                last edited by 25 Mar 2021, 08:11

                @droftarts

                Ok, will do. The screen re-reverted user interface returned after a power-cycle. I getting used to it, at first things seem scattered randomly about, but there is actually a logic strategy in it's implementation. On a 38,1cm/15" LapTop screen the fonts are a bit small, but with the 'dark' its useable. I'll get used to it. I printed a few things tonight using the Linux box and the new version. The user interface is obviously designed for production!! Heh heh. Gotta love it!

                Thanks for everything...3mm

                There are 10 types of people: Those who understand binary and those who don't.

                undefined 1 Reply Last reply 25 Mar 2021, 09:26 Reply Quote 0
                • undefined
                  droftarts administrators @3mm
                  last edited by 25 Mar 2021, 09:26

                  @3mm said in Connect Ubuntu PC Directly to DUET EtherNet Without a Router?:

                  the fonts are a bit small

                  I find the opposite! I usually have my browser zoomed out to 90%. This is on a 15" Retina MacBook Pro. I guess you can always zoom in, though. You can also hid the side bar by clicking the 'three bars' icon at the top of the page, next to the machine name, to give yourself more space.

                  Ian

                  Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                  1 Reply Last reply Reply Quote 0
                  • Schild0rundefined
                    Schild0r
                    last edited by 9 Apr 2021, 14:58

                    I find myself having a related problem:
                    I want to use my Duet 3 in standalone mode but hook it to the network using a direct connection. Not to a Windows or Ubuntu PC but instead to a raspberry pi running raspbian (no, I don't want to run the Duet 3 in SBC mode for reasons...).

                    I already configured the raspi to work as wired router after this tutorial. It even has a DHCP server and I can connect my PC to the pi directly and can access the internet through this without any problems.

                    But when I connect the Duet 3 to it I can not access the DWC by
                    either entering the ip address the Duet gets assigned from the DHCP server on the raspi (which I can read from YAT)
                    or entering the statically assigned IP from the raspberry pi ethernet adapter
                    (there is conflicting information on which one you should use here in the forum and here in the documentation)
                    subnet masks are all matching 255.255.255.0

                    I have the feeling that there are the right people here in this thread that can help me... I don't know what else I should try rn.

                    BTW if I connect the Duet 3 directly to the ISP router I can access DWC no problem entering the IP address I get from M552 in YAT.

                    ------ probably unneccessary information ------
                    At first I set up the raspi using the same subnet as in the above mentioned tutorial 192.168.100.xx (192.168.100.1 for the raspi eth0 and 192.168.100.50-240 as DHCP range with the Duet 3 then being assigned 192.168.100.50) but noticed that 192.168.100.1 actually connected me to the setup page of my ISP router. I then switched to the 192.168.101.xx subnet and connecting my PC to the internet through this still works but I still can't connect to any IP address (neither the .1 of the raspi nor the .50 of the Duet 3 which again I checked in YAT)

                    I also already disabled the DHCP server on the raspi and assigned a static IP address to the Duet 3 but that made no difference
                    ------ end of probably unneccessary information ------

                    dc42undefined 1 Reply Last reply 9 Apr 2021, 15:12 Reply Quote 0
                    • dc42undefined
                      dc42 administrators @Schild0r
                      last edited by 9 Apr 2021, 15:12

                      @schild0r , have you tried using a crossover cable? The Duet Ethernet port doesn't auto-switch, and I don't know whether the RPi Ethernet port does.

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                      Schild0rundefined 2 Replies Last reply 9 Apr 2021, 15:37 Reply Quote 0
                      • Schild0rundefined
                        Schild0r @dc42
                        last edited by 9 Apr 2021, 15:37

                        @dc42 yes I tried patch cables and crossover cables

                        1 Reply Last reply Reply Quote 0
                        • Schild0rundefined
                          Schild0r
                          last edited by 9 Apr 2021, 16:52

                          I noticed that even if the PC can connect to the internet through the direct connection with the raspi, I cannot ping it with another device from my wifi network. I think if I can manage to get this working I will have my solution.

                          stuartofmtundefined 1 Reply Last reply 9 Apr 2021, 17:02 Reply Quote 0
                          • stuartofmtundefined
                            stuartofmt @Schild0r
                            last edited by stuartofmt 4 Sept 2021, 17:03 9 Apr 2021, 17:02

                            @schild0r

                            I happened across this and have wrestled with such problems mightily in the past (usually on a customer site just prior to a presentation).

                            If I missed this suggestion in the thread - I apologies but ....

                            When trying to connect PC-PC(or Duet) 1:1 via an ethernet cable -- its best to make sure than neither has it's wireless connection active. That way - you are trouble shooting only one problem (not a potential combination of interactions).

                            Also - turning off both firewalls until you get it working

                            Hope this helps.

                            Schild0rundefined 1 Reply Last reply 9 Apr 2021, 17:47 Reply Quote 0
                            • Schild0rundefined
                              Schild0r @stuartofmt
                              last edited by 9 Apr 2021, 17:47

                              @stuartofmt said in Connect Ubuntu PC Directly to DUET EtherNet Without a Router?:

                              If I missed this suggestion in the thread - I apologies but ....

                              When trying to connect PC-PC(or Duet) 1:1 via an ethernet cable -- its best to make sure than neither has it's wireless connection active. That way - you are trouble shooting only one problem (not a potential combination of interactions).

                              well the problem is that I am not troubleshooting the wired part of the PC-PC (RPI-Duet) connection but the wireless part of the PC: (:Router:) :RPI-Duet connection (wireless being the colons)

                              Also - turning off both firewalls until you get it working

                              Hope this helps.

                              that did not help either unfortunately

                              stuartofmtundefined 1 Reply Last reply 9 Apr 2021, 18:24 Reply Quote 0
                              • stuartofmtundefined
                                stuartofmt @Schild0r
                                last edited by 9 Apr 2021, 18:24

                                @schild0r said in Connect Ubuntu PC Directly to DUET EtherNet Without a Router?:

                                well the problem is that I am not troubleshooting the wired part of the PC-PC (RPI-Duet) connection but the wireless part of the PC: (:Router:) :RPI-Duet connection (wireless being the colons)

                                Ah - OK. So the dash - between RPI and Duet is wired and the rest is wireless. In other words you want to bridge the ethernet to wlan on the Pi.
                                I've done that in the past but cannot remember all the ins-and-outs but it was somewhat convoluted (dnsmasq, iptables and etc.). From memory - the next time I had to do it - I found a longer ethernet cable and went straight to the router 🙂

                                This looks like it may be of help:

                                https://www.instructables.com/Share-WiFi-With-Ethernet-Port-on-a-Raspberry-Pi/

                                Good Luck.

                                Schild0rundefined 1 Reply Last reply 9 Apr 2021, 20:12 Reply Quote 2
                                • Schild0rundefined
                                  Schild0r @stuartofmt
                                  last edited by 9 Apr 2021, 20:12

                                  @stuartofmt after asking another friend I ended up with a different tutorial that did the same thing I already did only a completely different way (I honestly have no clue what the script does I just copied to the pie, but it keeps the connected devices in the same subnet) and it works. I think your link may have also helped but this was a 3 minute solution.

                                  stuartofmtundefined 1 Reply Last reply 9 Apr 2021, 22:46 Reply Quote 0
                                  • Schild0rundefined
                                    Schild0r @dc42
                                    last edited by 9 Apr 2021, 20:27

                                    @dc42 said in Connect Ubuntu PC Directly to DUET EtherNet Without a Router?:

                                    The Duet Ethernet port doesn't auto-switch, and I don't know whether the RPi Ethernet port does.

                                    FYI: I am using a RPi 4 B and it looks like it does auto switch. It's now working and I can use either cable

                                    1 Reply Last reply Reply Quote 0
                                    • stuartofmtundefined
                                      stuartofmt @Schild0r
                                      last edited by 9 Apr 2021, 22:46

                                      @schild0r said in Connect Ubuntu PC Directly to DUET EtherNet Without a Router?:

                                      I ended up with a different tutorial

                                      I'm always amazed by the number of alternative packages to do "the same thing" along with instructions that sometimes work and sometimes don't. That tutorial takes a slightly different approach but better still WORKED FIRST TIME !!

                                      Congrats and thanks for posting the link.

                                      1 Reply Last reply Reply Quote 1
                                      • First post
                                        Last post
                                      Unless otherwise noted, all forum content is licensed under CC-BY-SA