Problem with USB recognition of DuetWiFi with self compiled code



  • 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


  • administrators

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



  • 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?



  • 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.


  • administrators

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



  • 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.



  • 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


  • administrators

    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.



  • 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?



  • 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?



  • 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)"



  • 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.


  • administrators

    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.



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


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.