  In this paper, we study cross-layer optimization of low-power wireless links
for reliability-aware applications while considering both the constraints and
the non-ideal characteristics of the hardware in Internet-of-things (IoT)
devices. Specifically, we define an energy consumption (EC) model that captures
the energy cost---of transceiver circuitry, power amplifier, packet error
statistics, packet overhead, etc.---in delivering a useful data bit. We derive
the EC models for an ideal and two realistic non-linear power amplifier models.
To incorporate packet error statistics, we develop a simple, in the form of
elementary functions, and accurate closed-form packet error rate (PER)
approximation in Rayleigh block-fading. Using the EC models, we derive
energy-optimal yet reliability and hardware compliant conditions for limiting
unconstrained optimal signal-to-noise ratio (SNR), and payload size. Together
with these conditions, we develop a semi-analytic algorithm for
resource-constrained IoT devices to jointly optimize parameters on physical
(modulation size, SNR) and MAC (payload size and the number of retransmissions)
layers in relation to link distance. Our results show that despite reliability
constraints, the common notion---higher $M$-ary QAM modulations are energy
optimal for short-range communication---prevails, and can provide up to 180%
lifetime extension as compared to often employed OQPSK modulation in IoT
devices. However, the reliability constraints reduce both their range and the
energy efficiency, while non-ideal traditional PA reduces the range further by
50%, and diminishes the energy gains unless a better PA is employed.
