<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libmts-io.git/include, branch 1.0.23</title>
<subtitle>MultiTech IO C++ Library</subtitle>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/libmts-io.git/'/>
<entry>
<title>Quectel EG25-G Delta Radio Firmware Upgrade support - libmts-io implementation</title>
<updated>2020-08-07T13:03:56+00:00</updated>
<author>
<name>Serhii Kostiuk</name>
<email>serhii.o.kostiuk@globallogic.com</email>
</author>
<published>2020-08-07T13:03:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/libmts-io.git/commit/?id=b32dbb2c5f12fbacf598edb812acab816068de00'/>
<id>b32dbb2c5f12fbacf598edb812acab816068de00</id>
<content type='text'>
Small improvements in code comments.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Small improvements in code comments.
</pre>
</div>
</content>
</entry>
<entry>
<title>Quectel EG25-G Delta Radio Firmware Upgrade support - libmts-io implementation</title>
<updated>2020-08-07T12:52:22+00:00</updated>
<author>
<name>Serhii Kostiuk</name>
<email>serhii.o.kostiuk@globallogic.com</email>
</author>
<published>2020-08-06T11:47:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/libmts-io.git/commit/?id=c1a58778eecd0115d746afbca1079683b244b672'/>
<id>c1a58778eecd0115d746afbca1079683b244b672</id>
<content type='text'>
During testing I discrovered that EG25-G radio may lose some data during transmission
over Serial AT interface or just freezes and stops responding over Serial AT interface.

When ACK mode is not used, the radio may either return an error:

```
Expected: [+QFUPL: 24312545,fa6b], Actual: [+QFUPL: 17124608,b907

+CME ERROR: 409  // Fail to write the file
]
```

Or it may just freeze on modem_at1 interface and stop responding to AT commands:

```
8:0:34:32|TRACE|RADIO| Sending command [AT]
8:0:34:133|DEBUG|RESULT:

8:0:34:133|DEBUG|Shutting Down
```

This commit implements an alternative, ACK mode for data transmission to prevent data losses.
Data is sent in chunks and the device waits for ACK string from the radio for each chunk.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During testing I discrovered that EG25-G radio may lose some data during transmission
over Serial AT interface or just freezes and stops responding over Serial AT interface.

When ACK mode is not used, the radio may either return an error:

```
Expected: [+QFUPL: 24312545,fa6b], Actual: [+QFUPL: 17124608,b907

+CME ERROR: 409  // Fail to write the file
]
```

Or it may just freeze on modem_at1 interface and stop responding to AT commands:

```
8:0:34:32|TRACE|RADIO| Sending command [AT]
8:0:34:133|DEBUG|RESULT:

8:0:34:133|DEBUG|Shutting Down
```

This commit implements an alternative, ACK mode for data transmission to prevent data losses.
Data is sent in chunks and the device waits for ACK string from the radio for each chunk.
</pre>
</div>
</content>
</entry>
<entry>
<title>Quectel EG25-G Delta Radio Firmware Upgrade support - libmts-io implementation</title>
<updated>2020-08-06T11:06:19+00:00</updated>
<author>
<name>Serhii Kostiuk</name>
<email>serhii.o.kostiuk@globallogic.com</email>
</author>
<published>2020-08-06T11:06:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/libmts-io.git/commit/?id=e1855057708468bc5383d948be70da7179730231'/>
<id>e1855057708468bc5383d948be70da7179730231</id>
<content type='text'>
Added waitResponse overloads to the public interface of ICellularRadio.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added waitResponse overloads to the public interface of ICellularRadio.
</pre>
</div>
</content>
</entry>
<entry>
<title>Quectel EG25-G Delta Radio Firmware Upgrade support - libmts-io implementation</title>
<updated>2020-08-06T10:22:34+00:00</updated>
<author>
<name>Serhii Kostiuk</name>
<email>serhii.o.kostiuk@globallogic.com</email>
</author>
<published>2020-08-06T10:11:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/libmts-io.git/commit/?id=96445eaa166dd8f4ba99014f5eea2c1146b9db80'/>
<id>96445eaa166dd8f4ba99014f5eea2c1146b9db80</id>
<content type='text'>
Refactored MTS::IO::ICellularRadio::sendCommand. Moved response waiting code to the
MTS::IO::ICellularRadio::waitResponse function.

**Motivation**

In many places in the modern libmts-io implementation there are cases when we need to
wait for some response from the radio without executing or sending any commands.
Such places may wait for some URC messages, acknowledge strings during
data transmission and so on.

One way to handle such cases is to use `sendCommand` with `cmd` argument set to an empty
string. It generally works but according to POSIX:

"If count is zero and fd refers to a file other than a regular file, the results are
not specified."

The other way to handle such cases is to use `isNeedMoreData` callback of `sendCommand`
function to analyze all the data on the fly. But this approach may not work for data
transfers when `sendCommand` and its std::string argument may not be used to store binary
data with null characters within.

This commit moves the "wait for the radio to answer" part to the separate function
which allows reusablity of such a code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refactored MTS::IO::ICellularRadio::sendCommand. Moved response waiting code to the
MTS::IO::ICellularRadio::waitResponse function.

**Motivation**

In many places in the modern libmts-io implementation there are cases when we need to
wait for some response from the radio without executing or sending any commands.
Such places may wait for some URC messages, acknowledge strings during
data transmission and so on.

One way to handle such cases is to use `sendCommand` with `cmd` argument set to an empty
string. It generally works but according to POSIX:

"If count is zero and fd refers to a file other than a regular file, the results are
not specified."

