Category Archives: Uncategorized

Free SSL Certificate / Zertifikat

Let’s Encrypt
Let’s Encrypt Glossar

ZeroSSL – FREE SSL Certificate Wizard

Wie Sie ein Let’s Encrypt Zertifikat erstellen und in ein Webhosting-Produkt einbinden

Web-Server

How to Secure Apache with SSL and Let’s Encrypt in FreeBSD
NameBasedSSLVHosts
NameBasedSSLVHostsWithSNI

Mail-Server

Certbot: Let’s Encrypt TLS-Zertifikate für Mailserver (Deprecated!)

Wildcard

Generate Wildcard SSL certificate using Let’s Encrypt/Certbot
Wildcard Domain Step-By-Step
ACME v2 Production Environment & Wildcards

Weiterleitung

Weiterleitung auf HTTPS einrichten
Apache2 http zu https Umleitung
QuickTipp: Weiterleitung (redirect) von HTTP auf HTTPS via Apache oder Htaccess

Multiple SSL Certificates with One IP Address

Server Name Indication (SNI)
Using Multiple SSL Certificates in Apache with One IP Address
Apache SNI Browser Support
Multi-Domain (SAN) Certificates – Using Subject Alternative Names
Was ist Server Name Indication (SNI)?
SSL vs. TLS – Worin bestehen die Unterschiede?
SNI (Server Name Indication)

pf

pfctl cheat sheet

py36-certbot

# pkg install py36-certbot
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 24 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        py36-certbot: 0.35.1,1
        py36-openssl: 19.0.0
        py36-cryptography: 2.6.1
        py36-six: 1.12.0
        py36-cffi: 1.12.3
        py36-pycparser: 2.19
        py36-asn1crypto: 0.24.0
        py36-josepy: 1.2.0
        py36-acme: 0.35.1,1
        py36-requests-toolbelt: 0.8.0
        py36-requests: 2.21.0
        py36-chardet: 3.0.4_1
        py36-certifi: 2019.6.16
        py36-urllib3: 1.22,1
        py36-pysocks: 1.7.0
        py36-idna: 2.8
        py36-pytz: 2019.1,1
        py36-pyrfc3339: 1.1
        py36-zope.interface: 4.6.0
        py36-zope.component: 4.2.2
        py36-zope.event: 4.1.0
        py36-parsedatetime: 2.4_1
        py36-configobj: 5.0.6_1
        py36-configargparse: 0.14.0

Number of packages to be installed: 24

