Search found 10 matches

by ntesla
Fri 12. Mar 2021, 07:10
Forum: Linux
Topic: A PCAN Channel has not been initialized
Replies: 5
Views: 5974

Re: A PCAN Channel has not been initialized

Hi,

I am able to run code successfully here is my output:

Code: Select all

PCAN-USB was initialized
PCAN_USB (Ch-x): Status is OK
Message sent successfully
PCAN-USB was UN-initialized
by ntesla
Thu 11. Mar 2021, 14:28
Forum: Linux
Topic: A PCAN Channel has not been initialized
Replies: 5
Views: 5974

Re: A PCAN Channel has not been initialized

I can send message using pcanview
1. peak-linux-driver-8.11.0
2. I am not sure about which variant I installed. I did following steps while installing the driver:
make clean
make
sudo make install
3. 4.9.201
4. No I haven't try Pcanbasic examples yet. How can I run a PcanBasic example? I am just ...
by ntesla
Thu 11. Mar 2021, 13:55
Forum: Linux
Topic: A PCAN Channel has not been initialized
Replies: 5
Views: 5974

A PCAN Channel has not been initialized

Hi,

I installed PCAN linux driver and PCAN basic. I don't understand why I am facing this issue.
Here is the error:


File "send_one.py", line 33, in <module>
send_one()
File "send_one.py", line 18, in send_one
bus = can.interface.Bus(bustype='pcan', channel='PCAN_USBBUS1', bitrate=250000 ...
by ntesla
Fri 9. Oct 2020, 15:35
Forum: Linux
Topic: Constant Cycle time using Python
Replies: 5
Views: 6160

Re: Constant Cycle time using Python

Okay,
I think I partially solve the problem. When I comment out just the time.sleep(1) , It doesn't give me exact cycle time but it gives me kindly constant value. (around 65ms, instead of 200ms)
https://i.hizliresim.com/TCznJw.png

On the other hand, When I don't comment out the time.sleep(1 ...
by ntesla
Fri 9. Oct 2020, 11:16
Forum: Linux
Topic: Constant Cycle time using Python
Replies: 5
Views: 6160

Re: Constant Cycle time using Python

Yes, I am using PCAN-Basic API for linux.

I try this code :
import logging
import time
import can
from can.interface import Bus

can.rc['interface']='pcan'
can.rc['channel']='PCAN_USBBUS1'
can.rc['bitrate']=500000
bus=Bus()
logging.basicConfig(level=logging.INFO)

def simple_periodic_send(bus ...
by ntesla
Fri 9. Oct 2020, 08:34
Forum: Linux
Topic: Constant Cycle time using Python
Replies: 5
Views: 6160

Constant Cycle time using Python

Hi,

I want send a message through the PCAN-USB every 50ms using Python. Cycle time should not change or fluctuate. Which code I should use?

Thanks for reply.
by ntesla
Thu 9. Jul 2020, 10:49
Forum: Linux
Topic: CanBus on Jetson Nano
Replies: 6
Views: 10537

Re: CanBus on Jetson Nano

Which driver should I install netdev or chardev?
Actually I dont think driver is the problem. When I install the driver, can0 doesn't show up in ifconfig which I mentioned above
by ntesla
Thu 9. Jul 2020, 10:23
Forum: Linux
Topic: CanBus on Jetson Nano
Replies: 6
Views: 10537

Re: CanBus on Jetson Nano

After uninstalling linux driver, it doesnt work bash: receivetest: command not found. Does PCAN-USB need peak linux driver?
I just want to send basic messages using python.
by ntesla
Thu 9. Jul 2020, 08:40
Forum: Linux
Topic: CanBus on Jetson Nano
Replies: 6
Views: 10537

Re: CanBus on Jetson Nano

Okay I saw this post and I uninstalled the linux driver. Now I can see can0 when I type ifconfig -a
can0: flags=128<NOARP> mtu 16
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 ...
by ntesla
Wed 8. Jul 2020, 14:14
Forum: Linux
Topic: CanBus on Jetson Nano
Replies: 6
Views: 10537

CanBus on Jetson Nano

Hi,
I have this product https://www.peak-system.com/PCAN-USB.199.0.html?&L=1
I am trying to implement some computer vision applications with jetson nano but I couldn't figure out how the car will communicate with the Jetson nano.
This command doesnt give any response lsmod | grep ^peak
I installed ...