This paper proposes an ordered sequence detection (OSD) for digital pulse interval modulation (DPIM) in optical wireless communications. Leveraging the sparsity of DPIM sequences, OSD shows comparable performance to the optimal maximum likelihood sequence detection (MLSD) with much lower complexity. Compared with the widely adopted sampleby-sample optimal threshold detection (OTD), it considerably improves the bit error rate (BER) performance by mitigating error propagation. Moreover, this paper proposes a barrier signalaided digital pulse interval modulation (BDPIM), where the last of every K symbols is allocated with more power as an inserted barrier signal. BDPIM with OSD (BDPIM-OSD) can limit the error propagation between two adjacent barriers. To reduce the storing delay when using OSD to detect extremely large packets, we propose BDPIM with a combination of OTD and OSD (BDPIM-OTD-OSD), within which long sequences are cut into pieces and separately detected. Approximate upper bounds of the average BER performance of DPIM-OTD, DPIM-OSD, BDPIM-OSD and BDPIM-OTD-OSD are analyzed. Simulations are conducted to corroborate our analysis. Optimal parameter settings are also investigated in uncoded and coded systems by simulations. Simulation results show that the proposed OSD and BDPIM bring significant improvement in uncoded and coded systems over various channels.Index Terms-Digital pulse interval modulation, ordered sequence detection, signal design, error propagation, bit error rate arXiv:1804.04431v2 [eess.SP]