The process will require 27 MiB more space.
7 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/24] Fetching py36-certbot-0.35.1,1.txz: 100%  458 KiB 468.8kB/s    00:01
[2/24] Fetching py36-openssl-19.0.0.txz: 100%   86 KiB  87.8kB/s    00:01
[3/24] Fetching py36-cryptography-2.6.1.txz: 100%  326 KiB 334.0kB/s    00:01
[4/24] Fetching py36-six-1.12.0.txz: 100%   19 KiB  18.9kB/s    00:01
[5/24] Fetching py36-cffi-1.12.3.txz: 100%  200 KiB 205.0kB/s    00:01
[6/24] Fetching py36-pycparser-2.19.txz: 100%  164 KiB 167.6kB/s    00:01
[7/24] Fetching py36-asn1crypto-0.24.0.txz: 100%  156 KiB 159.3kB/s    00:01
[8/24] Fetching py36-josepy-1.2.0.txz: 100%   73 KiB  75.3kB/s    00:01
[9/24] Fetching py36-acme-0.35.1,1.txz: 100%  125 KiB 128.2kB/s    00:01
[10/24] Fetching py36-requests-toolbelt-0.8.0.txz: 100%    4 MiB   1.6MB/s    00:03
[11/24] Fetching py36-requests-2.21.0.txz: 100%   82 KiB  84.4kB/s    00:01
[12/24] Fetching py36-chardet-3.0.4_1.txz: 100%  154 KiB 157.9kB/s    00:01
[13/24] Fetching py36-certifi-2019.6.16.txz: 100%  145 KiB 148.0kB/s    00:01
[14/24] Fetching py36-urllib3-1.22,1.txz: 100%  157 KiB 161.1kB/s    00:01
[15/24] Fetching py36-pysocks-1.7.0.txz: 100%   23 KiB  23.8kB/s    00:01
[16/24] Fetching py36-idna-2.8.txz: 100%   76 KiB  78.2kB/s    00:01
[17/24] Fetching py36-pytz-2019.1,1.txz: 100%  157 KiB 160.4kB/s    00:01
[18/24] Fetching py36-pyrfc3339-1.1.txz: 100%    8 KiB   8.1kB/s    00:01
[19/24] Fetching py36-zope.interface-4.6.0.txz: 100%  190 KiB 194.7kB/s    00:01
[20/24] Fetching py36-zope.component-4.2.2.txz: 100%   91 KiB  93.4kB/s    00:01
[21/24] Fetching py36-zope.event-4.1.0.txz: 100%    8 KiB   7.8kB/s    00:01
[22/24] Fetching py36-parsedatetime-2.4_1.txz: 100%   57 KiB  58.3kB/s    00:01
[23/24] Fetching py36-configobj-5.0.6_1.txz: 100%   51 KiB  52.1kB/s    00:01
[24/24] Fetching py36-configargparse-0.14.0.txz: 100%   24 KiB  24.5kB/s    00:01
Checking integrity... done (0 conflicting)
[1/24] Installing py36-pycparser-2.19...
[1/24] Extracting py36-pycparser-2.19: 100%
[2/24] Installing py36-six-1.12.0...
[2/24] Extracting py36-six-1.12.0: 100%
[3/24] Installing py36-cffi-1.12.3...
[3/24] Extracting py36-cffi-1.12.3: 100%
[4/24] Installing py36-asn1crypto-0.24.0...
[4/24] Extracting py36-asn1crypto-0.24.0: 100%
[5/24] Installing py36-cryptography-2.6.1...
[5/24] Extracting py36-cryptography-2.6.1: 100%
[6/24] Installing py36-openssl-19.0.0...
[6/24] Extracting py36-openssl-19.0.0: 100%
[7/24] Installing py36-pysocks-1.7.0...
[7/24] Extracting py36-pysocks-1.7.0: 100%
[8/24] Installing py36-idna-2.8...
[8/24] Extracting py36-idna-2.8: 100%
[9/24] Installing py36-chardet-3.0.4_1...
[9/24] Extracting py36-chardet-3.0.4_1: 100%
[10/24] Installing py36-certifi-2019.6.16...
[10/24] Extracting py36-certifi-2019.6.16: 100%
[11/24] Installing py36-urllib3-1.22,1...
[11/24] Extracting py36-urllib3-1.22,1: 100%
[12/24] Installing py36-requests-2.21.0...
[12/24] Extracting py36-requests-2.21.0: 100%
[13/24] Installing py36-pytz-2019.1,1...
[13/24] Extracting py36-pytz-2019.1,1: 100%
[14/24] Installing py36-josepy-1.2.0...
[14/24] Extracting py36-josepy-1.2.0: 100%
[15/24] Installing py36-requests-toolbelt-0.8.0...
[15/24] Extracting py36-requests-toolbelt-0.8.0: 100%
[16/24] Installing py36-pyrfc3339-1.1...
[16/24] Extracting py36-pyrfc3339-1.1: 100%
[17/24] Installing py36-zope.interface-4.6.0...
[17/24] Extracting py36-zope.interface-4.6.0: 100%
[18/24] Installing py36-zope.event-4.1.0...
[18/24] Extracting py36-zope.event-4.1.0: 100%
[19/24] Installing py36-acme-0.35.1,1...
[19/24] Extracting py36-acme-0.35.1,1: 100%
[20/24] Installing py36-zope.component-4.2.2...
[20/24] Extracting py36-zope.component-4.2.2: 100%
[21/24] Installing py36-parsedatetime-2.4_1...
[21/24] Extracting py36-parsedatetime-2.4_1: 100%
[22/24] Installing py36-configobj-5.0.6_1...
[22/24] Extracting py36-configobj-5.0.6_1: 100%
[23/24] Installing py36-configargparse-0.14.0...
[23/24] Extracting py36-configargparse-0.14.0: 100%
[24/24] Installing py36-certbot-0.35.1,1...
[24/24] Extracting py36-certbot-0.35.1,1: 100%

Message from py36-urllib3-1.22,1:
Be careful, support of IPv6 is broken with PySocks 1.5.7.

Message from py36-certbot-0.35.1,1:
===========================================================================

This port installs the "standalone" client only, which does not use and
is not the certbot-auto bootstrap/wrapper script.

The simplest form of usage to obtain certificates is:

 # sudo certbot certonly --standalone -d <domain>, [domain2, ... domainN]>

NOTE:

The client requires the ability to bind on TCP port 80 or 443 (depending
on the --preferred-challenges option used). If a server is running on that
port, it will need to be temporarily stopped so that the standalone server
can listen on that port to complete the challenge authentication process.

For more information on the 'standalone' mode, see:

  https://certbot.eff.org/docs/using.html#standalone

The certbot plugins to support apache and nginx certificate installation
will be made available in the following ports:

 * Apache plugin: security/py-certbot-apache
 * Nginx plugin: security/py-certbot-nginx

===========================================================================
# certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
No certs found.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
  Certificate Name: ns3.te-clan.ch
    Domains: ns3.te-clan.ch
    Expiry Date: 2019-11-17 07:43:26+00:00 (VALID: 89 days)
    Certificate Path: /usr/local/etc/letsencrypt/live/ns3.te-clan.ch/fullchain.pem
    Private Key Path: /usr/local/etc/letsencrypt/live/ns3.te-clan.ch/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# certbot certonly --standalone -d XXX
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): XXX

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: a

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for ns3.te-clan.ch
Waiting for verification...
Challenge failed for domain ns3.te-clan.ch
http-01 challenge for ns3.te-clan.ch
Cleaning up challenges
Some challenges have failed.

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: ns3.te-clan.ch
   Type:   connection
   Detail: dns :: DNS problem: NXDOMAIN looking up A for
   ns3.te-clan.ch

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A/AAAA record(s) for that domain
   contain(s) the right IP address. Additionally, please check that
   your computer has a publicly routable IP address and that no
   firewalls are preventing the server from communicating with the
   client. If you're using the webroot plugin, you should also verify
   that you are serving files from the webroot path you provided.
 - Your account credentials have been saved in your Certbot
   configuration directory at /usr/local/etc/letsencrypt. You should
   make a secure backup of this folder now. This configuration
   directory will also contain certificates and private keys obtained
   by Certbot so making regular backups of this folder is ideal.

# ping ns3.te-clan.ch
ping: cannot resolve ns3.te-clan.ch: Unknown host

### DNS CONFIG ###

# ping ns3.te-clan.ch
PING ns3.te-clan.ch (185.72.247.169): 56 data bytes
64 bytes from 185.72.247.169: icmp_seq=0 ttl=64 time=0.162 ms
64 bytes from 185.72.247.169: icmp_seq=1 ttl=64 time=0.159 ms

# certbot certonly --standalone -d ns3.te-clan.ch
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for ns3.te-clan.ch
Waiting for verification...
Cleaning up challenges

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /usr/local/etc/letsencrypt/live/ns3.te-clan.ch/fullchain.pem
   Your key file has been saved at:
   /usr/local/etc/letsencrypt/live/ns3.te-clan.ch/privkey.pem
   Your cert will expire on 2019-11-17. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot
   again. To non-interactively renew *all* of your certificates, run
   "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le
# service apache24 stop
Stopping apache24.
Waiting for PIDS: 46220.

# certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /usr/local/etc/letsencrypt/renewal/ns3.te-clan.ch.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert is due for renewal, auto-renewing...
Plugins selected: Authenticator standalone, Installer None
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for ns3.te-clan.ch
Waiting for verification...
Cleaning up challenges

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
new certificate deployed without reload, fullchain is
/usr/local/etc/letsencrypt/live/ns3.te-clan.ch/fullchain.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Congratulations, all renewals succeeded. The following certs have been renewed:
  /usr/local/etc/letsencrypt/live/ns3.te-clan.ch/fullchain.pem (success)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$ certbot certonly --server https://acme-v02.api.letsencrypt.org/directory --manual --preferred-challenges dns -d 'domain.XXX,*.domain.XXX'

named_update

#!/usr/bin/env perl
use warnings;
use strict;

my $name = "test";

my $num_args = $#ARGV + 1;
if ($num_args != 3) {
    print "\nUsage: $0 <domain> <TXT1> <TXT2>\n";
    exit;
}

my ($domain, $txt1, $txt2) = @ARGV;
my @txt = ($txt1, $txt2);

my $dir = '/var/named/etc/namedb/master/';
my $filename = $dir . 'db.' . $domain;

print("${filename}:\n");
open(my $rd, "<", $filename) or die "Could not open file '$filename'";

my @lines = <$rd>; 
close($rd);

open(my $wr, ">", $filename);
my $challenge = 0;
my $challenge_line = 0;

foreach my $i (0 .. $#lines) {
    my $line = $lines[$i];

    # overwrite the 1. and 2. line after the challenge
    if ($challenge == 1 && $challenge_line > ($i - 3)) {
        $wr->print("@                       TXT     \"" . $txt[$i - $challenge_line - 1] . "\"\n");
    } else {
        $wr->print($line);
    }

    # detect challenge
    if ($line =~ /\_acme-challenge/) {
        $challenge = 1;
        $challenge_line = $i;
        print("Found challenge!\n");
    }
}
close($wr);

print("Kill named\n");
my $out = `pkill named`;
print($out);
sleep(2);

print("Start named\n");
$out = `service named start`;
print($out);

FreeBSD 12 & BIND 914

FreeBSD: Install an authoritative DNS server (BIND) (with DNSSEC)

pkg install bind914
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 13 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        bind914: 9.14.3
        libxml2: 2.9.9
        libidn2: 2.2.0
        libunistring: 0.9.10_1
        bind-tools: 9.14.3
        python36: 3.6.9
        readline: 8.0.0
        libffi: 3.2.1_3
        py36-ply: 3.11
        py36-setuptools: 41.0.1
        libedit: 3.1.20190324,1
        json-c: 0.13.1
        lmdb: 0.9.23,1
[...]
Message from python36-3.6.9:

===========================================================================

Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:

py36-gdbm       databases/py-gdbm@py36
py36-sqlite3    databases/py-sqlite3@py36
py36-tkinter    x11-toolkits/py-tkinter@py36

===========================================================================
Message from bind914-9.14.3:

BIND requires configuration of rndc, including a "secret"
key.  The easiest, and most secure way to configure rndc is
to run 'rndc-confgen -a' to generate the proper conf file,
with a new random key, and appropriate file permissions.

The /usr/local/etc/rc.d/named script will do that for you.

If using syslog to log the BIND9 activity, and using a
chroot'ed installation, you will need to tell syslog to install
a log socket in the BIND9 chroot by running:

  # sysrc altlog_proglist+=named

And then restarting syslogd with: service syslogd restart

Test / Analyzer

MX Toolbox – SuperTool
DNS Checker
Verisign Labs – DNSSEC Analyzer

$ ls /usr/local/etc/namedb
namedb -> /var/named/etc/namedb

$ ls -la /var/named
dev
etc
usr
var

$ ls -la /var/named/etc/namedb
bind.keys
dynamic
master
named.conf
named.root
rndc.key
slave
working

$ cat /etc/fstab
# Device        Mountpoint      FStype    Options           Dump    Pass#
/dev/ada0p2     /               ufs       rw                1       1
/dev/ada0p3     none            swap      sw                0       0
/dev/ada0p4     /var            ufs       rw                2       2
/dev/ada0p5     /tmp            ufs       rw                2       2
/dev/ada0p6     /usr            ufs       rw                2       2
fdesc           /dev/fd         fdescfs   rw                0       0
devfs           /var/named/dev  devfs     rw,ruleset=4      0       0
$ /usr/local/sbin/named -fg -t /var/named -u bind -c /usr/local/etc/namedb/named.conf

Qt: evileg.com Qt/C++ – Tutorial

Evgenij Legotskoj

Qt/C++ – Lesson 004. QSqlTableModel – How to present the table from database?
Qt/C++ – Lesson 008. QDataWidgetMapper – Working with the database via a widget
Qt/C++ – Lesson 019. How to paint triangle in Qt5. Positioning shapes in QGraphicsScene
Qt/C++ – Lesson 021. The drawing mouse in Qt
Qt/C++ – Lesson 027. Polymorphism in Qt by the example of geometric shapes in QGraphicsScene
Qt/C++ – Lesson 036. QWebView – How to make simple browser on the Qt
Qt/C++ – Lesson 045. SvgReader on the Qt. Loading data from SVG file into QGraphicsScene
Qt/C++ – Lesson 050. Logging Qt application events to a text file
Qt/C++ – Lesson 054. Reading data from a CSV file, and their representation via QStandardItemModel
Qt/C++ – Lesson 056. Connecting the Boost library in Qt for MinGW and MSVC compilers
Qt/C++ – Tutorial 063. Adding windows inside the main application window using QMdiArea
Qt/C++ – Tutorial 067. Using QMultiMap for a dictionary of synonyms
Qt/C++ – Tutorial 068. Hello World using the CMAKE build system in CLion
Qt/C++ – Tutorial 069. XOR Encryption
Qt/C++ – Tutorial 070. Crop image using QGraphicsScene
Qt/C++ – Tutorial 072. An example of a vector editor on Qt
Qt/C++ – Tutorial 073. Signals and slots. Connecting Slots to Overloaded Signals in the Qt5 Syntax
Qt/C++ – Tutorial 075. Improving the syntax of signals and slots in Qt 5.7 and above for overloaded signals and slots
Qt/C++ – Tutorial 076. Visualizing Mathematical Formulas on Qt
Qt/C++ – Tutorial 078. Do not mix the old syntax of signals and slots on SIGNAL SLOT macros with new syntax on pointers
Qt/C++ – Tutorial 079. foreach vs range-based for in C++11?
Qt/C++ – Tutorial 081. How to make a base class for widgets using ui form files
Qt/C++ – Tutorial 082. Custom widgets in the Qt Designer
Qt/C++ – Tutorial 083. Creating a dynamic library and connecting it to another project
Qt/C++ – Tutorial 084. How to run JavaScript code in a C ++ application using the example of working with two variables
Qt/C++ – Tutorial 086. Using QSequentialAnimationGroup and QPropertyAnimation to move a button
Qt/C++ – Tutorial 087. Get the maximum number of multiple input fields QLineEdit
Qt/C++ – Tutorial 088. Text search with highlighting in QTextEdit

WinAPI

Qt WinAPI – Lesson 009. SetWindowsHookEx – Logging mouse events via WinAPI

LaTeX: Custom Titles / Sections

KOMA-Script

Nice customised titlepage for every section (scrartcl)

\AtBeginDocument
\def\section
\def\@sec
\renewcommand\sectionlinesformat
\newcommand\sectionpreamble

Incompatibilies

Incompatibilities between KOMA-Script and titlesec

Standard-Classes

The titlesec and titletoc Packages (PDF)
Spacing before and after section titles

\usepackage{titlesec}

\titlespacing{\section}{0em}{0em}{0em}

\titleformat{\section}[frame]
{}
{}
{}
{}

Windows 10 Bluetooth SPP – Two Virtual COM Ports

1

