Connect ham radio rig to Cloudlog (Windows)

By connecting your amateur radio rig using a CAT/CI-V interface to Cloudlog you save a lot of work by getting frequency, mode etc directly from the rig into Cloudlog. This is how you do it using a Windows computer. The computer must be located where the radio is as it will be physically connected via the CAT/CI-V interface to the readio. Cloudlog is normally run on a web server on the Internet, i.e. not necessarily on the computer by the radio (hence the name, Cloudlog ;).

This is a very nice setup if you are running your station remotely. When logging into Cloudlog from a computer on your remote location, you can still get realtime frequency, mode etc from the radio into Cloudlog.

  1. In Cloudlog, click on your callsign (at right in the menu) and go to API keys. Create a new API key and copy it.
  2. Go to OmniRig, download it and install it
  3. Go to CloudLogCAT, find the latest release, download it and install it
  4. Run CloudLogCAT and go to Settings -> CloudLog. Enter your Cloudlog website URL and API key from step 1 above. Click Save.
  5. Go to Settings -> OmniRig. OmniRig window will now open. Select your radio, com port and speed. Save by clicking OK.
    OmniRig settings

If all worked well, frequency, mode etc will be syncing to Cloudlog.
CloudLogCAT syncing to Cloudlog

In Cloudlog, you can click on your callsign (at right) and select Hardware Interfaces. After a couple of seconds your OmniRig connection should show up.
Cloudlog Hardware Interfaces

You can now select this radio under Station / Radio when logging QSO:s.

Recover forgotten password to Cloudlog

I lost my password to my Cloudlog and there is no “forgotten password” built in. I did not succeed by setting $config[‘use_auth’] = false so this is how I did it.

  1. In the root directory of your Cloudlog installation, create a file called pw.php with the following content (edit the $password variable to the password you want in clear text):

    <?php
    $password = 'cleartextpasswordhere';
    echo password_hash($password, PASSWORD_DEFAULT);

  2. If you don’t have the database password, get it by looking in the file application/config/database.php
  3. Access your database using phpMyAdmin using the database credentials in the previous step
  4. Go to the users table and click edit on the row with your username
  5. Use a web browser and go to http://<your cloudlog url>/pw.php and select and copy the displayed password hash.
  6. In the user_password field, paste the password hash from step 5 and click Go to save
  7. Remove the file pw.php from your cloudlog webroot

You can now log in using the new password.

Devolo Magic 2 wifi

Stable powerline connection on Devolo Magic 2 wifi mesh

Devolo Magic 2 wifi is a series of products made to create a mesh wifi network in your home with multiple wifi accesspoints connected to the router over the powerline network. It can sometimes be difficult to obtain a reliable, stable connection of the powerline as noise in the powerline can interfere.

This is how I make it as stable as possible.

  • Do not connect the powerline adapter via an extension cord. It should be connected directly to the outlet.
  • Try to find outlets as close to the fuse box as possible. Especially for the unit connected to the router, because this unit will need to communicate well with all other units on the network.
  • If possible, connect the units to outlets that belongs to the same phase. Even though connection over different phases should be possible, it gives lower throughput and more unreliable connection.
  • If possible, use grounded outlets only. This will make it possible for the device to use MIMO technology instead of instead of SISO. MIMO gives higher throughput and is more reliable. Screenshots: SISO mode (left) compared to MIMO mode (right).
    SISO mode MIMO mode
  • In the powerline configuration, deselecting Automatic compatibility mode (recommended) * and choosing VDSL 17a (default) seems to be most reliable for me. (In automatic mode the unit sometimes gets very poor connection and needs to be rebooted in my case.)

Is multiple CAA DNS-records allowed? Yes!

A client was about to renew one of their SSL certificates and the provider requested them to add a CAA DNS-record for the provider. The client already had one CAA DNS-record for another provider in their domain, becuase they where using different providers of SSL certificates for different purposes in their organization.

The CAA DNS-record for the provider in question was added but the provider said they couldn’t issue the certificate as long as there was another CAA DNS-record present. The provider claimed there can only be one CAA DNS-record present in the domain.

The provider might be correct in the sense of that the provider’s system can’t handle multiple CAA records but multiple CAA records is not a violation of the RFC! It is just the provider who can’t handle it and makes it the customers problem.

This might be a simple way of obstructing the client in using the provider’s competitors but the provider is not correct in their statement. According to RFC8659 there are no limitations in the number of CAA DNS-records in one domain. The provider should just look for their CAA DNS-record in the client domain DNS-records and ignore competitors records.

ERROR 1067 (42000) at line xxx: Invalid default value for ‘field’

This is beacuse mysql server 5.7 have changed the the date time default field 0000-00-00 00:00:00 options. You can only have one field with the value 0000-00-00 00:00:00. Where fore you have to change the default indata mask to.

datetime NOT NULL DEFAULT ‘1000-01-01 00:00:00’
or
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP

exampel
ALTER TABLE testdate CHANGE datestart datestart DATETIME NOT NULL DEFAULT ‘1000-01-01 00:00:00’;

Joomla! module assignment list is broken

If the module selection list in the module assignment is broken, i.e. the tool for select / deselect of sub menu items is missing and the layout is generally garbled, the cause can be a menu item in the menu above that is listed as a child item but has no parent.

Go the the menu items for the last menu that is working. A menu item which has a missing parent has one or more leading vertical bars before the menu item name (instead of the leading dash which is the normal indication of a child item).

Just open the menu item and save it.

FreePBX multiple time conditions

The easiest way to get multiple time conditions in FreePBX is to daisy chain them. A common scenario is to have a standard time condition for normal opening hours and in addition to that, time conditions for holidays occuring on normal weekdays, like christmas and new year for example.

  • Create one time group for normal opening hours, for example monday to friday 08.00-17.00.
  • Create one time condition for the normal opening hours, using the above time group. If time matches, connect the destination to the open IVR or queue. If time doesn’t match, connect it to a closed IVR or a voice message saying you’re closed. This is going to be the last time condition in the chain.
  • Create time groups for each of the holidays. If time matches, connect the destination to a voice message saying you’re closed. If time condition doesn’t match connect it to the next time condition. Remember, the last time condition in the chain should be the one for normal opening hours.
  • Connect the inbound route to the first time condition in your chain.

Inbound route -> Time condition for holiday 1 -> Time condition for holiday 2 -> Time condition for normal opening hours

How to change mysql table engine MyISAM to InnoDB

login to mysql shell as root.
locate the database where the tables are situated.
SET @DATABASE_NAME = ‘name_of_your_db’; // name_of_your_db = the database you want to change table engine.
SELECT CONCAT(‘ALTER TABLE ', table_name, ' ENGINE=InnoDB;’) AS sql_statements FROM information_schema.tables AS tb WHERE table_schema = @DATABASE_NAME AND ENGINE = ‘MyISAM’ AND TABLE_TYPE = ‘BASE TABLE’ ORDER BY table_name DESC;
The result will end up in a list of the tables that needs to be changed. Copy the list and do the following.
Shift to the database involved:

USE name_of_your_db
START TRANSACTION;
insert the copied list
COMMIT;
You have now changed the engine of the tables.

[ERROR] Fatal error: Can’t open and lock privilege tables: Table ‘mysql.user’ doesn’t exist

This error ocurs then the database mysql is missing or corrupt.
Stop the mysql server “service mysql-server stop”
Make a backup of /var/db/mysql “mv /var/db/mysql /var/db/mysql.old”.
To rebuild the database execute “/usr/local/libexec/mysqld –initialize”
You will get a temporary password. Remember the password for later use.
Start the mysql server “service mysql-server start”
To start upp the new configuration “mysql_secure_installation”. Use the Password to start the configuration and step thru the wizzard.
Restore the mysql backup and the server is good as new.

“There has been a critical error on your website. Learn more about debugging in WordPress.” after updating to WordPress 5.7 (All in one WP security and firewall) [Solved]

Investigating the error log reveals that the problem has to do with All in one WP security and firewall plugin:

Got error 'PHP message: PHP Fatal error:  Cannot redeclare retrieve_password() (previously declared in /www/wp-includes/user.php:2671) in /www/wp-content/plugins/all-in-one-wp-security-and-firewall/other-includes/wp-security-rename-login-feature.php on line 358'

The problem has been solved in All in one WP security and firewall plugin version 4.4.8, so it means your WordPress site was updated to 5.7 prior to updating the plugins.

To solve it, you need to update All in one WP security and firewall but not being able to login to your site you will need to solve this using FTP.

Using FTP, rename the folder wp-content/plugins/all-in-one-wp-security-and-firewall to something else. Now you can log into your site and reinstall All in one WP security and firewall. Make sure you get at least version 4.4.8.