16 lines
331 B
PHP
16 lines
331 B
PHP
<?php
|
|
$wfd = di_can_open("vcan0");
|
|
$rfd = di_can_open("vcan0");
|
|
|
|
$msg = [];
|
|
$msg['msgtype'] = DI_CAN_MSGTYPE_RAW;
|
|
$msg['ttype'] = DI_CAN_TRANSFERTYPE_REPLY;
|
|
$msg['dtype'] = 0x405;
|
|
$msg['src_id'] = 0xdeadbeef;
|
|
$msg['dst_id'] = 0xcafebabe;
|
|
|
|
di_can_send($wfd, $msg);
|
|
$rep = di_can_recv($rfd);
|
|
print_r($rep);
|
|
di_can_close($wfd);
|