Bluetooth Serial Port settings for Windows10 PC
It is true that with Windows own Bluetooth software two virtual COM ports are created after pairing:

  • when connecting your terminal program to the first you are actually instructing Windows to attempt to establish the Bluetooth connection to the remote paired device, and if the connection is established the RFCOMM channel will be opened for the exchange of data
  • when connecting your terminal program to the second you are actually instructing Windows to load the SPP SDP record and to remain waiting for incoming connections from the remote paired device.

2

difference between incomming BT com-port and outgoing?

  • An incoming port is used when a remote device established a connection to your device, and is exposed as the SerialPort service to the remote device.
  • An outgoing port is used to make a connection to the serial port service on a remote device (e.g. GPS Receiver).

3

*TWO* virtual serial ports created on Windows (BT121 class SPP)

How to find Bluetooth settings in Windows 10
Virtual Bluetooth adapter settings on windows 10

ESP32 Task Starvation / Starve / Preemption / Preempt

ESP32 Developer – Priority
Arduino ESP32 FreeRTOS 2: How to use Task Parameter – Task Priorities – Task Handle – Idle Task Hook

There are 3 types of scheduling: Co-operative Scheduling and Prioritized Pre-emptive Scheduling with time slicing and without time slicing.

  • Prioritized Pre-emptive Scheduling with time slicing:
    task with higher priority will pre-empt the tasks that have lower priority. And tasks that have the same priority will run in turn every time tick interrupt occurs (RTOS has a timer interrupt to measure the time, every time the interrupt occurs RTOS will check that it is time to unblock or wake a task).
  • Prioritized Pre-emptive Scheduling without time slicing:
    task with higher priority will pre-empt the tasks that have lower priority. And tasks that have the same priority will not run in turn every time tick interrupt occurs (the task that is running, will continue running until it is pre-empted by high priority task).
  • Co-operative Scheduling:
    context switch occur when running task change from Running state to Blocked state or call taskYIELD(). The next running task is the task that has highest priority and is in Running state.

Watchdogs, Interrupt Watchdog Timer (IWDT), Task Watchdog Timer (TWDT)
Clarifications on freeRTOS
ESP-IDF, multicore & freeRTOS confusion

> Does freeRTOS uses a preemptive scheduler on ESP-idf?
Yes

> 1. Given
> core 0 runs a priority 10 task,
> core 1 runs a priority 12 task
> and a priority 11 task is awoken.
– If the priority 11 task is pinned to core 0 or has no core affinity, the priority 11 task will preempt on core 0.
– If the priority 11 task is pinned to core 1, core 1 will not preempt.

> 3. A high priority task that never calls vTaskDelay will eat
> all the resources and never let lower priorities run, right?
If the high priority task is pinned to a core, then it will starve the lower priority tasks on that core from cpu time. However if the high priority task as no core affinity, it can be possible that the task will bounce between the two cores, giving the lower priority task on each core a chance to run. However, writing a task function that never blocks is very poor application design. We guard against cpu starvation using the task watchdog timer.

ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac

Serial done!
RS485 done!

99 GT2
E (11904) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (11904) task_wdt:  - IDLE0 (CPU 0)
E (11904) task_wdt: Tasks currently running:
E (11904) task_wdt: CPU 0: taskTempCurrent
E (11904) task_wdt: CPU 1: IDLE1
E (11904) task_wdt: Aborting.
abort() was called at PC 0x400e63cb on core 0

Backtrace:
0x4008ba20:0x3ffbe170 0x4008bc51:0x3ffbe190 0x400e63cb:0x3ffbe1b0
0x40084775:0x3ffbe1d0 0x4000bfed:0x3ffb45d0 0x4008952d:0x3ffb45e0
0x400885af:0x3ffb4600 0x400e457f:0x3ffb4620 0x400e33a1:0x3ffb4640
0x400d17bd:0x3ffb4660 0x400d18a8:0x3ffb4680 0x400d1a12:0x3ffb46c0
0x40088661:0x3ffb46f0

Rebooting...