Use transmit idle event to synchronize with data transmitted
through DLCI pipes to test TRANSMIT_IDLE implementation.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Update the unit test to expect the new simplified resync
behavior, and validate that new resync is working.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Enable all these tests which run in native_posix in native_sim
And add native_sim as default test platform
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit increases the buffer used for commands
in the control channel within an instance of the
modem_cmux module. The buffer was not large enough to
store an MSC command if the optional break signals
where included. This commit fixes the issue and
updates the test suite to use the max size MSC message.
Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
This commit sets the C/R (command/response) bit when UIH
CMUX frames are sent from the modem_cmux module. This bit
is ignored by some modems like the Quectel BG95, as there
is no defined response to this specific CMUX frame type.
However, other modems, like the TELIT ME910, require the
bit to be set (command). If the bit is not set, the modem
will simply ignore the frame completely.
Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
This PR makes the modem_pipe instances track if they have
data ready to receive, and invoke the RECEIVE_READY event
every time they are attached if the backend implementing
the pipe has notified that receive is ready.
This mechanism ensures that modules attaching to a pipe
get the async RECEIVE_READY event immediately after
attaching to a pipe if there is data ready, instead of
having to poll the pipe, or worse, wait until newer data
becomes available.
The addition revealed a timing issue in the cmux test
suite. Specifically the CMUX instance now immediately
receives the response to a command which the CMUX
instance has not sent yet, causing it to drop the
response.
The CMUX test suite now uses the transaction
mechanism of the mock_pipe to wait for the command
before sending the response.
Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
The tests test each module independently using the mock pipe,
which implements the modem_pipe API, making it compatible
with the modem modules.
The modem_ppp module is slightly different from the others
since it also interacts with the network stack. To acheive
this, a mock implementation of the PPP L2 net iface has
been implemented in the test suite for the modem_ppp.
Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>