PCIe adapter for Google Coral

Believe so, but unable to verify if they are working without the possiby newer driver.
Dev’s are not responding so not much I can do with Home Assistant OS. Might have to switch to something else then…
Should have been some option to get paid support… now it is either done or just complete silence which is quite annoying.

Use the Terminal & SSH Add-On for HA and run:

lsmod | grep apex
and
ls /dev/apex_0

[core-ssh]$ lsmod | grep apex
apex 16384 0
gasket 90112 1 apex, [permanent}

[core-ssh]$ ls /dev/apex_0
/dev/apex_0

had issue with my dual tpu m.2 card not showing up in a lenovo tiny by replacing the existing wifi card

any difference between the two you have? bios maybe? dont have any spare to swap out.

Same issue also here. I replaced the wifi module on a Asus PN41, but is not showing on the OS (ubuntu server 21.10).

I entered lspci and is not showing. I dont know if it is even working. Hope it to be a software problem. I dont mind if it will work only with one tpu, but I hope to make it work.

Hi i have also ordered the double tpu one and will receive it somewhere this week, waiting since september and also run Haos latest one on a thin client hp. I have the wifi module slot free for it and don’t mind for now that only one side of the chip will be active. But did you get it to work in frigate? And if yes how? I am not that technical but can follow instructions. Did you mind sharing your experience since i saw you were busy with it since i think 2021.

Hi,

I consider to buy a PCIe 1x to m.2 adapter which has 2 slots for B+M cards.
https://www.amazon.nl/MZHOU-Adapter-Controller-Uitbreidingskaart-Profile/dp/B0B424Z26D/

The reason for PCIe 1x is that i only have that slot left on the main board.

Anyone tried this before?
Any advice is more then welcome :wink:

@TheStigh Which PCIe-to-mini PCIe converter did you get? I found two on Amazon. There’s this Startech PEX2MPEX and this random brand.

Right now, as of April 2023, the Mini PCIe Accelerator is the only Coral available, so I’m hoping to find an adapter card that works. I’m also not sure about the power ports on those PCI-E adapters. The second one has a voltage selector switch and SATA power. Any idea what voltage to select or if SATA power is necessary?

EDIT: I found a Reddit comment which says the HP WN7004 works. I just ordered it to try it out. It’s not on Newegg anymore, but I found one on eBay.

I’m a new user so I can’t post more than two links. Here’s the Reddit link: https://www.reddit.com/r/homeassistant/comments/vtckye/in_stock_pci_adapter_for_mini_pcie_coral/ig1rjcs/

Hi,

Are you using the Dual TPU version? Up until now, the only working adapters I know of has been from this Russian guy but I don’t know if he still produce/sell at these times (obviously).

I’ve got both Single and Dual TPU versions of Coral.

UPDATE:

This are in stock, for Dual TPU cards :slight_smile:

2 Likes

Got the WN7004 too, and can confirm it is working (OMV6/Frigate)

1 Like

I got one of these a few days ago. Works perfectly. Both TPU’s are showing.

Just picked up one off ebay for £10. Fingers crossed it will work for me, too. Planning single TPU not dual.

If the WN7004 doesnt pan out, this looks like a good cheap alternative mini PCIE to PCIE 1x adaptor: https://www.amazon.co.uk/dp/B07TK9KMT5/ref=sspa_dk_detail_1?psc=1&pd_rd_i=B07TK9KMT5

Feeding back that Mini PCIE coral TPUs will not work under ESXI hypervisor.
Apparantly proxmox is working but not ESXI.

Has anyone had luck getting a single coral mini-pcie card working with hardware pci passthrough? I have tried with a KVM host and a Proxmox host. The /dev/apex_0 device is present in the VM, but when added to Frigate cannot find the Coral.

Output from an ssh terminal:

➜  ~ ls -l /dev/apex_0
crw-------    1 root     root      120,   0 May 29 15:57 /dev/apex_0
➜  ~ lsmod | grep apex
apex                   20480  0
gasket                110592  1 apex,[permanent]

