Use ETAS ES582 on Ubuntu 20.04



ES582 – USB CAN FD Bus Interface by ETAS, not supported by python-can for now(20210717), but engineers from Bosch/ETAS have commit code to Linux Kernel, can be found in 5.13+.

Kernel version of Ubuntu 20.04 is 5.8.x, download latest stable kernel from Kernel PPA Mainline, 5.13.2 for now. https://kernel.ubuntu.com/~kernel-ppa/mainline/

Download 3 “generic” debs for your arch, and install by dpkg -i, reboot.

Next, lsmod | grep etas, if it’s not loaded by default, load by sudo modprobe etas_es58x.

Plug your ES582 into USB, sudo dmesg check if it’s recognized, then ip a, you should be able to see can0 and can1.

ES582 is so EXPENSIVE. To test the CAN/CANFD, get a DB9 connector and connect like this.

Now we get CAN High and CAN low connected like on a CAN BUS, we’re able to communicate between CAN0 and CAN1.

Then we configure can0 and can1 to support CANFD.

sudo ip link set can0 type can bitrate 1000000 triple-sampleing on fd on dbitrate 2000000

sudo ip link set can0 up

Same on can1.

Install can-utils and in terminal 1 send to can0 and terminal 2 dump on can1.

cansend can0 211##1112233445566

candump -L can1

MORE

Available options for ip command: https://www.kernel.org/doc/Documentation/networking/can.txt



Use ETAS ES582 on Ubuntu 20.04 by @sskaje: https://sskaje.me/2021/07/use-etas-es582-on-ubuntu-20-04/

Use TCP_HYBLA on Ubuntu

Linode Tokyo, change to distribution kernel follow this post: Linode Tokyo XEN Linux Switch to Distribution Kernel

Reboot, and go.

To load on boot, add module names to /etc/modules

You are not authorised to read all content in this post.

Please login…

Use TCP_HYBLA on Ubuntu by @sskaje: https://sskaje.me/2016/10/tcp_hybla-ubuntu/

Incoming search terms:

自建 6in4 Tunnel Server (iproute2)

IPv4下连IPv6有无数种解决方案,传统的6to4, 6in4, TEREDO…没兴趣讲优缺点,可以在wikipedia的页面上看看各家都用了啥。

TunnelBroker.net 应该是没IPv6的地方最流行的上IPv6的解决方案了。
如果你觉得它不爽,其实自己搞一个也没那么难。

上边wikipedia页面里说HE的技术实现是Unknown。其实自己试过一次大概都能知道应该往哪个方向去研究它的技术实现了。

贴一个我路由器上的IPv6 Tunnel信息。

首先,UBNT给我创建的interface是tun0;其次 Link encapsulation 是 IPv6-in-IPv4,也就是传说中的 6in4;再往下看,POINTOPOINT
再加上TunnelBroker的Example Configurations里给了一个iproute2的配置方法:

思路很简单了。

假设服务器端为S,用户路由为R,则两边的参数逻辑应该是:
S:

Remote: R.ipv4
Local: S.ipv4
V6 IP: S.ipv6
Route: v6子网/CIDR

R:

Remote: S.ipv4
Local: R.ipv4
V6 IP: R.ipv6
Route: ::/0 即默认路由

具体来说,假设你S的IP为1.1.1.1,可支配的IPv6 pool为 2400:1234:5678:9abc::/64,R的IP为2.2.2.2,上述的配置可能是:

S.ipv4 = 1.1.1.1
S.ipv6 = 2400:1234:5678:9abc:1000::1/80

v6子网/CIDR = 2400:1234:5678:9abc:2000::/80

R.ipv4 = 2.2.2.2
R.ipv6 = 2400:1234:5678:9abc:1000::2/80

命令还不会的,可以阅读Setup of point-to-point tunnel

接下来还有一个问题,我的公网不是固定IP怎么办?
简单。
对于S端来说,Remote依旧是R.ipv4,必须是确定的IP。
对于R端来说,Local可以是0.0.0.0。
每次R更换IP后,需要通知S来更新Remote。

再搞不定?
没问题,看我的github项目:https://github.com/sskaje/6in4

另外,Linode 可以申请IPv6的池子,可以是 /56 或者 /64,可以自建tunnel玩。

自建 6in4 Tunnel Server (iproute2) by @sskaje: https://sskaje.me/2016/01/create-your-own-tunnelbroker-net-iproute2/

Incoming search terms:

Debian Live USB Change Brightness on Thinkpad

Thinkpad X201 Tablet.
Debian 8.2.0 Live CD USB Stick.

Steps:
1 su to root

2 set brightness

Debian Live USB Change Brightness on Thinkpad by @sskaje: https://sskaje.me/2016/01/debian-live-usb-change-brightness-thinkpad/

Reset Terminal

If you’re using Terminal on OS X, just try ‘Send Reset‘ and ‘Send Hard Reset‘ in File menu.

Fix terminal size

Often occurs after screen.
Sometimes, try Control(ctrl)+L,
sometimes, try

Random characters after cat a binary file, often in SecureCRT

Unix: How to fix UNIX garbage characters in your terminal
QQ20140903-1
Run:

Press: Control(ctrl)+v, Control(ctrl)+o, Enter, Control(ctrl)+d

Newline does not work

Output like:

Run:

More…

These links might be helpful.
http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-4.html
http://www.cyberciti.biz/tips/bash-fix-the-display.html
http://docstore.mik.ua/orelly/unix/upt/ch42_04.htm

Reset Terminal by @sskaje: https://sskaje.me/2015/10/reset-terminal/