Converting the Duet WiFi to use an external antenna

  • For anyone interested in replacing the WiFi module, link to ESP-07S data sheet below:

    Depending upon your location and your preferred supplier, the module will cost between £3.00 and <£2.00, e.g.

    You will also need a IPEX/u.FL to SMA adaptor coax lead, similar to:

    and a

    2.4GHz antenna, similar to:

    I would guess that most hobbyists will have a spare 2.4GHz antenna somewhere in the house (i.e. supplied with that old WiFi router you previously upgraded) however if you do need to purchase, make sure you get one with a SMA to match the coax lead (or if you already have a RP-SMA antenna, make sure you purchase a Coax with a RP-SMA connector to suit! - you cannot mix RP-SMA and SMA connectors.

  • I did the modification on one of my Duet's and it did improve my signal strength but there are easier ways to do that than possibly ruining the control board. I would not recommend this mod for the novice or faint of heart. It can go really well or really bad in the space of a few seconds. But if you still want to do it one thing that wasn't mentioned is that you will have to load the wifiserver bin on to the new wifi module once you solder it on via USB and SD card using an M997 S1 command or at least thats how I got mine to work.

  • administrators

    Yes, the ESP-07S is OK.

  • thanks.

  • Ok, I just changed my wifi module, but I can't set ssid/password (get "Bad or missing parameter"). Here are the logs:

    >>> M997 S1
    SENDING:M997 S1
    Trying to connect at 460800 baud:
    Erasing 302928 bytes...
    Uploading file...
    5% complete
    10% complete
    15% complete
    20% complete
    25% complete
    30% complete
    35% complete
    40% complete
    45% complete
    50% complete
    55% complete
    60% complete
    65% complete
    70% complete
    75% complete
    80% complete
    85% complete
    90% complete
    95% complete
    Upload successful
    >>> M552 S0
    SENDING:M552 S0
    WiFi module started
    >>> M587 Sxxx Pxyyy
    SENDING:M587 Sxxx Pyyy
    M587: Bad or missing parameter
    >>> M122
    === Diagnostics ===
    Used output buffers: 1 of 32 (9 max)
    === Platform ===
    RepRapFirmware for Duet WiFi version 1.20beta8 running on Duet WiFi 1.0
    Board ID: 08DDM-9FAM2-LW4S8-6JTDG-3SD6Q-13YRX
    Static ram used: 15488
    Dynamic ram used: 99136
    Recycled dynamic ram: 64
    Stack ram used: 4328 current, 5532 maximum
    Never used ram: 10852
    Last reset 00:19:36 ago, cause: reset button or watchdog
    Last software reset reason: User, spinning module GCodes, available RAM 11504 bytes (slot 4)
    Software reset code 0x0003, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x00400000, BFAR 0xe000ed38, SP 0xffffffff
    Error status: 0
    [ERROR] Error status: 0
    Free file entries: 10
    SD card 0 detected, interface speed: 20.0MBytes/sec
    SD card longest block write time: 0.0ms
    MCU temperature: min 26.4, current 27.2, max 27.4
    Supply voltage: min 1.7, current 1.7, max 1.7, under voltage events: 0, over voltage events: 0
    Driver 0: ok
    Driver 1: ok
    Driver 2: ok
    Driver 3: ok
    Driver 4: ok
    Date/time: 1970-01-01 00:00:00
    Cache data hit count 1442288766
    Slowest main loop (seconds): 3.074205; fastest: 0.000033
    === Move ===
    MaxReps: 0, StepErrors: 0, FreeDm: 240, MinFreeDm 240, MaxWait: 0ms, Underruns: 0, 0
    Scheduled moves: 0, completed moves: 0
    Bed compensation in use: none
    Bed probe heights: 0.000 0.000 0.000 0.000 0.000
    === Heat ===
    Bed heater = 0, chamber heater = -1
    === GCodes ===
    Segments left: 0
    Stack records: 1 allocated, 0 in use
    Movement lock held by null
    http is idle in state(s) 0
    telnet is idle in state(s) 0
    file is idle in state(s) 0
    serial is ready with "M122" in state(s) 0
    aux is idle in state(s) 0
    daemon is idle in state(s) 0
    queue is idle in state(s) 0
    autopause is idle in state(s) 0
    Code queue is empty.
    Network state is running
    WiFi module is idle
    Failed messages: pending 0, notready 0, noresp 0
    WiFi firmware version 1.20b9
    WiFi MAC address 5c:cf:7f:61:99:c5
    WiFi Vcc 3.35, reset reason Turned on by main processor
    WiFi flash size 4194304, free heap 32376
    HTTP sessions: 0 of 8
    Socket states:  0 0 0 0 0 0 0 0
    Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0)

    Any idea?

  • administrators

    Are you putting the ssid and password inside double quote characters?

  • Yes. I tried with Pronterface (using single quote to prefix each lower case char), and with minicom. Same error each time.

    Whatever I use as S/P values, I get the error.

    Did I fry the esp module? I don't think, as the firmware was successfully updated, but…

  • I just upgraded to lastest stable firmwares (1.20), and all is now working fine!

  • I have a question… M122 returns:

    WiFi signal strength -73dBm

    But my router says:

    Signal    Noise     RX Rate       TX Rate
    -59 dBm   -89 dBm   54.0 Mbit/s   65.0 Mbit/s

    Why is there such difference in signal level? In fact, while I'm now using the ESP-07 with a +6dB gain antenna, the signal level returned by M122 didn't changes that much (I think I was around -75dB before)…

  • Large differences is wifi signal strength are normal for differing wifi devices. Each one "hears" the other differently. This can be due so many different factors it's impractical to enumerate. Usually, it's different radio power, different antennas, or different propagation paths.

    In your case, it appears the router has "bigger ears" (better antenna.)

  • Ok, I see.

    But why switching from the default ESP (no antenna) to the new one (6dB gain antenna) didn't change that much the signal strength returned by the Duet?

    I don't have signal values given by the router with the default ESP (didn't think to read it at the time); so I don't know if it really changed. But the thing is I know have a much better connection: transfers are very fast and I don't get any disconnection anymore.

  • administrators

    If M122 is telling you that the signal strength is -73dBm now, that is already very low. If it was even lower before, that would explain the disconnections you had.

    Which wifi channel is your router set to? Does the reported signal strength vary if you switch between channels 1, 6 and 11?

  • Yes, it is low. But, as said, real transmissions work much better and faster, now. And no more disconnection.

    I will make tests with different channels (I think I'm on channel 1 - the router is in auto and chose this one).

  • Hi!

    I have WiFi signal strength -61dBm in three meters from the router. The ESP-07 has a very very weak antenna ((
    I will change to ESP-07S or connect external to ESP-07.
    Laptop, iPhone, Nokia etc. - everything works fine.

  • I used a wifi analyser on my phone, and noticed that there where 3 other AP on channel 1. In fact, it depends where I am in the house, and on the AP side, they are not detected. So the AP chose this channel. But on the printer side, they where as powerfull as my AP!

    I moved to channel 3, unused by other wifi AP, and I now have -66dB strength…

  • Will this be available as a build option?

  • ESP-07S sold out in RS-online 🙂 how thats possible

  • Hi, i have a problem since i changed the Module.
    I can only connect to the Duet Wifi in Accesspoint mode. If i change it to M552S1 it only says: Wifi reported error: no known networks found.
    The wifi is defenitly present.
    Did flash the right firmware files main as also the Wifiserver one.
    Running 1.21

    Anyone a clue why this could be?

  • Got the Problem solved.
    David, i think the firmware 1.21 has a problem with loading the M587 with the Router data from the config.g to the remembered list.
    Got my problem solved with Repetier host, did send the M587 with ssid and password via g-code console.

Log in to reply