Welcome to Our Community

Some features disabled for guests. Register Today.

Grbl mega or mega-x5 not recognised

Discussion in 'Control Software' started by Cjd000, May 24, 2020.

  1. Cjd000

    Cjd000 New
    Builder

    Joined:
    Oct 6, 2015
    Messages:
    2
    Likes Received:
    1
    Hi,

    My old Arduino Nano died a few days ago so I went with a Mega 2560 board as a replacement. The trouble is the openbuilds control software won’t recognise it.

    I’ve flashed with the official Grbl branch for the Mega (v1.1g) and tried the Mega-x5 version (1.1n). Both of which work perfectly fine using other controllers but just are not recognised by the openbuilds controller which is by far the best out there and therefore the one I want to use.

    the only difference I can find is that when Grbl Panel (my alternative controller) accesses the board, there is far less verbose status presented than I’m used to seeing. But it does show the version info.

    what does the openbuilds software use to confirm there’s a v1.1 board present?

    can anybody please help?

    image.jpg
     
  2. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    746
    Sounds odd. If it's the official Mega port, it should output the same serial comms. Based on what I've seen in grbl's and CONTROL's sources, their modularity shouldn't care about what specific hardware it is, only that it's using the correct serial data formats. @Peter Van Der Walt?
     
  3. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,047
    Likes Received:
    4,123
    It waits for the string "Grbl digit[dot]digit[letter]" after reset or after it sends Ctrl+X

    For example
    [18:15:12] [ ] Grbl 1.1g ['$' for help]
    [18:15:12] [ ] [MSG:'$H'|'$X' to unlock]

    See
    OpenBuilds/OpenBuilds-CONTROL

    Connect to your Grbl using a serial terminal (putty, etc: 115200 baud to the correct port) and see what it outputs on connection, if nothing (autoreset disabled?) then try Ctrl+X and see what it says
    Then we'll take it from there

    putty.PNG

    Example coming off a BlackBox
    First messages came automatically on connection (after autoreset)

    Second set is me pressing Ctrl+x
     
    #3 Peter Van Der Walt, May 24, 2020
    Last edited: May 24, 2020
  4. jaygrovr

    jaygrovr New
    Builder

    Joined:
    Jun 12, 2020
    Messages:
    8
    Likes Received:
    0
    So what ever happened with this? I am in the same boat, board responds and broadcasts the correct connection message, but openbuilds control, seems to ignore it. When I connect with putty it responds with exactly the right message. Additionally, when I send a ctrl-x, it also responds. What is openbuilds control expecting? ITs like its totally ignoring what the response is. I tried connecting to another PC and it worked for a second, then I tried changing something on my grbl code and it failed again. Trying to run a mks gen 1.4 which is just like an arduino mega 2560 with ramps pinouts.
     
    #4 jaygrovr, Jun 12, 2020
    Last edited: Jun 12, 2020
  5. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,047
    Likes Received:
    4,123
    Never got feedback from the original poster as requested in the post above yours.
    Answered above:

    You can confirm that's what our code check for here:

    Want to help? refer to my post above. Do the test and screenshot it as requested
     
  6. jaygrovr

    jaygrovr New
    Builder

    Joined:
    Jun 12, 2020
    Messages:
    8
    Likes Received:
    0
    I have to shut down the openbuild server app on my machine when I want to try to reconnect, its pretty fustrating, but after I do that, it connects just fine. Any thoughts? I have to close the app in my system tray.
     
  7. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,047
    Likes Received:
    4,123
    What exactly does or does not happen. Clues in the serial log. Do you have USB Selective Suspend setup correctly in Windows Power Settings?
     
  8. jaygrovr

    jaygrovr New
    Builder

    Joined:
    Jun 12, 2020
    Messages:
    8
    Likes Received:
    0
    I press the connect button and openbuilds control tries to connect using its three methods as seen on the terminal, and does not find the controller. If I stop and start the openbuilds control service it finds it the first try every time. I have tried resetting my controller, unplugging and plugging back in, nothing seems to work other than stopping that service by quitting in the task tray.
     
  9. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,047
    Likes Received:
    4,123
    Section 4.3 of docs.openbuilds.com/blackbox
     
  10. jaygrovr

    jaygrovr New
    Builder

    Joined:
    Jun 12, 2020
    Messages:
    8
    Likes Received:
    0
    Ok I found the setting, it was in the documentation 4.2 not 4.3 as you mentioned. The setting was enabled, and I disabled it. Hopefully it will work better now. Thank you for the help, and the software is great. I like it much better than 1980s mach3 interface.
     
  11. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,047
    Likes Received:
    4,123
    It should. Of course hoping its a Genuine arduino. Not a chinese knockoff with a CH340 on it. Those chips are terribly unstable.

    Consider a BlackBox 4x though, support the company that makes the software you love
     
    #11 Peter Van Der Walt, Jun 14, 2020
    Last edited: Jun 14, 2020
  12. jaygrovr

    jaygrovr New
    Builder

    Joined:
    Jun 12, 2020
    Messages:
    8
    Likes Received:
    0
    Peter, thanks for the info, I will probably go with a black box, but that will be for an upgrade once I am up and running. The board is a [spam link removed] which probably has the chip you are talking about. The parts I got from openbuilds are very nice, and once I go to a larger router, i will for sure get more stuff from you guys. Also, thanks for the software support.
    Jason
     
    #12 jaygrovr, Jun 14, 2020
    Last edited by a moderator: Jun 14, 2020
  13. Bruce Wang

    Builder

    Joined:
    May 16, 2020
    Messages:
    8
    Likes Received:
    3
    I'm having the exactly the same issue, however disabling USB selective Suspend doesn't fix it. I have tested with multiple boards including the BlackBox 4X, Ramp 1.4, Uno, MKS Sbase, MKS Gen_L. I found the issue only happens with boards with ATMEGA2560, and whatever which the USB serial chip.

    - The BlackBox 4X is ATMEGA328P with FDTI, no problem.
    - Th Uno (compatible with CH340) is ATMEGA328P, no problem.
    - Ramp 1.4 with FDTI, ATMEGA2560, has the issue.
    - MKS Gen_L with CH340, has the issue.
    - MKS Sbase is a LPC1789 build-in USB serial, no problem.

    Reproducing:
    1. Launch OpenBuilds CONTROL, connect the board, select the right serial port and click connect. The board successfully connected.
    2. Click "restart gbrl" under the disconnect button. (Ctrl+X 0x18 sent), the board soft reset, the connection is still on.
    3. Disconnect and try to connect again, the board will be connected. The port.on("open") entered, but never entered parser.on("data").
    4. Quick OpenBuilds CONTROL from the system try and restart, recovered.
    5. Before quite OpenBuilds CONTROL, connect another ATMEGA2560 board, can't connect, the same issue, but a non-ATMEGA2560 board, connect properly.
    6. Before quite OpenBuilds CONTROL, successfully connected a non-ATMEGA2560 board, then switch back to a ATMEGA2560 board, still can't connect.
    7. Before quite OpenBuilds CONTROL, use Universal Gcode Sender, Easel or Arduino IDE to connect, no problem, try to connect from OpenBuilds CONTROL again, still can't connect.

    I suspect it's node serialport's issue.
     
  14. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,047
    Likes Received:
    4,123
    So please help by checking for us, what it sends :)

    I asked the original person above, but never got the feedback sadly :) (actually also asked the second person to do it too without feedback)

    If you guys want support for it, the least you can do is the quick test to see what String it prints on reset so we can see if we can add it for you. We don't have 2560 based hardware lying around, so we'd love to do you the favour but no point getting upset its not supported if none of the 2560 users helps with the info we need

     
    #14 Peter Van Der Walt, Sep 21, 2020
    Last edited: Sep 21, 2020
  15. Bruce Wang

    Builder

    Joined:
    May 16, 2020
    Messages:
    8
    Likes Received:
    3
    Hi peter.
    It sends nothing. the code reaches port.on("open"), then nothing happens after it. No port.on("data") or parser.on("data" ) hit. I enabled "set DEBUG=serialport/*". and confirmed.
     
  16. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,047
    Likes Received:
    4,123
    Refer the instructions above. Use putty, not node
     
  17. Bruce Wang

    Builder

    Joined:
    May 16, 2020
    Messages:
    8
    Likes Received:
    3
    upload_2020-9-22_0-31-54.png
    Here you are. (Sorry, I had misunderstood previously.)
     
    Peter Van Der Walt likes this.
  18. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,047
    Likes Received:
    4,123
    Hmm, that's weird, that's all we check for;
    1) We open the port OpenBuilds/OpenBuilds-CONTROL
    2) We rely on the autoreset to make Grbl send "Grbl x.x[az-]..." (we check for it here OpenBuilds/OpenBuilds-CONTROL)
    3) if after a second autoreset didn't work (boards without DTR/Autoreset) we send Ctrl+X to make any listening Grbl instance reset itself (OpenBuilds/OpenBuilds-CONTROL) and wait again for the string "Grbl..." from 2) above
    4) If after 2 seconds we still did not see a ""Grbl x.x[az-]..." string, we send the word "version" to see if any instance of Smoothieware is on the other end (not supported anymore, but first couple version of control could talk to Smoothie), we wait for the Smoothie version response: OpenBuilds/OpenBuilds-CONTROL
    5) If Smoothie also does not answer, we close the port OpenBuilds/OpenBuilds-CONTROL

    As you have both on hand, stopwatch the responses in Putty, see if the GrblMega stuff is a lot slower to respond maybe? The timing works with official Gnea Grbl-Mega, and Gnea Grbl (328p) but community forks kinda does become a "well why are they doing xyz differently from upstream"
     
  19. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,047
    Likes Received:
    4,123
    Sidenote, this is different (does connect first time) from the problem the thread starter had above. He could not connect at all :)

    So might not be related to startup string then (rather lower down in SerialPort where it seems then the events get paused or die when you reconnect, which does work with original Grbl, so wondering whats different in the serial buffer here. Sadly the 5x folks did zero effort to update wikis, readmes even source comments :( )
     
  20. Cjd000

    Cjd000 New
    Builder

    Joined:
    Oct 6, 2015
    Messages:
    2
    Likes Received:
    1
    Wow, I didn’t realise the thread had carried on after my original post as I didn’t see any email notifications. Today’s the first email I’ve had!

    I can’t really help though. I lost patience and dumped the 5x version of the code and went back to standard grbl pre-branch. Never had any problems again.

    I did go back to 5x some time later but still didn’t work. The problem was intermittent but more towards failing than not. I might get one in every 5 or 6 tries to connect and then nothing.
     
    Peter Van Der Walt likes this.
  21. Bruce Wang

    Builder

    Joined:
    May 16, 2020
    Messages:
    8
    Likes Received:
    3
    I found the issue and resolved, pull request created. clear statusloop interval before set it by linanw · Pull Request #153 · OpenBuilds/OpenBuilds-CONTROL

    Every time grbl restarts, welcome message (with "Grbl" it) will trigger setting the statusloop, without clear the loop previously set. stopPort() only clear the last one, but leftover rest of them. It seems blocking the port from open again. I can't tell if the root cause is from node serialport or the grbl-Mega firmware. This issue happens on Mega boards only. I tried also on an Uno board, I can see its serial led blinks crazier after I "restart grbl" multiple times, but the Uno board just can be reconnected again. I made a video with the Uno board for its led blinking difference after clicking "restart grbl" multiple times.

    The fix ensures there is signal statusloop, I tested on few different mega boards, no more problems. Cheers!

    .
     
    #21 Bruce Wang, Sep 22, 2020
    Last edited: Sep 22, 2020
  22. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,047
    Likes Received:
    4,123
    Thanks will test and merge in next release cycle. Weird still that it only affects the Megas but oh well. Good catch nonetheless, should be cleared before reinstating.
     
    #22 Peter Van Der Walt, Sep 22, 2020
    Last edited: Sep 22, 2020
    Bruce Wang likes this.
  23. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,047
    Likes Received:
    4,123
    Bruce Wang likes this.
  24. Bruce Wang

    Builder

    Joined:
    May 16, 2020
    Messages:
    8
    Likes Received:
    3
    Wow, what a fast response! Pretty version number as well! Thanks Peter, I will test it.
     
    Peter Van Der Walt likes this.
  25. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,047
    Likes Received:
    4,123
  26. Bruce Wang

    Builder

    Joined:
    May 16, 2020
    Messages:
    8
    Likes Received:
    3
    Hi Peter, I have run the new release with multiple projects for few hours. I didn't find any problem.
     
    Peter Van Der Walt likes this.
  27. bpresten3

    bpresten3 New
    Builder

    Joined:
    Feb 27, 2024
    Messages:
    2
    Likes Received:
    0
    I also have had this issue i thought it was the china board so i tried a few different ones but same issue so i got an official mega board in today to try and still same issue it fails when i try to update the firmware.
    upload_2024-4-10_21-12-58.png
     
  28. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,288
    Likes Received:
    1,837
    openbuildsCONTROL cannot flash a Mega board, it has firmware for Arduino Uno (Atmega328p based like the Blackbox 4x) and the Blackbox X32 which is ESP32 based.
    looks to me like you are trying to flash an mega256 based board, which is not supported.

    if you can flash GRBL 1.1 to the mega board using other tools then OpenbuildsCONTROL might well talk to it ok if they have not changed from the standard GRBL protocol.
     
    Peter Van Der Walt likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice