This question has come up several times so I figured I would make a post here that can be searched for. When doing builds with Yocto, you may find that the latest Mender client version is not built by default. This is normally on older branches which have transitioned into maintenance mode before the newer versions of Mender were released. The clients are available but not enabled by default to avoid risk for users of these branches. If you want to switch to the newer clients, you simply need to add some settings to local.conf. For instance, if you are running on a Sumo branch, the default is to build Mender 1.7. If you want to switch to 2.x, add the following to your local.conf file.
PREFERRED_VERSION_pn-mender = "2.%" PREFERRED_VERSION_pn-mender-artifact = "3.%" PREFERRED_VERSION_pn-mender-artifact-native = "3.%"