Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Problem with USB recognition of DuetWiFi with self compiled code

    Scheduled Pinned Locked Moved
    Firmware installation
    2
    14
    1.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • doodad69undefined
      doodad69
      last edited by

      I have a few Duet WiFi boards, loading released precompiled firmware bins 1.15 or 1.18.1 and having the USB drivers loaded on a Win7 machine, the boards are each recognized correctly. If I do the same under Win10, they also are recognized correctly ( but are only named "USB device" as I don't have any drivers installed ).

      However, if I compile ( Eclipse Neon ) 1.18.1 code ( CoreNG & RRF ) with no modifications, errors, or issues, when loaded onto the WiFi board, the Win7 system does not recognize it as anything ( calls it Duet with an exclamation and no assigned USB port ).

      Under Win10, it works fine. I can connect and run via Pronterface no issues.

      Am I missing something? What might I have done that would prevent the board from being recognized by the system ( only Win7 )?

      Yes, I do need to compile the code to implement a few custom mods.

      Thx in advance,
      Doodad/Pete

      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by

        Check your CoreNG files are up to date, because the USB VID and PID are defined in that project.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 0
        • doodad69undefined
          doodad69
          last edited by

          Using the CoreNG from releases ( CoreNG-1.18.1.zip ), all internal files are dated 4/7/2017 at 5:11 AM, same as what I have. Github says release date of 4/21 I downloaded it on 4/26.

          I can ignore it somewhat, but I can't run it off a win7 machine without figuring it out.

          Should I consider one of the newer CoreNG works?

          1 Reply Last reply Reply Quote 0
          • doodad69undefined
            doodad69
            last edited by

            Sorry, but no. Went back to https://github.com/dc42/CoreNG/releases as well as https://github.com/dc42/RepRapFirmware/releases downloaded fresh, cleared everything out of eclipse, reloaded these, fixed paths, compiled again - clean no errors or warnings. Used sam-ba to upload, reset and left with same odd result under win7.

            I am going to go try another computer all together, maybe this one has some other history that is infecting it.

            Any other suggestions are welcome. Thx.

            1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators
              last edited by

              Can you do a diff between a straight 1.18.1 build that you do, and the precompiled 1.18.1 binary?

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              1 Reply Last reply Reply Quote 0
              • doodad69undefined
                doodad69
                last edited by

                I can, will do. I've done it before long time ago and there were maybe only two or four bytes difference. Would you expect a perfect match of the bin file? Not sure if date is encoded in there or something.

                thx.

                1 Reply Last reply Reply Quote 0
                • doodad69undefined
                  doodad69
                  last edited by

                  using win7 built in file compare (binary) :

                  C:\temp>fc /B compiled.bin released.bin
                  Comparing files compiled.bin and RELEASED.BIN
                  000410FC: 09 50
                  000410FD: 12 1D
                  000410FE: ED EC

                  This is for version 1.18.1 ( both files renamed for clarity ).

                  If you prefer a different compare tool, please specify.

                  Pete

                  1 Reply Last reply Reply Quote 0
                  • dc42undefined
                    dc42 administrators
                    last edited by

                    Pete, I think you are using the 1.18 source for CoreNG instead of the 1.18.1 source. File asf/conf_usb.h changed between those versions.

                    Duet WiFi hardware designer and firmware engineer
                    Please do not ask me for Duet support via PM or email, use the forum
                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                    1 Reply Last reply Reply Quote 0
                    • doodad69undefined
                      doodad69
                      last edited by

                      I downloaded CoreNG-1.18.1.zip on 4/26/2017 and again the other day when I was banging my head on the wall.

                      The file in the zip archive is asf/conf_usb.h dated 4/7/2017 5:11 AM ( as is everything else in there )

                      All the files in RepRapFirmware-1.18.1.zip are dated 4/9/2017 12:36 AM

                      I got both from the https://github.com/dc42/CoreNG/releases and https://github.com/dc42/RepRapFirmware/releases respectively.

                      Is there a newer CoreNG version elsewhere I can use for 1.18.1? Or, can you tell me what in the conf_usb.h file I should look for to see what the issue might be?

                      1 Reply Last reply Reply Quote 0
                      • doodad69undefined
                        doodad69
                        last edited by

                        I looked in the conf_usb.h and the numbers from my diff appear to coincide with:
                        USB_DEVICE_VENDOR_ID 0x1209
                        and for the SAM4E
                        USB_DEVICE_PRODUCT_ID 0x60ED

                        The release bin code has these two as 1D 50 and 60 EC, where compiling gives 12 09 and 60 ED.

                        In the conf_usb.h file 60 EC is conditional on SAM3XA def, 60 ED is for SAM4E - which seems correct based on my compile. In Eclipse I set SAM4E8E as the active configuration for compling to WiFi ( not SAM3 ). Also for RRF I set DuetWiFi as the active configuration for the same reason. This wasn't specifically written in the "BuildInstructions.md" file, but seemed to be the correct choice ( or I picked it up from the forum or an email conversation ).

                        I can simply change it to match, but it seems like something else is going on here. Maybe the wrong file slipped into this archive?

                        1 Reply Last reply Reply Quote 0
                        • doodad69undefined
                          doodad69
                          last edited by

                          FWIW, I edited the conf_usb.h to match the alternate VENDOR and PRODUCT IDs and recompiled.

                          diff reports identical bin files. ( I suppose I could have directly edited the hex file ).

                          re-flash the board, windows dev mgr likes it - it is recognized as "Duet WiFi or Ethernet 3D printer control electronics (COM18)"

                          1 Reply Last reply Reply Quote 0
                          • doodad69undefined
                            doodad69
                            last edited by

                            I stole the conf_usb.h from the master tree, it seems a change was made there 4-9 ish to adjust these IDs.
                            If I use that file, it compiles/diffs/loads/recognizes just fine.

                            thanks for pointing me in the right direction, I really appreciate it.

                            1 Reply Last reply Reply Quote 0
                            • dc42undefined
                              dc42 administrators
                              last edited by

                              Looks like the conf_usb file in the downloadable zip archive in 1.18.1 release on github is not up to date with the version in the source tree. I'm sorry about that. I can't see any way to edit the archive, so I've added a note to the release.

                              Duet WiFi hardware designer and firmware engineer
                              Please do not ask me for Duet support via PM or email, use the forum
                              http://www.escher3d.com, https://miscsolutions.wordpress.com

                              1 Reply Last reply Reply Quote 0
                              • doodad69undefined
                                doodad69
                                last edited by

                                No biggie, I'm just glad it wasn't something fundamental - no apologies necessary.

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                Unless otherwise noted, all forum content is licensed under CC-BY-SA