# How to list down all the channels available for pcan using python-pcan library?

**URL:** <https://discuss.python.org/t/how-to-list-down-all-the-channels-available-for-pcan-using-python-pcan-library/47665>\
**Category:** Python Help\
**Created:** [March 5, 2024, 1:53pm UTC](https://discuss.python.org/t/how-to-list-down-all-the-channels-available-for-pcan-using-python-pcan-library/47665 "2024-03-05T13:53:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikram\_kashelikar](https://avatars.discourse-cdn.com/v4/letter/v/58956e/32.png) [@vikram\_kashelikar](https://discuss.python.org/u/vikram_kashelikar)\
**Post date:** [March 5, 2024, 1:53pm UTC](https://discuss.python.org/t/how-to-list-down-all-the-channels-available-for-pcan-using-python-pcan-library/47665/1 "2024-03-05T13:53:49Z")

</div>

How to list down all the channels available for pcan using python-pcan library?  
I used following:

```python
canConfig = can.detect_available_configs(interfaces='pcan')

```

But the above function returns only one channel i.e. PCAN\_USBBUS1.  
Since the laptop has more than 1 USB port how to detect all the channels?  
Your help is appreciated.  
Thanks in advance.

Regards,  
Vikram A. Kashelikar

---

<div class="post-metadata">

**Author:** ![abessman](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/abessman/32/8367_2.png) [@abessman](https://discuss.python.org/u/abessman)\
**Post date:** [March 5, 2024, 2:28pm UTC](https://discuss.python.org/t/how-to-list-down-all-the-channels-available-for-pcan-using-python-pcan-library/47665/2 "2024-03-05T14:28:01Z")

</div>

I can’t find a python-pcan package online. Did you mean the PCAN module of [python-can](https://python-can.readthedocs.io)?

If `detect_available_configs` only returns PCAN\_USBBUS1, that means the underlying driver could only detect that channel. If PCAN provides a utility to view available channels, you can check whether it detects the same number of channels as python-can.

> Since the laptop has more than 1 USB port how to detect all the channels?

Just to clarify, do you have multiple PCAN-USB adapters? If you only have the one adapter you will only have one channel, regardless of how many USB ports your computer has.

---

<div class="post-metadata">

**Author:** ![vikram\_kashelikar](https://avatars.discourse-cdn.com/v4/letter/v/58956e/32.png) [@vikram\_kashelikar](https://discuss.python.org/u/vikram_kashelikar)\
**Post date:** [March 5, 2024, 2:39pm UTC](https://discuss.python.org/t/how-to-list-down-all-the-channels-available-for-pcan-using-python-pcan-library/47665/3 "2024-03-05T14:39:06Z")

</div>

Hello dear Alexander,

Thanks for the response.  
I tried with two PCANs connected to two different USB ports and ran my code.  
for both PCANs even if the USB ports were different it showed same channel number PCAN\_USBBUS1.  
I will provide you the link for python-pcan package documentation:  
“chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/[https://python-can.readthedocs.io/\_/downloads/en/2.2.0/pdf/](https://python-can.readthedocs.io/_/downloads/en/2.2.0/pdf/)”  
To install the package you need to run the following command:  
“pip install python-can”

Thanks and Regards,  
Vikram Kashelikar

---

<div class="post-metadata">

**Author:** ![abessman](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/abessman/32/8367_2.png) [@abessman](https://discuss.python.org/u/abessman)\
**Post date:** [March 5, 2024, 3:00pm UTC](https://discuss.python.org/t/how-to-list-down-all-the-channels-available-for-pcan-using-python-pcan-library/47665/4 "2024-03-05T15:00:26Z")

</div>

> [@vikram\_kashelikar](#):
>
> link for python-pcan package documentation:

That package is called python-can, not python-pcan. That version of the documentation is also very old; 2.2.0 was released in 2018. You should use a more recent version.

You must verify that the PCAN driver can detect your channels. python-can is just a wrapper around this driver; if the driver doesn’t see the second channel, neither will python-can.

---

<div class="post-metadata">

**Author:** ![moosemaimer](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/moosemaimer/32/15091_2.png) [@moosemaimer](https://discuss.python.org/u/moosemaimer)\
**Post date:** [March 5, 2024, 3:05pm UTC](https://discuss.python.org/t/how-to-list-down-all-the-channels-available-for-pcan-using-python-pcan-library/47665/5 "2024-03-05T15:05:09Z")

</div>

> Parameters interfaces – either - the name of an interface to be searched in as a string, - an  
> iterable of interface names to search in, _or - None to search in all known interfaces._

It might be worth running a search with `interfaces=None` once, just to see what it returns.

---

<div class="post-metadata">

**Author:** ![vikram\_kashelikar](https://avatars.discourse-cdn.com/v4/letter/v/58956e/32.png) [@vikram\_kashelikar](https://discuss.python.org/u/vikram_kashelikar)\
**Post date:** [March 5, 2024, 3:16pm UTC](https://discuss.python.org/t/how-to-list-down-all-the-channels-available-for-pcan-using-python-pcan-library/47665/6 "2024-03-05T15:16:04Z")

</div>

Interfaces=None returns a lot of information most of it is error because my laptop has only pcan connected with hardware and nothing else.  
As far as pcan information in the details provided by setting interfaces=None it shows only PCAN\_USBBUS1 only with the device id of my pcan.

Thanks and Regards,  
Vikram Kashelikar

---

<div class="post-metadata">

**Author:** ![vikram\_kashelikar](https://avatars.discourse-cdn.com/v4/letter/v/58956e/32.png) [@vikram\_kashelikar](https://discuss.python.org/u/vikram_kashelikar)\
**Post date:** [March 5, 2024, 3:24pm UTC](https://discuss.python.org/t/how-to-list-down-all-the-channels-available-for-pcan-using-python-pcan-library/47665/7 "2024-03-05T15:24:58Z")

</div>

Hello Alexander,

Where to get the driver information on google.  
I searched google links by giving following search query:  
“python-can is a wrapper around which driver?”

Do you know any link for the same.  
It will be great help if you can provide me the link to the driver or the right search query for google.

Thanks and Regards,  
Vikram Kashelikar

---

<div class="post-metadata">

**Author:** ![abessman](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/abessman/32/8367_2.png) [@abessman](https://discuss.python.org/u/abessman)\
**Post date:** [March 5, 2024, 4:17pm UTC](https://discuss.python.org/t/how-to-list-down-all-the-channels-available-for-pcan-using-python-pcan-library/47665/8 "2024-03-05T16:17:23Z")

</div>

python-can wraps many different CAN drivers. Since you are using PCAN hardware, in your case it wraps [PCAN’s driver](https://www.peak-system.com/Drivers.523.0.html?&L=1). You already have this driver installed, or python-can wouldn’t find any PCAN channels.

The PCAN driver includes two utilities, [PEAK-settings](https://www.peak-system.com/PEAK-Settings.571.0.html?&L=1) and [PCAN-view](https://www.peak-system.com/PCAN-View.242.0.html?&L=1), which may tell which channels are detected by the driver.
