M587: Bad or missing parameter

  • Hello all,

    I am setting up a new duet2 wifi. I am using a MAC and using Terminal. I follow the getting started instructions up until the point where I need to send the M587 S"ssid" P"password" . Every iteration I have tried of this comes back with [M587: Bad or missing parameter]. I have also tried this in pronterface using ' in front of the lowercase letters with the same result. I have tried with power connected and usb connected and just with the usb connected. I have restarted my computer and changed USB ports. M552 shows that the wifi is idle. Any help would be greater appreciated. Thank you.

  • administrators

    1. Which firmware version is your Duet using? Send M115 to find out.

    2. Do your ssid and/or password contain any unusual characters? If so, try replacing those characters by ordinary letters, to see if you can pin down a particular character that isn't being accepted.

  • When I run M115, it says firmware version is
    2.0. (I tried updating firmware via microsd card, but constantly got a file Duet2CombinedFirmware.bin not found, regardless of what it was named. )

    SSID is 7 capital letters and 2 numbers, no spaces.

    Password is 12 lowercase letters and 3 numbers, no spaces

    No special characters used in either. WiFi security is set at WPA2-psk. Tried WPA2-psk/ WPA-psk and removing security all together. Rebooted router several times. Router is a netgear nighthawk r7000. I have only tried
    connecting to the 2.4g network, not the 5.8g

    Also, if I run just the M587 command (by itself), it does come back with one remembered network. It appears to be the one in the config.g file that came on the duet micronsd card. M588 S”*” returns, no networks found.

  • administrators

    Please copy and paste an actual M587 command you send that provokes that error message. It doesn't need to contain your real SSID and password, because M587 just stores the data and doesn't attempt to connect to your router.

    Are you by any change using a Mac to send the M587 and M588 commands? I recall an instance recently of a user sending those commands from a Mac, and instead of sending normal ASCII double quote characters, it was sending "smart quotes".

  • I’m not by the computer right now to send an actual command, but I am using an iMac. I tried the commands from terminal and from the prontface interface. I also found that thread and another user mentioned straight “ vs slanted “. Im not really sure what that is or how to do it, but they posted a *** copy paste this exactly*** example of the users ssid and password, which fixed his problem. I copied and pasted that exact example but with my information and no change.

    I also have windows on my Mac so I could try that or possibly a different windows pc? Just confused because It seems to communicate properly but doesn’t like something.

  • M587 S“NETGEAR36” P”xxxxxxxxxxxx480”

  • Well, theres 6 hours wasted.... There must be something that my MAC doesn't like. I opened Windows and ran commands via YAT. and everything went through perfectly the first time. I can now access the duet via it's assigned IP on the network. Thanks for the replies @dc42

  • administrators

    @acqt said in M587: Bad or missing parameter:

    M587 S“NETGEAR36” P”xxxxxxxxxxxx480”

    Yes, your Mac has used smart quotes. It should look like this:

    M587 S"NETGEAR36" P"xxxxxxxxxxxx480"

    Can you see the difference?

    Which program on the Mac did you use to send the commands? We need to put a warning in the documentation about this.

  • I had this issue, it wasn't showing a solution here, so I registered to provide my fix.

    I used Brackets (http://brackets.io/) NOT TextEdit, you need to do this because Terminal doesn't show you your commands when you type them in.

    Type the command for setting the modem to use wireless network

    M587 S"Your-WIFI-SSID" P"your-password"

    Using Brackets app prevents your Mac using smart quotes...

    Don't forget after you do this, to go into your config file and switch from using Access mode to WiFi mode. Note the Enable WiFi doesn't have the semi colon ;

    ; Configure Connection - ENABLE ONLY ONE OF THE BELOW THREE
    M552 S1 ; Enable Wifi Network
    ;M552 S2 ; Enable Access Point Mode
    ;M552 S1 P192.168.2.14 ; Enable Ethernet - Change IP Address to suit

Log in to reply