Unable to connect to G2 on due SPJS 1.92

Home Forums TinyG TinyG Support Unable to connect to G2 on due SPJS 1.92

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #9998
    Lynge
    Member

    I am not sure if this is the right place for this post.

    I have flashed a Due with G2 as per the instructions on the wiki. and foing it the first time, it just worked. I got the board executing commands from Chillipepr and all.

    Then I wanted to try the jogging widget and everything came crashing down.

    Since then, the SPJS has not been able to connect to the Due.

    I have erased it and reflashed it, but with no effect.

    This is the last part of the server output when running it with -v flag:

    2016/10/30 11:53:01 seriallist_linux.go:275: Final port list: [{/dev/ttyACM0 Synthetos TinyG v2 (ttyACM0) [/dev/ttyACM1] 0084-d639-0084-6bd6 ef Synthetos TinyG v2 606d 1d50} {/dev/ttyACM1 Synthetos TinyG v2 (ttyACM1) [/dev/ttyACM0] 0084-d639-0084-6bd6 ef Synthetos TinyG v2 606d 1d50} {/dev/ttyACM2 Arduino Due Prog. Port (ttyACM2) [] 75533343236351E08202 02 Arduino (www.arduino.cc) Arduino Due Prog. Port 003d 2341}]
    2016/10/30 11:53:01 serial.go:489: Got metadata on ports:[{/dev/ttyACM0 Synthetos TinyG v2 (ttyACM0) [/dev/ttyACM1] 0084-d639-0084-6bd6 ef Synthetos TinyG v2 606d 1d50} {/dev/ttyACM1 Synthetos TinyG v2 (ttyACM1) [/dev/ttyACM0] 0084-d639-0084-6bd6 ef Synthetos TinyG v2 606d 1d50} {/dev/ttyACM2 Arduino Due Prog. Port (ttyACM2) [] 75533343236351E08202 02 Arduino (www.arduino.cc) Arduino Due Prog. Port 003d 2341}]
    2016/10/30 11:53:01 serial.go:546: About to marshal the serial port list. spl:{[{/dev/ttyACM0 Synthetos TinyG v2 (ttyACM0) 0084-d639-0084-6bd6 ef false false [/dev/ttyACM1] 0  [default timed nodemcu tinyg tinyg_old tinyg_linemode tinyg_tidmode tinygg2 grbl marlin] 1.92 1d50 606d 0} {/dev/ttyACM1 Synthetos TinyG v2 (ttyACM1) 0084-d639-0084-6bd6 ef false false [/dev/ttyACM0] 0  [default timed nodemcu tinyg tinyg_old tinyg_linemode tinyg_tidmode tinygg2 grbl marlin] 1.92 1d50 606d 0} {/dev/ttyACM2 Arduino Due Prog. Port (ttyACM2) 75533343236351E08202 02 false false [] 0  [default timed nodemcu tinyg tinyg_old tinyg_linemode tinyg_tidmode tinygg2 grbl marlin] 1.92 2341 003d 0} {/dev/ttyS0 ttyS0   false false [] 0  [default timed nodemcu tinyg tinyg_old tinyg_linemode tinyg_tidmode tinygg2 grbl marlin] 1.92   0}]}
    2016/10/30 11:53:03 hub.go:122: sendjson {"P":"/dev/ttyACM0","Data":[{"Id":"startup5","D":null},{"D":"{\"sr\":n}\n","Id":"tinygInit-cmd45","Pause":0},{"D":"{\"qr\":n}\n","Id":"tinygInit-cmd46","Pause":0},{"D":"{\"hp\":n}\n","Id":"tinygInit-cmd47","Pause":0},{"D":"{\"fb\":n}\n","Id":"tinygInit-cmd48","Pause":0},{"D":"%\n","Id":"tinygInit-cmd49","Pause":0},{"Id":"startup6","D":null}]}
    2016/10/30 11:53:03 serial.go:606: Sending err back:  We could not find the serial port /dev/ttyACM0 that you were trying to write to.
    

    This is what comes out, no matter what I do. If I have both usb ports hooked up or just the native port.

    I have tried using the suggested script at the bottom of the flashing wiki page, but it makes no difference. Everything executes with no errors, but I still cannot connect to the board.

    I am on ubuntu 16.10 and I have compiled a custom G2 bin, but I don’t think that is the source of this problem since it worked fine for a while and I have made no changes to it since then. I am trying a prebuilt image now, but I cannot see how that would make any difference.

    Should I be posting this to the community of SPJS instead? Or might the problem be with G2?

    #9999
    cmcgrath5035
    Moderator

    When you erased and flashed “it”, I assume you mean reflashed the DUE with your G2 binary.
    After restarting the DUE, do you see the led ‘heartbeat’ on the DUE, indicating G2 is running?

    The SPJS log snippet you provide above would indicate Port ACM0 does not exist.
    Is the port perhaps locked by another Application, such as the downloader?

    If you run ‘ls -l /dev/tty*’ from the Ubuntu CLI, do you see /dev/ttyACM0 and /dev/ttyACM1 ?

    #10001
    Lynge
    Member

    All assumptions correct on your part.
    And yes, I did see the heartbeat.

    I also checked to see if the port was there and it was. I forgot to mention that, sorry.

    I have now got it working again, but it seems a little “wonky”.

    If I run the demo gcode in chillipepr, it runs just fine, but after that, nothing really works anymore. The DRO does not update and I cannot jog and it won’t run the gcode again.

    If however I start by jogging it works just as expected.

    I will now try disconnecting the DUE and doing a reboot of the machine to see if it will still work after that.

    One thing I did find out was that the SPJS really donsn’t like it when ubuntu goes into sleepmode while it is running, but that’s okay i guess since it really shouldn’t be running on something that sleeps while it is working.

    I will follow up with more information shortly.

    #10002
    Lynge
    Member

    And now problem is back.

    Even if I reflash the DUE it just won’t connect.

    It shows up fine in chilipepr, but when I try to connect it throws the error in my original post.

    the output of ‘ls -l /dev/ttyA*’ is


    crw-rw—- 1 root dialout 166, 0 Oct 30 14:01 /dev/ttyACM0
    crw-rw—- 1 root dialout 166, 1 Oct 30 14:03 /dev/ttyACM1
    crw-rw—- 1 root dialout 166, 2 Oct 30 14:03 /dev/ttyACM2

    So the ports are there.

    Any ideas? This really seems weird.

    BTW I have the DUE connect with 2 cables, but I have also tried with just moving one cable to the native port after flashing, but that made no difference.

    #10003
    Lynge
    Member

    SPJS lists the port on startup and correctly identifies what is connected to it:

    
    2016/10/30 14:09:50 seriallist_linux.go:275: Final port list: [{/dev/ttyACM0 Arduino Due Prog. Port (ttyACM0) [] 75533343236351E08202 02 Arduino (www.arduino.cc) Arduino Due Prog. Port 003d 2341} {/dev/ttyACM1 Synthetos TinyG v2 (ttyACM1) [/dev/ttyACM2] 0084-d639-0084-6bd6 ef Synthetos TinyG v2 606d 1d50} {/dev/ttyACM2 Synthetos TinyG v2 (ttyACM2) [/dev/ttyACM1] 0084-d639-0084-6bd6 ef Synthetos TinyG v2 606d 1d50}]
    2016/10/30 14:09:50 serial.go:489: Got metadata on ports:[{/dev/ttyACM0 Arduino Due Prog. Port (ttyACM0) [] 75533343236351E08202 02 Arduino (www.arduino.cc) Arduino Due Prog. Port 003d 2341} {/dev/ttyACM1 Synthetos TinyG v2 (ttyACM1) [/dev/ttyACM2] 0084-d639-0084-6bd6 ef Synthetos TinyG v2 606d 1d50} {/dev/ttyACM2 Synthetos TinyG v2 (ttyACM2) [/dev/ttyACM1] 0084-d639-0084-6bd6 ef Synthetos TinyG v2 606d 1d50}]
    2016/10/30 14:09:50 serial.go:546: About to marshal the serial port list. spl:{[{/dev/ttyACM0 Arduino Due Prog. Port (ttyACM0) 75533343236351E08202 02 false false [] 0  [default timed nodemcu tinyg tinyg_old tinyg_linemode tinyg_tidmode tinygg2 grbl marlin] 1.92 2341 003d 0} {/dev/ttyACM1 Synthetos TinyG v2 (ttyACM1) 0084-d639-0084-6bd6 ef false false [/dev/ttyACM2] 0  [default timed nodemcu tinyg tinyg_old tinyg_linemode tinyg_tidmode tinygg2 grbl marlin] 1.92 1d50 606d 0} {/dev/ttyACM2 Synthetos TinyG v2 (ttyACM2) 0084-d639-0084-6bd6 ef false false [/dev/ttyACM1] 0  [default timed nodemcu tinyg tinyg_old tinyg_linemode tinyg_tidmode tinygg2 grbl marlin] 1.92 1d50 606d 0} {/dev/ttyS0 ttyS0   false false [] 0  [default timed nodemcu tinyg tinyg_old tinyg_linemode tinyg_tidmode tinygg2 grbl marlin] 1.92   0}]}
    
    • This reply was modified 8 years ago by Lynge.
    #10005
    Lynge
    Member

    If i point minicom at the serial port that SPJS cannot find. I get this

    {"r":{"fv":0.99,"fb":100.12,"fbs":"100.12-2-g7b23-dirty","fbc":"settings_dualy.}

    And I am unable to enter any commands or anything. Is the DUE hanging?

    #10006
    cmcgrath5035
    Moderator

    Hmmm, I have no experience with SPJS 1.92.
    I am not sure why you are seeing three ports (0,1 &2).

    For your discussion, SPJS 1.92 is also running on your Ubuntu machine?
    I would doubt SPJS has been rigorously tested with an environment that goes to sleep. Can you turn off the auto sleep?
    Are you sure only one instance of SPJSis running on your machine?
    I use top to check

    #10008
    Lynge
    Member

    The three ports confuse me as well.

    Yes SPJS is running on the same machine as the DUE is connected to and Chillipepr is running on.

    I have turned on the autosleep, but it merely happened when I left the machine alone for a while and when I came back it had fallen asleep.

    Pretty sure. One time I managed to start the service again and while I cannot remember the error it produced I am certain it looked different to the ones I keep getting.

    I am on a 64bit installation could that have an effect maybe?

    Also, does it matter that the DUE is not connected to any stepper drivers? I mean, it should just produce the signals anyway right?

    #10009
    cmcgrath5035
    Moderator

    You do NOT need to have steppers or even a Gshield attached to Due for ting G to run and report back to upstream(e.g. Chilipeppr)

    64 bit should no be an issue, assuming of course you grabbed the 64 bit SPJS

    Are you sure only one instance of SPJS is running?

    #10010
    Lynge
    Member

    I am pretty sure.

    I have rebooted the system multiple times and the problem exists immediately after startup.

    Unless SPJS adds itself to the startup of the system without me noticing then there should only be a single instance running.

    • This reply was modified 8 years ago by Lynge.
    #10012
    cmcgrath5035
    Moderator

    What does CLI command “ls -l /dev/ttyA*” report after boot?
    Three ports?
    What version o G2 did you flash to the DUE?

    For test purposes, try 78.03 from

    #10013
    Lynge
    Member

    I will try that command again when I am back at the machine, but I am pretty sure it reports all three ports if the DUE is plugged in.

    I flashed the edge 100.xx (can’t remember exactly)

    I will try flashing 78.03 that when I get back.

    #10014
    Lynge
    Member

    Just linking in a thread that might help. Just so that I can find it again when I get back to the DUE

    https://forum.arduino.cc/index.php?topic=129647.0

    #10018
    cmcgrath5035
    Moderator

    Interesting thread you added just above.
    Do you know if you are using a USB3 port on your Ubuntu 16.10 machine?
    That would not explain why you setup “originally” worked until you reflashed the DUE, of course.(per your original post here)

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.