Problem with USB recognition of DuetWiFi with self compiled code


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


 

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