Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

access the device by serial number #3

Closed
zengpy17 opened this issue Jul 11, 2020 · 12 comments
Closed

access the device by serial number #3

zengpy17 opened this issue Jul 11, 2020 · 12 comments

Comments

@zengpy17
Copy link

I am very appreciate of your work and I have tried to make a DIGIT following the guidance. However, when I tried to access the device by serial number, the device could not be recognized. The same problem happened again after adding DIGIT udev Rule. Then, I called the DigitHandler.list_digits() from digit_interface.digit_handler and it returned an empty list.
I have no idea why this happened, since I used Ubuntu 18.04 in VirtualBox to operate and flashed firmware to DIGIT without encountering any error, which means that DIGIT could be recognized by my computer.

@AlphaBetaPhi
Copy link
Contributor

Hello @zengpy17,

Thank you for your interest.

Does the device show up when you run "lsusb"?

@zengpy17
Copy link
Author

Yes, it shows up as:
ID 0403:0fde Future Technology Devices International, Ltd

@AlphaBetaPhi
Copy link
Contributor

Hi @zengpy17,

That's good news, could you try downloading the toolchain

And then upload the binary with "Program via USB (DFU) interface" in the FT900ProgGUI tool.

@zengpy17
Copy link
Author

zengpy17 commented Jul 13, 2020

Thanks for your reply!
I had downloaded the toolchain and tried to flash "digit-2020-1a.bin" to the device.
However, when I click the "start" bottuon, it warned me as follow:

Binary file is not padded and does not contain a valid dfu-suffix
Do you want to continue?

So what should I do now?

@AlphaBetaPhi
Copy link
Contributor

Hi @zengpy17,

You may continue with that warning.

@zengpy17
Copy link
Author

Thanks a lot! It worked finally.

@lzyplayer
Copy link

Thanks! That did solve the prob. And how to change ID since it got default ID DXXXX?

@AlphaBetaPhi
Copy link
Contributor

@lzyplayer, after flashing the initial binary, use the provided programmer through the digit-design repository. Specify the binary and the serial you would like to program, for serial D00001,

python3 flash.py digit.firmware="example.bin" digit.serial=1

@lzyplayer
Copy link

lzyplayer commented Jul 28, 2020

@AlphaBetaPhi, thanks for the reply!
After flashing the initial binary on Windows with the toolchain you provided, Ubuntu seems cannot recognized DIGIT correctly, lsusb command no longer show Future Technology Devices International, Ltd device. Instead, a device with no name will show up when plug DIGIT in.

***@***:~$ lsusb
Bus 001 Device 057: ID 2833:0209  

And I have tried the provided programmer through the digit-design repository. It give me message below, seems no download happened.

***@***:***$ python3.7 flash.py digit.serial=45
DIGIT programmer config:
digit:
  serial: 45
  firmware: ../digit-2020-1a.bin
usb:
  idVendor: 10291
  idProduct: 521

INFO:DigitProgrammer:Attempting to find DIGIT serial mask in ../digit-2020-1a.bin binary.
INFO:DigitProgrammer:Found serial pattern...
INFO:DigitProgrammer:Serial number written to new firmware binary.
INFO:DigitProgrammer:Flashing DIGIT firmware...
Unplug and plug DIGIT into usb then press ENTER...
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
dfu-util: No DFU capable USB device available
INFO:DigitProgrammer:Finished flashing firmware to DIGIT!

However, It can be detected by digit-interface with serial DXXXX and is able to show video flow. Besides, setting LED does not work, while log seems fine.

@AlphaBetaPhi
Copy link
Contributor

Hi @lzyplayer, @zengpy17,

There has been a firmware update in the digit-design repository which now works with the flash.py programmer. You do not need to download the toolchain.

@lzyplayer
Copy link

lzyplayer commented Jul 31, 2020

@AlphaBetaPhi , thanks for informing!
I'm trying to update firmware form digit-2020-1a.bin todigit-2020-1b.bin.
Download start successfully after I keep refreshing command dfu-util -D digit_firmware_tmp.bin under workfolder. It turns out DIGIT takes about 3~5 seconds to start up, then 3 seconds in DFU mode, then DIGIT work mode.
However, another problem occurs during downloading

$   dfu-util -D digit_firmware_tmp.bin
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

dfu-util: DFU suffix CRC does not match
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 0403:0fde
Run-time device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 256
Copying data from PC to DFU device
Download	[======================== ]  96%       248064 bytes failed!
state(10) = dfuERROR, status(8) = Cannot program memory due to received address that is out of range

Currently, I'm using FT900Q-C-R instead of FT900Q-R as main controller. Maybe not enough memory?

@AlphaBetaPhi
Copy link
Contributor

@lzyplayer,

Looks like the DFU is already installed on your DIGIT, I have uploaded the base firmware for future firmware upgrades. Please git pull and try;

python flash.py digit.firmware="../digit-2020-1b.bin" digit.serial=123

Where digit.serial=123 is your serial number, example D00045 is digit.serial=45.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants