thx. Tested using BaegleBoneBlack and BananaPi later.
@Gerhard-Bertelsmann Thanks for your answer ! Do I understand it correctly that this board is like a dock for the Omega2+ and through a serial communication lib will read/write the CAN BUS ?
yes, that's right. It's using the SLCAN API which could be used in conjunction with SocketCAN. The firmware was mainly developed by Darron Broad
The PIC firmware is highly optimized so that there are lots of free cycles even under heavy load on the CAN-Bus.
Can you share more details of it and is it possible to buy it ?
Please have a look at:
It's working but the whole project is on hold due to the WiFi issues ...
Sorry, it isn't sold but I could share a PCB if you want. Please contact me by email
You have different choices for CAN on Omega2. The obvious way is using a MCP2515 connected to SPI. I'm not 100% sure if you can use hardware accelerated SPI on Omega2. The necessary pins seems to be connected to the pin header but Ralink/Mediatek SPI is normally half duplex and the MCP2515 kernel modul expect full duplex.
Another problem is the latency of the SPI Linux Framework. On high CANBus load packets might getting out of order or being lost.
For testing I've written a combined MCP2515-SPI (GPIO-Bitbanged) driver:
The results were better than expexcted - no packet loss on a saturated 250kbit CANBus.
As of today I'm prefering using a CAN2Serail converter based on a cheap PIC18F25K80. The Firmware was writen by Darron Broad. The serial to CAN conversion is amazing fast and is only limited by the serial speed. The good thing is the PIC could be flashed in circuit and the software, including assembler is part of an OpenWRT/Lede feed. If you are interested:
But: The easiest way is to use a USB based CAN Adapter, of course ;-)
I measured a raw "toogle speed" of 7.69MHz:
For your reference:
CPU | toggle speed ----------------|------------- RT3052@320MHz | 6.67 MHz AR9331@400MHz | 7.69 MHz AR9341@533MHz | 7.69 MHz MT7688@580MHz | 7.69 MHz
The toggle speed seems to be independent from the CPU speed.
It's really sad that only the blob wifi driver is stable. I've seen a 4.4.50 mtk-wifi in the wild (Widora). Did somebody testetd it ?
I would like to use the OpenWRT/Lede SDK because most of my work is based on it. I could live with a blob for a while (and with a Kernel 4.4.50) if the blob driver could be cleanly integrated in Lede build environment ...
I have a problem setting up a stock Lede Image (Reboot (SNAPSHOT, r3866-322a722)) as WiFi client. I getting follwoing log (partly copied):
[ 73.169182] wlan0: authenticate with c0:25:06:a2:ab:58 [ 73.193115] wlan0: send auth to c0:25:06:a2:ab:58 (try 1/3) [ 73.208673] wlan0: authenticated [ 73.218475] wlan0: associate with c0:25:06:a2:ab:58 (try 1/3) [ 73.285887] wlan0: RX AssocResp from c0:25:06:a2:ab:58 (capab=0x431 status=0 aid=3) [ 73.296354] wlan0: associated [ 79.388765] wlan0: disassociated from c0:25:06:a2:ab:58 (Reason: 2) [ 80.429614] wlan0: authenticate with c0:25:06:a2:ab:58 [ 80.453474] wlan0: send auth to c0:25:06:a2:ab:58 (try 1/3) [ 81.068250] wlan0: send auth to c0:25:06:a2:ab:58 (try 2/3) [ 82.068227] wlan0: send auth to c0:25:06:a2:ab:58 (try 3/3) [ 83.068230] wlan0: authentication with c0:25:06:a2:ab:58 timed out [ 88.089179] wlan0: authenticate with c0:25:06:a2:ab:58 [ 88.113038] wlan0: send auth to c0:25:06:a2:ab:58 (try 1/3) [ 88.127131] wlan0: authenticated [ 88.138342] wlan0: associate with c0:25:06:a2:ab:58 (try 1/3) [ 88.207698] wlan0: RX AssocResp from c0:25:06:a2:ab:58 (capab=0x431 status=0 aid=3) [ 88.218149] wlan0: associated [ 94.069667] wlan0: authenticate with c0:25:06:a2:ab:58 [ 94.089164] wlan0: send auth to c0:25:06:a2:ab:58 (try 1/3) [ 94.102877] wlan0: authenticated [ 94.108454] wlan0: associate with c0:25:06:a2:ab:58 (try 1/3) [ 94.191309] wlan0: RX AssocResp from c0:25:06:a2:ab:58 (capab=0x431 status=0 aid=3) [ 94.201786] wlan0: associated [ 98.196571] wlan0: deauthenticating from c0:25:06:a2:ab:58 by local choice (Reason: 3=DEAUTH_LEAVING)
The Wifi associates with the base station and disconnects again. With a Omega2 Image it does work. It there a difference in the WiFi driver ?
Here my config:
root@LEDE:/etc/config# cat wireless config wifi-device 'radio0' option type 'mac80211' option channel '11' option hwmode '11g' option path 'platform/10300000.wmac' option htmode 'HT20' option country 'DE' config wifi-iface 'default_radio0' option device 'radio0' option network 'wlan' option ssid 'Fischernetz' option mode 'sta' option encryption 'psk2' option key 'geheim' root@LEDE:/etc/config# cat network config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config globals 'globals' option ula_prefix 'fd8e:2845:f08a::/48' config interface 'lan' option type 'bridge' option ifname 'eth0' option proto 'dhcp' option ip6assign '60' config device 'lan_dev' option name 'eth0' option macaddr '40:a3:6b:c0:75:aa' config interface 'wlan' option ifname 'wlan0' option proto 'dhcp' config switch option name 'switch0' option reset '1' option enable_vlan '0'
root@LEDE:/# dmesg | grep mt76_wmac [ 10.243057] mt76_wmac 10300000.wmac: ASIC revision: 76280001 [ 12.292223] mt76_wmac 10300000.wmac: Firmware Version: _e2_mp [ 12.298076] mt76_wmac 10300000.wmac: Build Time: 20150211175503
Looks like your connection to Community was lost, please wait while we try to reconnect.