What is the best way to list the device tree on Aero? I'd like to see what hardware can0 is connected to. I was expecting to see a /dev/spidev1.0 but only see can0.
Thank you for your interest in the Intel Aero Ready to Fly drone.
Could you please let us know what instructions have you used to list the device tree on the device? What is the OS that you have installed on your drone?
Thank you in advance,
I am running ubuntu 16.04 with the aero tools installed. I tried a couple commands to list the device tree, but I wasn't expecting them to work since intel aero uses efi, and many systems out there just have a static tree. I couldn't find a device tree in the standard locations such as /proc/device-tree or /sys/firmware/devicetree/ on my system.
I am trying to understand why I don't have /dev/spidev1.0 on my board, what node /dev/spidev1.1 is connected to. and how can0 is plumbed.
root@Aero:~$ sudo aero-get-version.py
BIOS_VERSION = Aero-01.00.16
OS_VERSION = Ubuntu 16.04.5 LTS"
AIRMAP_VERSION = unknown
FPGA_VERSION = 0xc2
AeroFC firmware version = unknown
root@Aero:~$ ifconfig -a
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Module Size Used by
bnep 13213 2
ipt_MASQUERADE 1725 1
nf_nat_masquerade_ipv4 2121 1 ipt_MASQUERADE
xt_conntrack 3657 1
ipt_REJECT 1649 2
nf_reject_ipv4 2739 1 ipt_REJECT
xt_tcpudp 3375 4
iptable_filter 1720 1
nf_nat_h323 7975 0
nf_conntrack_h323 49344 1 nf_nat_h323
nf_nat_pptp 4050 0
nf_nat_proto_gre 2157 1 nf_nat_pptp
nf_conntrack_pptp 8025 1 nf_nat_pptp
nf_conntrack_proto_gre 5180 1 nf_conntrack_pptp
nf_nat_tftp 1222 0
nf_conntrack_tftp 4721 1 nf_nat_tftp
nf_nat_sip 8861 0
nf_conntrack_sip 21810 1 nf_nat_sip
nf_nat_irc 1894 0
nf_conntrack_irc 4555 1 nf_nat_irc
nf_nat_ftp 2284 0
nf_conntrack_ftp 9983 1 nf_nat_ftp
iptable_nat 2087 1
nf_conntrack_ipv4 14222 2
nf_defrag_ipv4 1603 1 nf_conntrack_ipv4
nf_nat_ipv4 5467 1 iptable_nat
Thank you for the information!
Please try to use can-utils to send the data over the can bus.
Also, could you please let us know the output of uname -a?
$ uname -a
Linux Aero 4.4.76-aero-1.2 # 1 SMP PREEMPT Thu Dec 21 09:55:38 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
I have a custom CANBUS cable hooked up to the appropriate pins on the 80 pin expansion port, and the other end connected to a CANBUS ESC (ZUBAX). When I bring the can0 interface up, or attempt to use the can utils, I just don't see any signals on the bus, and cansend times out. Hence my interest to see how the hardware is plumbed. I do not have a flight controller board .
Do you have any suggestions on how I can determine what can0 is connected to in the device tree so i can debug my CAN communication issue ?
Thank you very much for the information provided!
Could you please let us know exactly how are you connecting the CAN device? If you are using the 80 Pin Accessory connector, it will not work as the CPU_CAN_H and CPU_CAN_L are not not exposed. However, they are exposed on the 80 pin expansion connector and you can build your own board around this.
80 pin connector pinout can be found in section 3.7 IO Expansion, page 10 and you can see what is exposed on the accessory cable on section 3.8 80-pin Accessories Connector Pinout Definition
The connector's part numbers are in the user manual section 3 Connector Specifications
Link to the Hardware Features and Usages: https://www.intel.com/content/dam/support/us/en/documents/drones/development-drones/intel-aero-compu... https://www.intel.com/content/dam/support/us/en/documents/drones/development-drones/intel-aero-compu...
This is a custom cable . If you click on the image in my post. You can see how this custom cable is connected to the CAN signals on the 80 pin expansion port.
Did the 1.6.2 bios eliminate /dev/spidev1.0 ? Is there a setting in the BIOS I need to be concerned about for chip select?
I am just not seeing any signals on the CAN_H and CAN_L lines. The cable has been thoroughly debugged.
We have tested this and we can confirm that the CAN bus is working. The kernel module was loaded with mxp251x. Here are the steps:
rmmod mcp251x && modprobe mcp251x
configured can0 with the following command:
ip link set can0 type can bitrate 125000 triple-sampling on
Brought up can0:
ifconfig can0 up
Receive data with:
Send data with:
cansend can0 5A1# 188.8.131.52.184.108.40.206https://github.com/intel-aero/meta-intel-aero/wiki/94-(References)-Sensors-GPIOs-LEDs-CAN-bus# can-controller-compute-board https://github.com/intel-aero/meta-intel-aero/wiki/94-(References)-Sensors-GPIOs-LEDs-CAN-bus# can-controller-compute-board
Are you able to configure and bring up the can0 interface? Could your please check the baudrate (this is the command: ip link set can0 type can bitrate 125000 triple-sampling on)
You can also check the Aero source code, as there were changes reading the mcp251x kernel module: https://github.com/intel-aero/meta-intel-aero-base/search?q=mcp251x&unscoped_q=mcp251x https://github.com/intel-aero/meta-intel-aero-base/search?q=mcp251x&unscoped_q=mcp251x
Thanks Eliza for the link to the mcp251x.
It looks like there were some changes to the mcp251x CAN driver related to ACPI. Since I am running UBUNTU with Linux Aero 4.4.76-aero-1.2 # 1 SMP PREEMPT Thu Dec 21 09:55:38 UTC 2017 . I am wondering if I have the latest mcp251x driver.
Yes, if you run the second command rmmod mcp251x && modprobe mcp251x
from: https://github.com/intel-aero/meta-intel-aero/wiki/94-(References)-Sensors-GPIOs-LEDs-CAN-bus# example-socketcan-configuration it will load the driver.
Just a quick update. I experienced errors after running rmmod and then modprobe. I think it was because there are several dependencies (e.g can_dev). My can0 interface disappeared and didn't return even across reboots. I ran modprobe a couple times and can0 finally seems to be doing what i expected. I hooked up a saleae logic analyzer, and I can detect a signal. All the documentation I have seen suggests using modprobe -r vs rmmod if there are dependencies. I will continue to work on getting my code running, but for now, I think we can close this issue.