function ret = qrcode_read_string(msg)
    % msg = qrcode_write_string(origin, dimension, spacing, units
    %
    % the QRcode format is
    % version, u0, v0, n_u, n_v, du, dv, units
    % where
    %   version character string identifying version of QR code
    %   u0      u coordinate of corner to the bottom left of the code
    %   v0      v coordinate of the corner to the bottom left of the code
    %   n_u     number of chessboard tiles in the u direction
    %   n_v     number of chessboard tiles in the v direction
    %   du      spacing in u direction
    %   dv      spacing in v direction
    %   units   string identifying units of measurement

    msg         = strsplit(msg, ',');
    ret         = struct();
    ret.version = msg{1};
    ret.origin  = [str2double(msg{2}) str2double(msg{3})];
    ret.dimension=[str2double(msg{4}) str2double(msg{5})];
    ret.spacing = [str2double(msg{6}) str2double(msg{7})];
    ret.units   = msg{8};
end
    