Setup Bridged Wireless Access Point on Raspberry Pi 4

                                         +- RPi -------+
                                     +---+ 10.10.0.2   |          +- Laptop ----+
                                     |   |     WLAN AP +-)))  (((-+ WLAN Client |
                                     |   |  Bridge     |          | 10.10.0.5   |
                                     |   +-------------+          +-------------+
                 +- Router ----+     |
                 | Firewall    |     |   +- PC#2 ------+
(Internet)---WAN-+ DHCP server +-LAN-+---+ 10.10.0.3   |
                 |   10.10.0.1 |     |   +-------------+
                 +-------------+     |
                                     |   +- PC#1 ------+
                                     +---+ 10.10.0.4   |
                                         +-------------+
[Read More]

Upgrade Fedora 36 to Fedora 37

  • Update Fedora 36:

    sudo dnf upgrade --refresh
    
  • Reboot.

  • Install dnf-plugin-system-upgrade if not installed:

    sudo dnf install dnf-plugin-system-upgrade
    
  • Download Fedora 37 packages:

    sudo dnf system-upgrade download --releasever=37
    
  • Start upgrading. This will reboot machine:

    sudo dnf system-upgrade reboot
    
  • Wait until upgrading finish.

References

https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/

fedora 

Raspberry Pi 4 as Routed Wireless Access Point



                                         +- RPi -------+
                                     +---+ 192.168.1.2 |          +- Laptop ----+
                                     |   |     WLAN AP +-)))  (((-+ WLAN Client |
                                     |   | 192.168.3.1 |          | 192.168.3.2 |
                                     |   +-------------+          +-------------+
                 +- Router ----+     |
                 | Firewall    |     |   +- PC#1 ------+
(Internet)---WAN-+ DHCP server +-LAN-+---+ 192.168.1.3 |
                 | 192.168.1.1 |     |   +-------------+
                 +-------------+     |
                                     |   +- PC#2 ------+
                                     +---+ 192.168.1.4 |
                                         +-------------+
[Read More]

Get actual elapse time in CPP

#include <chrono>

int main() {
	std::chrono::time_point <std::chrono::system_clock, std::chrono::duration<double, std::milli>> then = std::chrono::high_resolution_clock::now();;

	// ... do something ...

	std::chrono::time_point <std::chrono::system_clock, std::chrono::duration<double, std::milli>> now = std::chrono::high_resolution_clock::now();;
	double elapseTimeInMS = (now - then).count();

	return 0;
}

Shorter:

#include <chrono>

using namespace std;

int main() {
	auto then = chrono::high_resolution_clock::now();

	// ... do something ...

	auto now = chrono::high_resolution_clock::now();
	double elapseTimeInMS = chrono::duration<double, milli>(now - then).count();

	return 0;
}
cpp