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

Replace the Wifi or Ethernet module by the ESP-13?

Scheduled Pinned Locked Moved
Duet Hardware and wiring
4
25
1.5k
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
    Kanyo @A Former User
    last edited by 16 Sept 2019, 13:38

    @bearer
    The original ESP8266 wifiserver doesn't seem to work well with 2MB flash..
    (https://github.com/dc42/DuetWiFiServer >> https://reprap.org/forum/read.php?2,582444,582444#msg-582444)
    and ESP-07 has only 1MB flash, but ESP-07S seems to have 4MB
    ESP-WROOM-02 with 2MB flash may not be good idea 😞
    At least,it looks physically possible without magical smoke or some thing, thanks to the powerful onboard flash of the reprap firmware.
    thanks for infomation.

    1 Reply Last reply Reply Quote 0
    • ?
      A Former User
      last edited by A Former User 16 Sept 2019, 13:45

      Yeah, flash size was the primary concern.

      You could perhaps get the Ethernet version and use a Raspberry Pi as a wireless bridge now, and at some point you could be able to remove the Ethernet and connect the Pi to the Duet 2 Ethernet in the same way as the Duet 3 if/when such a firmware is made for the Duet 2.

      (Asuming you can use the Raspberry Pi or similar single board computer)

      undefined 1 Reply Last reply 16 Sept 2019, 17:29 Reply Quote 0
      • undefined
        Danal
        last edited by 16 Sept 2019, 15:56

        I wouldn't mess with the board. I'd get an ethernet Duet, and plug a Japan certified device with a cable a few centimeters long. There are a ton of devices out there specifically designed for the task of making an Ether client look like a Wireless client.

        You do NOT want a Bridge or AP... it is Ok if it has those "modes"... you want a device that is (or set to the mode of) being a client.

        Delta / Kossel printer fanatic

        undefined 1 Reply Last reply 16 Sept 2019, 17:37 Reply Quote 0
        • undefined
          Kanyo @A Former User
          last edited by 16 Sept 2019, 17:29

          @bearer
          Wow Duet 3? You say remove the ethernet module and connect the Pi to duet board directly?

          ? 1 Reply Last reply 16 Sept 2019, 17:34 Reply Quote 0
          • ?
            A Former User @Kanyo
            last edited by 16 Sept 2019, 17:34

            @Kanyo said in Replace the Wifi or Ethernet module by the ESP-13?:

            You say remove the ethernet module and connect the Pi to duet board directly?

            ref this thread and this reply from dc42 https://forum.duet3d.com/post/106138

            1 Reply Last reply Reply Quote 0
            • undefined
              Kanyo @Danal
              last edited by 16 Sept 2019, 17:37

              @Danal
              before posting here I was thinking about plug a Wifi Bridge.
              A device acting as a client may different from a bridge or AP,I have never seen such a thing
              For example, what kind products can be used?

              1 Reply Last reply Reply Quote 0
              • ?
                A Former User
                last edited by 16 Sept 2019, 17:46

                Technically it should be both a wifi client and then a bridge between the wifi client and the ethernet port, which is how it would be done with a board like a Raspberry pi.

                undefined 1 Reply Last reply 16 Sept 2019, 18:49 Reply Quote 1
                • undefined
                  Kanyo @A Former User
                  last edited by 16 Sept 2019, 18:49

                  Yeah I know, such like WRH-583BK2-S
                  or as you said RPi can bridge between the wifi client and the ethernet port, right?
                  I just wondering what kind of network device can just being the client Instead of connected ethernet ,not bridge or AP.

                  1 Reply Last reply Reply Quote 0
                  • ?
                    A Former User
                    last edited by 16 Sept 2019, 19:01

                    Admittedly I haven't tried it with the RPi since way back when Wifi was a USB stick, and being able to run as an actual bridged connection may depend on the WiFi chipset in use; but in any case it should be possible to do a routed connection and forward the necessary ports.

                    (I'll see if I can find time later this week to borrow the Duet 3's RPi 3B and try bridging it to the Duet 2 Maestro, but busy week)

                    ? 1 Reply Last reply 20 Sept 2019, 06:29 Reply Quote 0
                    • undefined
                      dc42 administrators @A Former User
                      last edited by dc42 16 Sept 2019, 21:20

                      @bearer said in Replace the Wifi or Ethernet module by the ESP-13?:

                      You can upload the DuetWifiServer firmware to the SD card and flash it from the serial(usb) console, so thats not a problem if 2MB flash is enough. I've only previously seen dc42 reccomending using ESP-07S for external antenna, and that is the 4MB version of ESP-07 but not sure if 4MB is a requirement.

                      Originally the web pages were held in flash memory on the ESP module, which is why there was a DuetWiFiServer.bin file and you needed 4Mb flash memory. Now that the web page files are served from SD card, even 1Mb ought to be enough. But I've never tried uploading DuetWiFiServer to a module with less than 4Mb of flash.

                      The reason we specify the ESP-07S not the ESP-07 is that only the S version has been FCC certified.

                      The WROOM module is slightly wider than the ESP-12S. We looked at it a while back before the ESP-07S became available, and we concluded that it didn't quite fit in the space available.

                      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

                      undefined 1 Reply Last reply 16 Sept 2019, 22:52 Reply Quote 1
                      • undefined
                        Danal
                        last edited by Danal 16 Sept 2019, 22:12

                        Probably my odd phrasing.

                        It is quite fair to say that what you need is a device acting as both a client and a bridge to the Ether. My real point was: Not an AP.

                        And... WRH-583BK2-S is an example of what you DON'T want. This device 'expects' internet on an Ether port, and routes it to a WiFi segment where this device is the AP for that segment. That is the "wrong direction" for what you are trying to accomplish.

                        Delta / Kossel printer fanatic

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          Danal
                          last edited by 16 Sept 2019, 22:36

                          And... to my best reading of a translation of the user manual for the WRH-583BK2-S, it looks like it actually WILL do what you need.

                          See "child machine mode" on page 47 of the full manual here

                          Delta / Kossel printer fanatic

                          undefined 1 Reply Last reply 16 Sept 2019, 23:01 Reply Quote 0
                          • undefined
                            Kanyo @dc42
                            last edited by 16 Sept 2019, 22:52

                            @dc42 So that's it.
                            Thanks for the great effort, may be try to make a breakout board someday.
                            I feel sad that WROOM module was not chosen, no help for a larger footprint.
                            The big reason I want to replace a Wifi module is mDNS protocol.
                            Are there any plans to implement the mDNS protocol on the Duet2Ethernet?

                            undefined undefined 2 Replies Last reply 17 Sept 2019, 04:26 Reply Quote 0
                            • undefined
                              Kanyo @Danal
                              last edited by 16 Sept 2019, 23:01

                              @Danal
                              Sorry for the confusion on the Japanese page, thanks for looking seriously.
                              May be this picture is a good explanation of what this device can do.
                              322a7492-5656-46e7-b593-74175219f444-image.png

                              undefined 1 Reply Last reply 17 Sept 2019, 04:23 Reply Quote 0
                              • undefined
                                Danal @Kanyo
                                last edited by Danal 17 Sept 2019, 04:23

                                @Kanyo said in Replace the Wifi or Ethernet module by the ESP-13?:

                                @Danal
                                Sorry for the confusion on the Japanese page, thanks for looking seriously.

                                Yep, looks like it WILL do it. Nifty little gadget.

                                Delta / Kossel printer fanatic

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  Danal @Kanyo
                                  last edited by 17 Sept 2019, 04:26

                                  @Kanyo said in Replace the Wifi or Ethernet module by the ESP-13?:

                                  The big reason I want to replace a Wifi module is mDNS protocol.
                                  Are there any plans to implement the mDNS protocol on the Duet2Ethernet?

                                  That's a pretty good reason to make the "WiFi Client to Ether" box a Raspberry Pi. Setting it up as the client/bridge is straightforward (tons of examples) and mDNS is also relatively easy. Being *nix literate at the command line is helpful, but not essential, due to the many examples.

                                  Delta / Kossel printer fanatic

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    dc42 administrators @Kanyo
                                    last edited by dc42 17 Sept 2019, 09:27

                                    @Kanyo said in Replace the Wifi or Ethernet module by the ESP-13?:

                                    I feel sad that WROOM module was not chosen, no help for a larger footprint.

                                    When we designed the Duet WiFi, there was only one WROOM module and no external antenna option; whereas there were several ESP modules, some of which were certified. Since that time there have been two new WROOM modules, both certified, one with external antenna. To change to it would have required moving the SD card slot, which would have been incompatible with existing enclosure designs, and would in turn have required moving the mounting point for the Ethernet daughter board - so a new version of the daughter board would have been needed.

                                    Are there any plans to implement the mDNS protocol on the Duet2Ethernet?

                                    Yes.

                                    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

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      Kanyo
                                      last edited by 17 Sept 2019, 14:28

                                      I expect so much.

                                      1 Reply Last reply Reply Quote 0
                                      • ?
                                        A Former User @A Former User
                                        last edited by A Former User 20 Sept 2019, 06:29

                                        @bearer said in Replace the Wifi or Ethernet module by the ESP-13?:

                                        (I'll see if I can find time later this week to borrow the Duet 3's RPi 3B and try bridging it to the Duet 2 Maestro, but busy week)

                                        @Kanyo FYI this works with my RPi 3B+ https://willhaley.com/blog/raspberry-pi-wifi-ethernet-bridge/

                                        I tested Option 1 and it works just fine with my Duet 2 Maestro. The Pi gets an IP address of its own so you can still administrate it from the same network. The Duet 2 Maestro even gets the same (non reserved) DHCP lease through the bridge and mDNS works with the older firmware, but the Pi could probably be made to announce on the Duet's behalf if needed.

                                        Edit: I'll add the whole thing here, with warnings and all; in case the link dies in the future..

                                        Note: This script drastically changes the networking configuration and your Pi may end up in an unreliable networking state if anything goes wrong

                                        #!/usr/bin/env bash
                                        set -e
                                        [ $EUID -ne 0 ] && echo "run as root" >&2 && exit 1
                                        # Update these variables as needed
                                        ssid="the ssid"
                                        psk="the password"
                                        country="US"
                                        # You should not need to update anything below this line
                                        apt update && apt install parprouted dhcp-helper
                                        systemctl stop dhcp-helper
                                        systemctl enable dhcp-helper
                                        systemctl mask networking.service
                                        systemctl mask dhcpcd.service
                                        if [ -d /etc/network/interfaces ];
                                        then
                                        mv /etc/network/interfaces /etc/network/interfaces.bak
                                        fi
                                        sed -i '1i resolvconf=NO' /etc/resolvconf.conf
                                        systemctl enable systemd-networkd.service
                                        systemctl enable systemd-resolved.service
                                        ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
                                        cat > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf <<EOF
                                        ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
                                        update_config=1
                                        country=${country}
                                        network={
                                        ssid="${ssid}"
                                        psk="${psk}"
                                        }
                                        EOF
                                        chmod 600 /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
                                        systemctl disable wpa_supplicant.service
                                        systemctl enable wpa_supplicant@wlan0.service
                                        cat > /etc/systemd/network/08-wlan0.network <<EOF
                                        [Match]
                                        Name=wlan0
                                        [Network]
                                        DHCP=yes
                                        IPForward=yes
                                        EOF
                                        cat > /etc/default/dhcp-helper <<EOF
                                        DHCPHELPER_OPTS="-b wlan0"
                                        EOF
                                        cat <<'EOF' >/etc/avahi/avahi-daemon.conf
                                        [server]
                                        use-ipv4=yes
                                        use-ipv6=yes
                                        ratelimit-interval-usec=1000000
                                        ratelimit-burst=1000
                                        [wide-area]
                                        enable-wide-area=yes
                                        [publish]
                                        publish-hinfo=no
                                        publish-workstation=no
                                        [reflector]
                                        enable-reflector=yes
                                        [rlimits]
                                        EOF
                                        cat <<'EOF' >/etc/systemd/system/parprouted.service
                                        [Unit]
                                        Description=proxy arp routing service
                                        Documentation=https://raspberrypi.stackexchange.com/q/88954/79866
                                        [Service]
                                        Type=forking
                                        # Restart until wlan0 gained carrier
                                        Restart=on-failure
                                        RestartSec=5
                                        TimeoutStartSec=30
                                        ExecStartPre=/lib/systemd/systemd-networkd-wait-online --interface=wlan0 --timeout=6 --quiet
                                        ExecStartPre=/bin/echo 'systemd-networkd-wait-online: wlan0 is online'
                                        # clone the dhcp-allocated IP to eth0 so dhcp-helper will relay for the correct subnet
                                        ExecStartPre=/bin/bash -c '/sbin/ip addr add $(/sbin/ip -4 -br addr show wlan0 | /bin/grep -Po "\\d+\\.\\d+\\.\\d+\\.\\d+")/32 dev eth0'
                                        ExecStartPre=/sbin/ip link set dev eth0 up
                                        ExecStartPre=/sbin/ip link set wlan0 promisc on
                                        ExecStart=-/usr/sbin/parprouted eth0 wlan0
                                        ExecStopPost=/sbin/ip link set wlan0 promisc off
                                        ExecStopPost=/sbin/ip link set dev eth0 down
                                        ExecStopPost=/bin/bash -c '/sbin/ip addr del $(/sbin/ip -4 -br addr show eth0 | /bin/grep -Po "\\d+\\.\\d+\\.\\d+\\.\\d+")/32 dev eth0'
                                        [Install]
                                        WantedBy=wpa_supplicant@wlan0.service
                                        EOF
                                        systemctl daemon-reload
                                        systemctl enable parprouted.service
                                        systemctl start wpa_supplicant@wlan0 dhcp-helper systemd-networkd systemd-resolved

                                        Edit 2: Pay attention to the country="US" variable to ensure local compliance with Wifi channels/frequencies

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