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

Using WiFi and Ethernet networking setting in universal config.g

Scheduled Pinned Locked Moved
Using Duet Controllers
5
6
386
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
    flobler
    last edited by flobler 14 Mar 2021, 14:19

    I am trying to come up with a universal configuration for the Duet 3 Mini 5+ that our users (bear project) can adopt easily without touching config.g themselves initially.

    We are wondering if we can cover both the WiFi and the Ethernet version of the board with a single config.g so we do not need to maintain two configurations separately.

    For that purpose we would enable the use of dynamic IPs via DHCP in config.g by default for both versions which will help with updated configurations, as users would not define a static IP that needs adjusting should we issue a new configuration with a firmware update on GitHub.

    The recommended way to access the board via DWC would be through http://duettest.local/ which would also ensure users can continue to access their board in case their router issues a new IP via DHCP (of course this can be also easily fixed on router side).

    My question is:

    Can we define the network settings to use dynamic IPs for both versions of the board (WiFi and Ethernet) within one config or would this cause issues? This was my idea:

    ; Networking
    M552 P0.0.0.0 S1

    Thanks for helping us out 🙂

    undefined 1 Reply Last reply 14 Mar 2021, 16:08 Reply Quote 0
    • undefined
      jay_s_uk
      last edited by 14 Mar 2021, 15:16

      why don't you use the board type from the object model to identify which board is being used and then load the appropriate gcode?

      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

      1 Reply Last reply Reply Quote 0
      • undefined
        Argo
        last edited by 14 Mar 2021, 15:27

        I can't see a specific object under board type, it's just stating "Duet 3 Mini 5+" not if it's a WiFi or Ethernet ersion.

        But...

        if network.interfaces[0].type == ethernet
        .....

        could work.

        1 Reply Last reply Reply Quote 0
        • undefined
          gaweyo @flobler
          last edited by gaweyo 14 Mar 2021, 16:08

          @flobler said in Using WiFi and Ethernet networking setting in universal config.g:

          Can we define the network settings to use dynamic IPs for both versions of the board (WiFi and Ethernet) within one config or would this cause issues? This was my idea:
          ; Networking
          M552 P0.0.0.0 S1

          don't need P0.0.0.0 just M552 S1 to enable networking with dhcp client. (for both ethernet and wifi)

          as a one-off, and prior to to M552, you need to run M587 for the wifi board to tell it which network to connect to.

          i believe newer firmwares can use run-once.g for this?

          https://forum.duet3d.com/topic/20349/setup-question-wifi?_=1615737607211
          https://duet3d.dozuki.com/Wiki/Macros#Section_runonce_g

          edit: duettest.local would imply you've used old config from factory, should be just duet.local and its set by M550

          edit2: one option would be to use conditional gcode to run M589 to create an access point and allow user to connect to the duet to input wifi stuff wihtout using the serial console or removing sd card to edit files.

          1 Reply Last reply Reply Quote 1
          • undefined
            flobler
            last edited by 14 Mar 2021, 17:30

            @gaweyo

            Thank you!

            The one-off M587 is being covered in our setup guide, so that would be done before uploading the config.g that we supply which includes the network settings.

            You are correct about duet.local, thanks for pointing this out, I will adjust this in my notes.

            So if I have M552 S1 in the network settings, it should not matter if I use a WiFi or Ethernet board?

            That should cover everything we need.

            undefined 1 Reply Last reply 14 Mar 2021, 20:16 Reply Quote 0
            • undefined
              Phaedrux Moderator @flobler
              last edited by 14 Mar 2021, 20:16

              @flobler said in Using WiFi and Ethernet networking setting in universal config.g:

              So if I have M552 S1 in the network settings, it should not matter if I use a WiFi or Ethernet board?

              That should work for any Duet board and DHCP.

              Z-Bot CoreXY Build | Thingiverse Profile

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