The other way to handle such cases is to use `isNeedMoreData` callback of `sendCommand`
function to analyze all the data on the fly. But this approach may not work for data
transfers when `sendCommand` and its std::string argument may not be used to store binary
data with null characters within.

This commit moves the "wait for the radio to answer" part to the separate function
which allows reusablity of such a code.
</pre>
</div>
</content>
</entry>
<entry>
<title>Quectel EG25-G Delta Radio Firmware Upgrade support - libmts-io implementation</title>
<updated>2020-08-04T09:32:04+00:00</updated>
<author>
<name>Serhii Kostiuk</name>
<email>serhii.o.kostiuk@globallogic.com</email>
</author>
<published>2020-08-04T07:20:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/libmts-io.git/commit/?id=1afb3c7bb338eba0410f85be8e5eaf192a7c4857'/>
<id>1afb3c7bb338eba0410f85be8e5eaf192a7c4857</id>
<content type='text'>
During testing with L4G1 device I discovered some inconsistencies in behaviour between
EG25-G device and EG95 devices (EG95-NA and EG95-E).

EG25-G device that I have on hands does not allow to perform downgrades using delta images.
When there is an attempt to apply a downgrade delta image it behaves as the following:

- radio prints `OK`
- radio prints `+QIND: "FOTA",502`
- radio is not rebooted

While EG95 radios always reboot at least once to apply the firmware image. Even if it is not valid.

Also I noticed that detach from the serial bus may take more than 10 seconds in some rare cases.
Thus we need to wait not a fixed amount of time but until the radio actually detaches from the bus.

This commit attempts to address the findings described above.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During testing with L4G1 device I discovered some inconsistencies in behaviour between
EG25-G device and EG95 devices (EG95-NA and EG95-E).

EG25-G device that I have on hands does not allow to perform downgrades using delta images.
When there is an attempt to apply a downgrade delta image it behaves as the following:

- radio prints `OK`
- radio prints `+QIND: "FOTA",502`
- radio is not rebooted

While EG95 radios always reboot at least once to apply the firmware image. Even if it is not valid.

Also I noticed that detach from the serial bus may take more than 10 seconds in some rare cases.
Thus we need to wait not a fixed amount of time but until the radio actually detaches from the bus.

This commit attempts to address the findings described above.
</pre>
</div>
</content>
</entry>
<entry>
<title>[GP-759] Added delta radio firmware upgrade support for Telit LE910C4-NF</title>
<updated>2020-07-28T11:32:37+00:00</updated>
<author>
<name>Serhii Kostiuk</name>
<email>serhii.o.kostiuk@globallogic.com</email>
</author>
<published>2020-07-28T11:32:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/libmts-io.git/commit/?id=1d1bce468358ffeab903877b1c492db28d15ab49'/>
<id>1d1bce468358ffeab903877b1c492db28d15ab49</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Quectel Delta Radio Firmware Upgrade support - libmts-io implementation</title>
<updated>2020-07-23T13:55:18+00:00</updated>
<author>
<name>Serhii Kostiuk</name>
<email>serhii.o.kostiuk@globallogic.com</email>
</author>
<published>2020-07-23T12:37:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/libmts-io.git/commit/?id=8af6be402eba48a02853bebc5f9f6d5b9e8844f3'/>
<id>8af6be402eba48a02853bebc5f9f6d5b9e8844f3</id>
<content type='text'>
Added more strict handling for comma-separated data in URC messages to prevent out-of-bounds reads.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added more strict handling for comma-separated data in URC messages to prevent out-of-bounds reads.
</pre>
</div>
</content>
</entry>
<entry>
<title>Telit Delta Radio Firmware Upgrade support - libmts-io implementation</title>
<updated>2020-07-22T07:18:37+00:00</updated>
<author>
<name>Serhii Kostiuk</name>
<email>serhii.o.kostiuk@globallogic.com</email>
</author>
<published>2020-07-21T17:24:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/libmts-io.git/commit/?id=b9a5e7ab27ad313b95fe6642f08e230091efef0f'/>
<id>b9a5e7ab27ad313b95fe6642f08e230091efef0f</id>
<content type='text'>
Changes after code review:

1. Handle cases when the number of bytes written is different from the number of bytes requested to transfer.
2. Use fstat instead of lseek to determine the firmware size.
3. Renamed TelitRadio::startWrite and TelitRadio::abortWrite functions to better represent their applicability scope.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changes after code review:

1. Handle cases when the number of bytes written is different from the number of bytes requested to transfer.
2. Use fstat instead of lseek to determine the firmware size.
3. Renamed TelitRadio::startWrite and TelitRadio::abortWrite functions to better represent their applicability scope.
</pre>
</div>
</content>
</entry>
<entry>
<title>Code review</title>
<updated>2020-07-17T07:42:16+00:00</updated>
<author>
<name>Andrii Pientsov</name>
<email>andrii.pientsov@globallogic.com</email>
</author>
<published>2020-07-17T07:42:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/libmts-io.git/commit/?id=298efe4e17d3665f9ddbb9298a37b563c60de735'/>
<id>298efe4e17d3665f9ddbb9298a37b563c60de735</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Code review</title>
<updated>2020-07-17T07:03:48+00:00</updated>
<author>
<name>Andrii Pientsov</name>
<email>andrii.pientsov@globallogic.com</email>
</author>
<published>2020-07-17T07:03:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/libmts-io.git/commit/?id=a05854f5d389f67001b7ecc4cda62c7320433349'/>
<id>a05854f5d389f67001b7ecc4cda62c7320433349</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
