One of the challenges in deploying IoT applications is the cost of building and operating the communication infrastructure. This paper studies the feasibility of building a low-cost IoT network based on LoRa, a leading Low-Power Wide-Area Network (LPWAN) technology, using off-the-shelf components and open source software. To this end, we describe our LoRa testbed, which includes gateways, end devices and a variety of sensors. We then present extensive measurement results to characterize the performance of our LoRa network over the 915 MHz unlicensed ISM band in both indoor and outdoor scenarios for various network setups. Our results show that even in a harsh propagation environment, e.g. when the gateway is located inside a concrete building, the low-cost network is able to achieve great coverage. Specifically, we observed that: i) the indoor coverage is sufficient to cover an entire seven-story office building with minimal packet drop, ii) the outdoor coverage is very dependent on the environment, where in our experiments, a communication range of 4.4 km was achieved with only 15% packet drop, iii) network parameters such as spreading factor and packet size greatly affect the coverage; for example, we observed that a payload size of 242 bytes leads to 90% packet drop versus less than 5% drop with a payload size of 1 byte.