Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. Ben
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 9
    • Best 1
    • Controversial 0
    • Groups 0

    Ben

    @Ben

    1
    Reputation
    1
    Profile views
    9
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Ben Unfollow Follow

    Best posts made by Ben

    • RE: if M552 S1 fails; send M552 S2? Is this possible with RRF3??

      @dc42 said in if M552 S1 fails; send M552 S2? Is this possible with RRF3??:

      if (network.interfaces[0].actualIP^"Q") = "0.0.0.0Q"

      Hey this worked!!! I appreciate you!

      I changed the parameters of the if statement from actualIP to changingMode:

      So I'm now using:
      if (network.interfaces[0].state^"Q") = "changingModeQ"

      emit predefined access point

      I found that while duet is in M552 S1 mode and can't find a wifi signal, it's actually in "changing mode" As of right now I like this parameter over assuming the IP, as sometimes the IP wouldn't be "0.0.0.0"

      Thank you @dc42 @bearer and @bot

      posted in General Discussion
      Benundefined
      Ben

    Latest posts made by Ben

    • RE: if M552 S1 fails; send M552 S2? Is this possible with RRF3??

      @bearer You were right about the daemon.g ... I tried to call the macro from the config.g, or just run it straight from the config.g but neither worked, I think you're right that M552 is delayed.

      I couldn't find a lot of documentation on daemon.g out there, but I made the daemon.g file in the /sys folder and called the macro "WIFICONNECT" from it. From my understanding the daemon.g file is running constantly in the background? Will this harm anything in the long run? Right now I suspect if there is a temporary "lag" or disconnect with the wifi it will automatically emit it's own wifi signal.. which would inconvenient.

      Here's my daemon.g:
      G4 S30

      M98 P"WIFICONNECT"

      Here's what I have working for the WIFICONNECT macro:
      ;Attempt to connect to wifi signal, if it fails, emit a wifi signal
      G60

      if (network.interfaces[0].state) = "changingMode" ; if unable to find/connect to network, emit network access point
      M552 S-1 ; turn off wifi module
      G4 S3 ; dwell 3 seconds
      M552 S0 ; turn wifi module to idle
      G4 S3 ; dwell 3 seconds
      M552 S2 ; emit predefined access point
      M586 P0 S1 ; enable HTTP
      M586 P1 S0 ; disable FTP
      M586 P2 S0 ; disable Telnet

      posted in General Discussion
      Benundefined
      Ben
    • RE: if M552 S1 fails; send M552 S2? Is this possible with RRF3??

      @bot yes you are right. The macro works without converting it to a string.

      posted in General Discussion
      Benundefined
      Ben
    • RE: if M552 S1 fails; send M552 S2? Is this possible with RRF3??

      @dc42 said in if M552 S1 fails; send M552 S2? Is this possible with RRF3??:

      if (network.interfaces[0].actualIP^"Q") = "0.0.0.0Q"

      Hey this worked!!! I appreciate you!

      I changed the parameters of the if statement from actualIP to changingMode:

      So I'm now using:
      if (network.interfaces[0].state^"Q") = "changingModeQ"

      emit predefined access point

      I found that while duet is in M552 S1 mode and can't find a wifi signal, it's actually in "changing mode" As of right now I like this parameter over assuming the IP, as sometimes the IP wouldn't be "0.0.0.0"

      Thank you @dc42 @bearer and @bot

      posted in General Discussion
      Benundefined
      Ben
    • RE: if M552 S1 fails; send M552 S2? Is this possible with RRF3??

      ah, my bad I see what you mean. I inserted the M409 command in as so:

      G4 S10 ; dwell 5 seconds

      M409 K"network.interfaces[0].actualIP"

      if network.interfaces[0].actualIP = "0.0.0.0"
      M552 S-1 ; turn off wifi module

      and got the feedback:

      7/11/2020, 2:17:46 PM {"key":"network.interfaces[0].actualIP","flags":"","result":"192.168.0.133"}Error: in file macro line 11 column 46: meta command: cannot convert operands to same type

      I appreciate your help @bearer !

      posted in General Discussion
      Benundefined
      Ben
    • RE: if M552 S1 fails; send M552 S2? Is this possible with RRF3??

      @bearer is this what you mean?

      M409 K"network.interfaces[0].actualIP"
      {"key":"network.interfaces[0].actualIP","flags":"","result":"192.168.0.133"}<LF>ok<LF>

      M552 S-1
      WiFi module stopped<LF>ok<LF>

      M558 S0
      ok<LF>

      M588 S"*"
      ok<LF>

      (unplugged the machine, replugged it in)

      M409 K"network.interfaces[0].actualIP"
      {"key":"network.interfaces[0].actualIP","flags":"","result":"0.0.0.0"}<LF>ok<LF>WiFi reported error: no known networks found<LF>WiFi module is idle<LF>WiFi reported error: no known networks found<LF>WiFi module is idle<LF>WiFi reported error: no known networks found<LF>WiFi module is idle<LF>WiFi reported error: no known networks found<LF>WiFi module is idle<LF>WiFi reported error: no known networks found<LF>WiFi module is idle<LF>WiFi reported error: no known networks found<LF>WiFi module is idle<LF>WiFi reported error: no known networks found<LF>WiFi module is idle<LF>WiFi reported error: no known networks found<LF>WiFi module is idle<LF>WiFi reported error: no known networks found<LF>WiFi module is idle<LF>WiFi reported error: no known networks found<LF>WiFi module is idle<LF>WiFi reported error: no known networks found<LF>WiFi module is idle<LF>WiFi reported error: no known networks found<LF>WiFi module is idle<LF>WiFi reported error: no known networks found<LF>WiFi module is idle<LF>WiFi reported error: no known networks found<LF>WiFi module is idle<LF>WiFi reported err[Warning: Maximal number of bytes per line exceeded! Check the EOL (end-of-line) settings or increase the limit in the advanced terminal settings.]

      posted in General Discussion
      Benundefined
      Ben
    • RE: if M552 S1 fails; send M552 S2? Is this possible with RRF3??

      I did some poking with M409, took me a little while to figure out, but I think you were completely right originally bearer with the "network.interfaces[0].actualIP". If the board fails to connect the actualIP does turn to 0.0.0.0

      Here's where I'm at now:

      ;Attempt to connect to wifi signal, if it fails, emit a wifi signal

      M552 S0 ; set wifi module to idle
      G4 S3 ; dwell 3 seconds
      M552 S1 ; connect to predefined network
      G4 S10 ; dwell 5 seconds

      if network.interfaces[0].actualIP = "0.0.0.0"
      M552 S-1 ; turn off wifi module
      G4 S3 ; dwell 3 seconds
      M552 S0 ; set module to idle
      G4 S3 ; dwell 3 seconds
      M589 S"Eve" P"password" I192.168.0.133 ; define parameters for access point (AP)
      G4 S1 ; dwell 1 second
      M552 S2 ; emit access point

      M586 P0 S1 ; enable HTTP
      M586 P1 S0 ; disable FTP
      M586 P2 S0

      I get an error seen below:
      Error: in file macro line 9 column 46: meta command: cannot convert operands to same type

      What does it mean by cannot convert operand to same type?

      I like your idea bot, I think that'd be a good "final" but right now I'm trying to get it working as a macro

      posted in General Discussion
      Benundefined
      Ben
    • RE: if M552 S1 fails; send M552 S2? Is this possible with RRF3??

      this is the macro I put together:

      ;Attempt to connect to wifi signal, if it fails, emit a wifi signal

      M552 S0 ; set wifi module to idle
      G4 S3 ; dwell 3 seconds
      M552 S1 ; connect to predefined network
      G4 S10 ; dwell 5 seconds

      if network.inferfaces[0].actualIP = "0.0.0.0":
      M552 S0 ; set module to idle
      G4 S3 ; dwell 3 seconds
      M587 SEve Ppassword I192.168.0.133 ; define parameters for wifi signal
      G4 S1 ; dwell 1 second
      M552 S2 ; emit wifi signal

      M586 P0 S1 ; enable HTTP
      M586 P1 S0 ; disable FTP
      M586 P2 S0 ; disable Telnet

      but I get the error :
      Error: in file macro line 9 column 4: meta command: unknown value 'inferfaces^.actualIP'

      I'm thinking the "if" statement needs a parameter which is only true when the machine fails to connect to a wifi signal, but I'm not sure what this parameter would be

      posted in General Discussion
      Benundefined
      Ben
    • RE: if M552 S1 fails; send M552 S2? Is this possible with RRF3??

      Wouldn't you need to define network.interfaces? or is this defined somewhere and I've missed it?

      posted in General Discussion
      Benundefined
      Ben
    • if M552 S1 fails; send M552 S2? Is this possible with RRF3??

      Has this been done yet???

      Eliminate the need to connect via USB

      Instead of needing to connect to the Duet 2 Wifi via USB, the Duet 2 Wifi can first attempt to connect to a network.. but if the parameters don't exist, or have changed, and the connection fails it can then send its own wifi signal.

      If it sends its own wifi signal you can then connect to the Duet via your cellphone/computer and modify the network settings & reboot.

      RRF 3.01 introduced "GCode Meta Commands" (https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands) or if, elif, else, loops, etc.

      If something like this works I think it would help a ton of people! I'm thinking it will exist in either the top of config.g or as a macro, called toward the top of config.g

      What do you guys think? Ideas? opinions? is it impossible? why?

      posted in General Discussion
      Benundefined
      Ben