• icon-germany
  • icon-webcam
  • icon-denmark
Posted on

Danskprøve A2 eksempel – Danish test A2 example

I’ve e-mailed Udlændinge- og Integrationsministeriet (UIM) as they no longer host the Danskprøve A1 or Danskprøve A2 exam examples.

In the interim to UIM resuming hosting of the Danskprøve A1 or Danskprøve A2 exam examples I am providing the Danskprøve A2 exam example here. Good luck with your exam!

(I do not have a copy of the Danskprøve A1 exam example to share)

Switching from Synology’s WordPress end-of-life package to Web Station

I installed the WordPress package when setting up my Synology NAS, it’s been running without fault for years but due to lack of package updates has reached end of life. Time to migrate to Web Station!

The WordPress package maintained by Synology is locked to PHP 5.6 and Apache HTTP Server 2.2 meaning there’s no upgrade path for either PHP or Apache HTTP Web Server.

Here’s how to migrate from the Synology WordPress package to Web Station:

  1. Connect to DSM and log in as an Administrator, or user with read/write access to Web Station files at /web/ as well as the following DSM Apps
    • File Manager
    • Package Centre
    • Web Station
  2. Open File Station and navigate to the /web/wordpress/ directory
  3. Copy the /web/wordpress/ directory contents to a new temporary directory away from Web Station (e.g. /backup/wordpress/…)
  4. Open Package Centre
  5. Search for “Apache” and install the Apache HTTP Server 2.4 package
  6. Search for “PHP” and install the PHP 7.3 package
  7. Open Web Station
  8. From the Status tab ensure that both Apache HTTP Server 2.4 and PHP 7.3 are listed within the Back-end Packages section and marked as Installed.
  9. Switch to the PHP Settings tab
  10. Create a new Profile by clicking the Create button, set the following fields within the popup dialog:
    • Profile Name: Default profile
    • Description: Default PHP 7.3 profile
    • PHP version: PHP 7.3
    • Enable PHP cache
    • Select any PHP extensions you require, if unsure check against the default extensions already enabled from the default PHP 5.6 profile on the PHP Settings tab
    • Click OK to create the new Profile
  11. Switch to the Virtual Host tab
  12. Create a new Virtual Host by clicking the Create button, set the following fields within the popup dialog:
    • Hostname: wordpress
    • Port: 80 / 443
    • Document root: Click the Browse button and navigate to the /web/wordpress/ directory
    • HTTP back-end server: Apache HTTP Server 2.4
    • PHP: Default Profile (PHP 7.3)
    • Click OK to create the new Virtual Host
  13. Open Package Centre
  14. Search for “WordPress” and select Uninstall from the Actions dropdown
  15. Accept the confirmation prompt that you wish to uninstall this package
  16. When prompted if you wish to delete the WordPress database leave the tickbox unchecked and do not fill the database login fields; we want to keep the existing WordPress database
  17. Click Uninstall to remove the WordPress package
  18. Open File Station and copy the temporary backup directory (e.g. /backup/wordpress/…) back to /web/wordpress/
  19. Open Web Station and switch to the Virtual Hosts tab
  20. Ensure that the Sub-folder Name column for the wordpress Virtual Host is still set as /web/wordpress, if this is blank edit the Virtual Host and re-link it to /web/wordpress/
  21. That’s it!

Open up your browser and navigate to your WordPress site to confirm the migration was successful. You can now change the HTTP back-end server and PHP version at any time via Web Station! Pretty nifty. 🙂

Hardware build list for a close distance passing unit

Tired of being close passed when commuting and not knowing whether you have a legitimate MPD (Minimum Distance Passing) violation to forward to authorities?

This is a multi-part Post where I will be posting build instructions and Python scripts to interface with the Maxbotix MB8450 ultrasonic sensor (an industrial fit-for-purpose ultrasonic sensor) to log distances over time and generate a readable log file that can be overlayed ontop of front and rear camera footage within RaceRender or VIRB Edit (RIP DashWare). If I get it working I’ll also include how to sync GoPro’s with Bluetooth/RC support to start recording when the RPi Zero commences sensor logging so front/rear footage is synced.

Here’s the build list for building your own close distance passing unit for measuring the distance between your right-most handlebar edge and passing vehicles.

  1. Raspberry Pi Zero (Datasheet)
  2. A battery pack capable of an output voltage of 5V at 2A and above, e.g. Topeak Mobile Powerpack 6000 mAh (Datasheet)
  3. Maxbotix MB8450 Car Detection Sensor (Datasheet)
  4. A USB micro cable to connect the battery pack to the RPi Zero

What’s in the list?

Ultrasonic sensor: The Maxbotix MB8450 is a high performance USB proximity detection sensor that is weather resistant and intended for vehicle detection within vehicle kiosks, ATMs, and bank drive-through environments. It is widely supported, easy to integrate with and its supported range from 50cm to 500cm makes it ideal for this application. In real-world tests it reliably returns distance echos of 0.3s with expected performance benefits (increased echos per second) when interfaced via C program over Python scripts.

The MB8450 is made up of two components, the ultrasonic sensor (transducer) and the PCB logic board.

  • The sensor is weather resistant and can be mounted on the right-hand edge of the handlear; or anywhere on the bike frame where its beam is not obstructed. It provides range data to the PCB logic board.
  • The PCB logic board processes the range data, cleans it up and passes it onto the RPi Zero via the USB connector. It is not weather resistant and needs to be protected.

Battery pack: The Topeak Mobile Powerpack 6000 mAh has dual USB outputs supporting up to 2A making it ideal for powering the RPi Zero, it turns on automatically when a current draw is detected and powers off shortly after devices cease. The battery pack can be mounted on the handlebar stem, anywhere on a bicycle frame using a GoPro mount or with some effort under the seat.

RPi Zero & PCB board: Due to the length of cabling from the ultrasonic sensor to the PCB board I chose to keep the PCB board of the ultrasonic sensor and RPI Zero within the saddle bag with a single USB micro cable running into the saddle bag. The PCB board and RPi Zero due to their small size could be mounted within a “tool box water bottle” or within a self-contained, weather resistant storage box.


What’s next?

I’ll be posting RPi Zero build scripts and the Python scripts to generate log files when able including BitBucket repo link, a little time limited at the moment due to other projects. Thanks for reading.

Drive safe, ride safe, get home safe. 🙂

Working Windows 10 tutorial for the Dell XPS 15 9550 + Razer Core X + GeForce GTX 970

I’ve been researching eGPU’s and compatibility with the Dell XPS 9550 for over a year and started 2019 committed to purchasing the Razer Core X eGPU enclosure and Gigabyte GeForce GTX 970 to resolve the thermal throttling and fan noise issues affecting the XPS series when used as a workhorse or gaming Ultrabook.

Getting it to work through trial and error sucked. Driver conflicts.
Conflicting device resources. BIOS firmware updates. Thunderbolt firmware updates.

This walkthrough should save you the frustration I went through.

The end result is fantastic! Here’s the benefits:

  • Dramatically lowered thermal profile for the XPS 15 even with the lid closed; no more throttling!
  • No fan noise coming from the XPS 15 even when under load (CSGO, video encoding, heavy Chrome GPU usage)
  • Didn’t need to apply thermal pads to MOSFET’s or re-paste the CPU and GPU
  • Consistently better framerate without thermal throttling when playing CSGO and improved responsiveness in general usage across multiple screens (2 x Dell U2414H 24″ monitors)

Here’s the walkthrough:

  1. Seat the GeForce GTX 970 in the Razer Core X enclosure
  2. Connect power to the Razer Core X enclosure
  3. Do not connect any USB devices to your monitors yet. *1
  4. Do not connect the Razer Core X USB C cable to the XPS 15 9550 yet. *2
  5. Run Windows Update and ensure recent updates have been applied
  6. Restart Windows if any updates were installed
  7. Ensure the following Dell software packages have been installed:
    • Dell XPS 15 9550 1.9.0 System BIOS
    • Intel Thunderbolt Controller Driver
    • Intel(R) Thunderbolt(TM) 3 Firmware Update
    • Intel Thunderbolt Controller Driver
  8. Restart Windows if any of the above Dell software packages were installed
  9. Install Razer Synapse 2
  10. Install NVIDIA GeForce Experience
  11. Restart Windows if any of the above software packages were installed
  12. Open NVIDIA GeForce Experience and from the Drivers tab install the latest GeForce Game Ready Driver
  13. Restart Windows if required
  14. Open Device Manager from the System screen (START + Pause/Break) *3
  15. Expand the Display adapters group
  16. Right click NVIDIA GeForce GTX 960M and select Disable device *4
  17. While keeping the Device Manager window opened with the Display adapters group in focus open the Task Manager (right click the taskbar and select Task Manager)
  18. Within the Task Manager window select the Performance tab to see the GPU 0 item listed under CPU, Memory and Disk 0/Disk 1 *5
  19. Connect the Razer Core X USB C cable to the XPS 15 9550
  20. Over the next 30 seconds you should see the following:
    1. a prompt from Thunderbolt Software to allow device chaining, close it without answering *6
    2. the Device Manager window refresh several times
    3. a new “Unknown VGA device” appear within Device Manager
    4. the “Unknown VGA device” dissapear and be replaced with “NVIDIA GeForce GTX 970”
    5. hopefully no BSOD! *7
    6. the “NVIDIA GeForce GTX 970” device status will change from a question mark, to a notice, to finally a prompt to restart
    7. Do not restart Windows at this point
  21. Right click “NVIDIA GeForce GTX 970” and select Update drivers *8
  22. Within the Task Manager window you should see a new GPU 1 entry showing “NVIDIA GeForce GTX 970”
  23. Shut down Windows with the Razer Core X still connected
  24. Connect your USB devices to your monitors
  25. Start Windows and when prompted by Thunderbolt Software select “Allow connect” for device chaining over Thunderbolt.
  26. Open Task Manager and from the Performance tab ensure that the GeForce GTX 960M is not visible and that the GeForce GTX 970 is visible

That’s it! 🙂


*1: Thunderbolt 3 supports USB device chaining but introducing new USB devices before the eGPU is configured and working may introduce new issues.

*2: Connecting the Razer Core X to the XPS 15 9550 before having the NVIDIA software ready will result in BSOD’s as the onboard GeForce GTX 960M will conflict with the Core X’s GeForce GTX 970 for the same system resources.

*3: This one’s because I am paranoid. You may be able to skip this step.

*4: Disabling a GPU hardware device is not permanent. I found after each restart that the GeForce GTX 960M was re-enabled.

*5: You may need to double click the graph to expand the view so you can select the Performance tab within the Task Manager window

*6: We will allow all Thunderbolt device chaining once the GTX 970 is working.

*7: If you experience a BSOD when connecting the
Razer Core X ensure that the onboard GeForce GTX 960M is disabled from Device Manager

*8: If the Update driver option is not available disconnect the Razer Core X, restart Windows then follow steps 14 onwards

BIOS password recovery for ASUS laptops

To resolve a power button failure issue on an old ASUS UX32VD I needed to update the BIOS via EZ-Flash which as would happen was password protected. The BIOS platform used on this particular model has a known rescue password list to allow access.

Continue reading BIOS password recovery for ASUS laptops

Setting up a Cloudflare SSL certificate for Bitnami WordPress on Google Cloud Compute Engine

Bitnami WordPress on Google Cloud Compute Engine does not out of the box ship with SSL turned on, site owners need to secure communication to and from their website using SSL.

Here’s how to configure SSL using a free Cloudflare SSL certificate for Bitnami WordPress on Google Cloud Compute Engine.

Creating certificate files with Cloudflare

First we generate and download the SSL certificate files from Cloudflare.

    1. Open up your site profile on Cloudflare.com
    2. Switch to the Crypto tab
    3. Within the Origin Certificates section click the Create Certificate button
    4. Ensure the Let Cloudflare generate a private key and a CSR option is set to RSA
    5. Click Next
    6. With the Key format field set to PEM (Default) highlight and paste the contents of the Origin Certificate and Private Key blocks into separate new files on your Desktop:
      • Origin Certificate: server.crt
      • Private Key: server.key

Configuring Apache on your WordPress Bitnami instance

  1. Now we connect with SSH to the hosting server; your Google Cloud Compute Engine instance. You can do this via the Google Cloud Platform > Compute Engine > VM Instances > Connect with SSH or with your preferred terminal client.
    1. Open an SSH session to your Google Cloud Compute Engine instance
    2. Navigate to the /opt/bitnami/apache2/conf/ directory with the following terminal command:
       cd /opt/bitnami/apache2/conf/
    3. Delete or rename the existing server.crt and server.key files in this directory (I prefer to rename them to server.crt_legacy and server.key_legacy):
       sudo mv server.crt server.crt_legacy
       sudo mv server.key server.key_legacy
    4. Create two new files in their place:
       sudo touch server.crt
       sudo touch server.key
    5. With your preferred terminal text editor paste the contents of the two Cloudflare certificate files mentioned above into these new files on your hosting server
       sudo nano server.crt
       sudo nano server.key
    6. Restart the Apache service
      sudo /opt/bitnami/ctlscript.sh restart apache

Enable SSL within Cloudflare

  1. Open up your site profile on Cloudflare.com
  2. Switch to the Crypto tab
  3. Change the SSL dropdown from Flexible to Full
  4. Change the Always use HTTPS option to On
  5. Change the Automatic HTTPS Rewrites option to On

That’s it!

Toggle the System Monitor (CPU and memory) overlay on the Mazda Connect

Displaying the current CPU and memory usage of the Mazda Connect system helps to diagnose audio stuttering and slow screen changes common when using the Maps or third-party Apps (Android Auto, Speedometer, etc.).

Here’s how to toggle the system monitor overlay on the Mazda Connect system:

  1. Hold down Music + Back + Pwr/Mute for several seconds
  2. The system monitor overlay will appear in the top-right corner of the screen
  3. Release the buttons and on the touch screen select and hold the overlay element for several seconds to show the Linux performance monitor
  4. To hide the Linux performance monitor and system monitor overlay hold down  Music + Back + Pwr/Mute for several seconds

That’s it 🙂


Source: Mazda3Revolution

Turning off PageSpeed and OPcache in Bitnami Apache for Google Cloud Platform

Here’s how to turn off the Google PageSpeed module within Apache and PHP’s OPCache functionality that is enabled by default within Bitnami instances on Google Cloud Platform.

    1. Establish a terminal session to your Google Cloud Platform instance with your preferred terminal client (e.g. Putty).
    2. Open up /opt/bitnami/apache2/conf/httpd.conf with your preferred file editor and find the following lines:Include conf/pagespeed_libraries.conf
      Include conf/pagespeed.conf
    3. Comment them out to match the following lines:
      # Include conf/pagespeed.conf
      # Include conf/pagespeed_libraries.conf
    4. Save changes and return to terminal prompt.
    5. Open up /opt/bitnami/php/etc/php.ini with your preferred file editor and find the following line:opcache.enable=1
    6. Comment it out and disable opcache.enable by matching the following lines:
      # opcache.enable=1
    7. Save changes and return to terminal prompt.
    8. Restart the Apache service with the following command:
      sudo /opt/bitnami/ctlscript.sh restart apache

That’s it 🙂

Xiaomi Mi Router 3C recovery from System Error (Orange/Red LED)

Here’s how to un-brick the Xiaomi Mi Router 3C if it gets stuck in a System Error state (steady orange LED showing on the front of the unit) and upload a fresh firmware to bring it back to life.

Note: For my sanity I will refer to the red LED as orange) as it’s clearly not red.

  1. Visit the MiWiFi website and download the latest firmware (website is in Chinese, I recommend using Google Translate to navigate this website)
    1. Switch to the ROM section
    2. Download the Stable ROM for R3C (latest release at time of writing is 2.12.15)
  1. Connect an ethernet cable to the WAN Port ethernet connector (that’s the blue port closest to the power supply connector).
    Connect the other end of the ethernet cable to your computer/laptop (if your laptop does not have a ethernet port use a USB to Ethernet adapter)
  2. Find a paper clip and when ready pull the power cable on the Xiaomi Mi Router then press down firmly on the Reset button and re-connect the power supply
  3. Continue to hold down the Reset button for up to 10 seconds or until the front LED colour changes from steady orange (System Error) to flashing orange (Safe Mode)
  4. If the LED colour fails to change to flashing orange after some time rinse and repeat by pulling the power cable and re-connecting until the unit enters Safe Mode
  5. Here’s where things get interesting… if an IP address is automatically assigned to your device you can skip to step 6 (thanks DD).

    If an IP address has not been automatically assigned to your device then jump back to the first step and move the ethernet cable from the WAN Port to LAN Port 1 (shown as a single dot, beside the other LAN Port with two dots) on the Xiaomi Mi Router 3C.

    You will need to manually assign a IP address on your computer as the DHCP server on the router is not enabled in Safe Mode, set the following network options for your ethernet connection:

    1. IP address:
    2. Subnet mask:
    3. Default gateway:
    4. Preferred DNS server:
  6. Open up your preferred browser and enter into the address bar
  7. Upload the firmware file you downloaded earlier and wait a few minutes
  8. If the front LED does not change to blue within 5 minutes pull the power cable and put it back in and wait another few minutes for the router to boot up
  9. Check for nearby WiFi SSID’s, the Xiaomi Router should be available to connect and configure
  10. Undo your ethernet connection changes and configure your Xiaomi Router

That’s it.

How to connect the Xiaomi Mi Gateway to Domoticz

Out of the box the Xiaomi Mi Gateway does not allow other network-based devices to integrate with it, with a little bit of effort though you can enable LAN support for integration with Domoticz or other smart home platforms.

Here’s how to connect the Xiaomi Mi Gateway to Domoticz:

  1. Supply power to the Xiaomi Mi Gateway (you do not need to hard reset this device to enable LAN support)
  2. Open up the MiHome App (Android and App Store)
  3. From the Profile > Settings screen set to the Location field to “Mainland China”
  4. Open up the device detail screen for the Gateway device
  5. Click the triple dots button in the top-right corner of the screen to open the More screen
  6. Open the About screen
  7. At the bottom of the screen keep tapping the version number until a notice appears
  8. From the same screen open the Local Area Network Communication Protocol screen
  9. Slide the toggle element for “Local Area Network Communication Protocol” to enabled
  10. Note down the Password detail for later use in Domoticz (if the Password detail is blank or shows “password” click Confirm and re-open this screen
  11. Click the Confirm button to save changes and return to the More screen
  12. Open the Network Info screen and note the IP address for later use in Domoticz
  13. Switch to Domoticz and open up the Setup > Hardware screen
  14. From the Add new hardware section select Xiaomi Gateway from the Type list
  15. Set the Remote Address to the Xiaomi Mi Gateway IP address referenced above
  16. Set the Port Number to 9898
  17. Set the Password to the Xiaomi Mi Gateway password detail referenced above
  18. Click Add to add the new Xiaomi Mi Gateway to Domoticz
  19. Open up the Setup > Devices screen and check for new devices

That’s it 🙂

Give it some time for Domoticz to discover the new devices and you’re away, have fun!