This study is devoted to the problem of designing a robust output-feedback discrete-time sliding mode control (ODSMC) for the networked systems involving both measuring and actuating data packet losses. Packet losses in the networked control systems (NCSs) have been modelled by utilising the probability and the characteristics of the sources and the destinations. Here, the well-known Bernoulli random binary distribution is used to model consecutive packet losses in the NCSs. In this study, first, a robust observer-based discrete-time sliding mode control is proposed for the NCSs including random packet losses. The packet losses occur in the channels from the sensors to the controller and the channels from the controller to the actuators. Then, using the notion of exponential mean square stability, the boundedness of the obtained closed-loop system is analysed with a linear matrix inequality approach. Our proposed robust ODSMC can be applied to unstable NCSs, and there is no need to stabilise the underlying system in advance. Illustrative examples are presented to show the effectiveness of the proposed approach.