-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get Started for Mac M2 #44
Comments
please try the steps mentioned here to install libusb. Thanks!! |
Thanks tried it, I get, bash-3.2$ brew install libusb ==> Downloading https://formulae.brew.sh/api/cask.jws.json Warning: libusb 1.0.26 is already installed and up-to-date. |
Please share the output of below command: brew info libusb |
(tensorflow-macos) bash-3.2$ brew info libusb |
Looks like the system python interpreter cannot find the libusb installed by brew. Can you try to install python via brew. |
Hi Hemanth (@hjonnala) you are a star contributor for this community. Thank you for your help. bash-3.2$ bash-3.2$ bash-3.2$ bash-3.2$ bash-3.2$ bash-3.2$ bash-3.2$ bash-3.2$ bash-3.2$ Hopefully this will help someone like me who using Apple Silicon Mac. Cheers! |
Hi, I have the same issue on Windows (WSL) ubuntu22 coralmicro$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 011: ID 18d1:9308 Google Inc. Coral Dev Board Micro
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
coralmicro$ python3 scripts/flashtool.py -e detect_faces
Finding all necessary files
Creating Filesystem
Section: 0x0
iMX bootable image generated successfully
Boot Section 0x00000000:
FILL | adr=0x00010000 | len=0x00000004 | ptn=0xc2000105
FILL | adr=0x00010004 | len=0x00000004 | ptn=0x00010020
FILL | adr=0x00010008 | len=0x00000004 | ptn=0x00040004
FILL | adr=0x0001000c | len=0x00000004 | ptn=0x00080004
FILL | adr=0x00010020 | len=0x00000004 | ptn=0xc0010021
ENA | adr=0x00010000 | cnt=0x00000004 | flg=0x0110
ERAS | adr=0x00000004 | cnt=0x00000004 | flg=0x0110
ERAS | adr=0x00000008 | cnt=0x00000004 | flg=0x0110
ERAS | adr=0x0000000c | cnt=0x00000040 | flg=0x0110
LOAD | adr=0x00000004 | len=0x00017854 | crc=0xdd594538 | flg=0x0110
LOAD | adr=0x00000008 | len=0x00017854 | crc=0x9b88b39a | flg=0x0110
STATE_CHECK_FOR_ANY
STATE_CHECK_FOR_CORAL_MICRO
STATE_RESET_TO_SDP
STATE_CHECK_FOR_SDP
Encountered an error during flashing: Unable to find device in SDP mode. After the error, the Coral Micro is not anylonger found is |
So one solution I found is to spam in powershell: usbipd wsl attach --busid 1-2 Then it will go through this step. next error is as follow: coralmicro$ python3 scripts/flashtool.py -e detect_faces
Finding all necessary files
Creating Filesystem
Section: 0x0
iMX bootable image generated successfully
Boot Section 0x00000000:
FILL | adr=0x00010000 | len=0x00000004 | ptn=0xc2000105
FILL | adr=0x00010004 | len=0x00000004 | ptn=0x00010020
FILL | adr=0x00010008 | len=0x00000004 | ptn=0x00040004
FILL | adr=0x0001000c | len=0x00000004 | ptn=0x00080004
FILL | adr=0x00010020 | len=0x00000004 | ptn=0xc0010021
ENA | adr=0x00010000 | cnt=0x00000004 | flg=0x0110
ERAS | adr=0x00000004 | cnt=0x00000004 | flg=0x0110
ERAS | adr=0x00000008 | cnt=0x00000004 | flg=0x0110
ERAS | adr=0x0000000c | cnt=0x00000040 | flg=0x0110
LOAD | adr=0x00000004 | len=0x00017854 | crc=0x93bf7879 | flg=0x0110
LOAD | adr=0x00000008 | len=0x00017854 | crc=0xf5171da3 | flg=0x0110
STATE_CHECK_FOR_ANY
STATE_CHECK_FOR_CORAL_MICRO
STATE_RESET_TO_SDP
STATE_CHECK_FOR_SDP
STATE_LOAD_FLASHLOADER
Traceback (most recent call last):
File "/home/casper/ml/coralmicro/scripts/flashtool.py", line 1193, in <module>
main()
File "/home/casper/ml/coralmicro/scripts/flashtool.py", line 1182, in main
RunFlashtool(StateCheckForAny, sbfile_path=sbfile_path,
File "/home/casper/ml/coralmicro/scripts/flashtool.py", line 821, in RunFlashtool
(prev_state, state) = (state, state(**state_kwargs))
File "/home/casper/ml/coralmicro/scripts/flashtool.py", line 543, in StateLoadFlashloader
subprocess.check_call([blhost_path, '-u', sdp_vidpid(), '--', 'load-image',
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/casper/ml/coralmicro/third_party/nxp/blhost/bin/linux/amd64/blhost', '-u', '0x1fc9,0x13d', '--', 'load-image', '/tmp/tmpudxc1pku/ivt_flashloader.bin']' returned non-zero exit status 1. |
You can use usbipd wsl attach --busid 1-2 -a The -a will make the usbipd service to keep looking for the busid even after it is disonnected for a short while. I changed line 543 of flashtool.py to: subprocess.DEVNELL->sys.stderr def StateLoadFlashloader(blhost_path, flashloader_path):
subprocess.check_call([blhost_path, '-u', sdp_vidpid(), '--', 'load-image',
flashloader_path], stdout=sys.stderr, stderr=subprocess.DEVNULL)
return StateCheckForFlashloader to see output: Error: UsbHidPeripheral() cannot open USB HID device (vid=0x1fc9, pid=0x013d, sn=). checking usbipd wsl list in powershell, I get the following two addresses: I guess the problem is that My version of usbipd is 2.4.1, I see the latest is 3.2.0, let me update and check if that works Edit: PS C:\WINDOWS\system32> usbipd wsl attach --busid 1-2 -a
usbipd: info: Using default WSL distribution 'Ubuntu-22.04'; specify the '--distribution' option to select a different one.
usbipd: warning: USB filter 'USBPcap' is known to be incompatible with this software; 'bind --force' will be required.
usbipd: info: Starting endless attach loop; press Ctrl+C to quit.
Attached
Detached
Attached
Detached
usbip: error: Attach Request for 1-2 failed - Device busy (exported)
Attached So as you can see, it attaches and detaches, but when the usb gets an new |
I tried updating the blhost binary, but same error Error: UsbHidPeripheral() cannot open USB HID device (vid=0x1fc9, pid=0x013d, sn=). |
Description
By following instruction in https://coral.ai/docs/dev-board-micro/get-started/#5-try-the-face-detection-example on Apple Silicon Mac, I get following error:
bash-3.2$ lsusb
Bus 000 Device 002: ID 18d1:9308 Google Inc. Coral Dev Board Micro Serial: 1b31080e829089dd
Bus 000 Device 000: ID 18d1:9308 Google Inc. USB 3.1 Bus
bash-3.2$ lsusb
Bus 000 Device 002: ID 18d1:9308 Google Inc. Coral Dev Board Micro Serial: 1b31080e829089dd
Bus 000 Device 000: ID 18d1:9308 Google Inc. USB 3.1 Bus
bash-3.2$ python3 scripts/flashtool.py -e detect_faces
Finding all necessary files
Creating Filesystem
Section: 0x0
iMX bootable image generated successfully
Boot Section 0x00000000:
FILL | adr=0x00010000 | len=0x00000004 | ptn=0xc2000105
FILL | adr=0x00010004 | len=0x00000004 | ptn=0x00010020
FILL | adr=0x00010008 | len=0x00000004 | ptn=0x00040004
FILL | adr=0x0001000c | len=0x00000004 | ptn=0x00080004
FILL | adr=0x00010020 | len=0x00000004 | ptn=0xc0010021
ENA | adr=0x00010000 | cnt=0x00000004 | flg=0x0110
ERAS | adr=0x00000004 | cnt=0x00000004 | flg=0x0110
ERAS | adr=0x00000008 | cnt=0x00000004 | flg=0x0110
ERAS | adr=0x0000000c | cnt=0x00000040 | flg=0x0110
LOAD | adr=0x00000004 | len=0x0001780c | crc=0x852c658e | flg=0x0110
LOAD | adr=0x00000008 | len=0x0001780c | crc=0xcbf635c8 | flg=0x0110
STATE_CHECK_FOR_ANY
STATE_CHECK_FOR_CORAL_MICRO
STATE_RESET_TO_SDP
STATE_CHECK_FOR_SDP
Python interpreter cannot find libusb, please install it.
Click to expand!
Issue Type
Build/Install
Operating System
Mac OS
Coral Device
Dev Board Micro
Other Devices
No response
Programming Language
Python 3.9
Relevant Log Output
The text was updated successfully, but these errors were encountered: