final AccessMessage createMeshMessage(final int src,
                                          final int dst,
                                          @Nullable final Integer ttl,
                                          final byte[] key,
                                          final int akf,
                                          final int aid,
                                          final int aszmic,
                                          final int accessOpCode,
                                          final byte[] accessMessageParameters) {
        final ProvisionedMeshNode node = mUpperTransportLayerCallbacks.getNode(src);
        final int sequenceNumber = node.incrementSequenceNumber();
        final byte[] sequenceNum = MeshParserUtils.getSequenceNumberBytes(sequenceNumber);

        MeshLogger.verbose(TAG, "Src address: " + MeshAddress.formatAddress(src, false));
        MeshLogger.verbose(TAG, "Dst address: " + MeshAddress.formatAddress(dst, false));
        MeshLogger.verbose(TAG, "Key: " + MeshParserUtils.bytesToHex(key, false));
        MeshLogger.verbose(TAG, "akf: " + akf);
        MeshLogger.verbose(TAG, "aid: " + aid);
        MeshLogger.verbose(TAG, "aszmic: " + aszmic);
        MeshLogger.verbose(TAG, "Sequence number: " + sequenceNumber);
        MeshLogger.verbose(TAG, "Access message opcode: " + Integer.toHexString(accessOpCode));
        MeshLogger.verbose(TAG, "Access message parameters: " + MeshParserUtils.bytesToHex(accessMessageParameters, false));

        final AccessMessage message = new AccessMessage();
        message.setSrc(src);
        message.setDst(dst);
        message.setTtl(ttl == null ? node.getTtl() : ttl);
        message.setIvIndex(mUpperTransportLayerCallbacks.getIvIndex());
        message.setSequenceNumber(sequenceNum);
        message.setDeviceKey(key);
        message.setAkf(akf);
        message.setAid(aid);
        message.setAszmic(aszmic);
        message.setOpCode(accessOpCode);
        message.setParameters(accessMessageParameters);
        message.setPduType(MeshManagerApi.PDU_TYPE_NETWORK);

        super.createMeshMessage(message);
        return message;
    }
Creates an access message to be sent to the peripheral node
<p>
This method will create the access message and propagate the message through the transport layers to create the final mesh pdu.
</p>

@param src                     Source address of the provisioner/configurator.
@param dst                     Destination address to be sent to
@param key                     Device Key
@param akf                     Application key flag defines which key to be used to decrypt the message i.e device key or application key.
@param aid                     Identifier of the application key.
@param aszmic                  Defines the length of the transport mic length where 1 will encrypt withn 64 bit and 0 with 32 bit encryption.
@param accessOpCode            Operation code for the access message.
@param accessMessageParameters Parameters for the access message.
@return access message containing the mesh pdu
mesh/src/main/java/no/nordicsemi/android/mesh/transport/MeshTransport.java