The Frigate config is:

detectors:
  coral_pci:
    type: edgetpu
    device: PCI

The result in the Frigate log is:

2023-05-30 00:48:46.353904975  [2023-05-29 17:48:46] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as PCI
2023-05-30 00:48:46.354767852  [2023-05-29 17:48:46] frigate.detectors.plugins.edgetpu_tfl ERROR   : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.

Did you get it working?
The frigate config docs state that the format should be eg pci:0:

detectors:
  coral1:
    type: edgetpu
    device: pci:0
  coral2:
    type: edgetpu
    device: pci:1

James,
Thanks for the suggestion, I changed the config to:

detectors:
  coral_pci:
    type: edgetpu
    device: pci:0

and am still getting a detection error:

2023-06-04 18:33:31.426481741  [2023-06-04 11:33:31] detector.coral_pci             INFO    : Starting detection process: 371
2023-06-04 18:33:31.432546990  [2023-06-04 11:33:31] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as pci:0
2023-06-04 18:33:31.433233917  Process detector:coral_pci:
2023-06-04 18:33:31.433270771  [2023-06-04 11:33:31] frigate.detectors.plugins.edgetpu_tfl ERROR   : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.
1 Like

I’m having the same problem. It’s a Lenovo m92p mini PC that never had wifi so I put one of these in it. I am unable to blacklist apex and gasket, and am unable to get frigate to start with the same error that it can’t find an edge. Were you able to get this working?

1 Like

I had similar problems until I ensured that in my machine’s BIOS settings, I enabled the wireless device option. I theorize that this option controls not anything specific to wireless networking, but rather the PCIe socket in which the optional wireless card would otherwise be installed.

I replaced the wireless card in a Dell Optiplex 9020 USFF/micro with a Google Coral M.2 Accelerator with A+E key, part number G650-04527-01. In the system BIOS settings, I disabled the WLAN and Bluetooth settings, thinking that there was no reason to have them enabled when the necessary device had been removed. In Hassos, I found no /dev/apex* and no apex kernel module loaded.

I rebooted, entered BIOS setup, altered Settings >> Wireless >> Wireless Device Enable >> WLAN/WiGig: enabled. Saved change, rebooted, and found in HA that /dev/apex_0 exists, kernel modules apex and gasket are loaded, and Frigate finds my TPU.

To further verify, I rebooted, disabled the WLAN option again, booted, found no sign of the TPU in Home Assistant, then rebooted, enabled the option, booted, and it’s there again.

I’m running:

  • Home Assistant 2023.5.4
  • Supervisor 2023.06.1
  • Operating System 10.2
  • Frigate add-on 0.12.0

PCI memory conflicts can be a real hard thing to figure out.

The PCI Coral device needs to be visible to the host OS, or nothing else will happen:

execute:

sudo lspci -v

and you should find the Coral device in the program’s output:

08:00.0 System peripheral: Global Unichip Corp. Coral Edge TPU (prog-if ff)
	Subsystem: Global Unichip Corp. Coral Edge TPU
	Flags: bus master, fast devsel, latency 0, IRQ 16
	Memory at f0100000 (64-bit, prefetchable) [size=16K]
	Memory at f0000000 (64-bit, prefetchable) [size=1M]
	Capabilities: [80] Express Endpoint, MSI 00
	Capabilities: [d0] MSI-X: Enable+ Count=128 Masked-
	Capabilities: [e0] MSI: Enable- Count=1/32 Maskable- 64bit+
	Capabilities: [f8] Power Management version 3
	Capabilities: [100] Vendor Specific Information: ID=1556 Rev=1 Len=008 <?>
	Capabilities: [108] Latency Tolerance Reporting
	Capabilities: [110] L1 PM Substates
	Capabilities: [200] Advanced Error Reporting
	Kernel driver in use: apex
	Kernel modules: apex