This study deals with the communication capabilities of two kinds of semiconductor lasers emitting in one of the atmosphere transparency windows, around 4 μm. One of these two lasers is a quantum cascade laser and the other one is an interband cascade laser. With the quantum cascade laser, a subsequent attenuation is added to the optical path in order to mimic the attenuation of free-space transmission of several kilometers. Direct electrical modulation is used to transmit the message and two-level formats, non-return-to-zero and return-to-zero, are used and compared in terms of maximum transmission data rate. The sensitivity to optical feedback is also analyzed, as well as the evolution of the error rate when reducing the optical power at the level of the detector. This work provides a novel insight into the development of future secure free-space optical communication links based on mid-infrared semiconductor lasers and sheds the light on improvements required to achieve multi-Gbits/s communication with off-the-shelf components.