BTE 1522 – Programming and Data Structure – Project Preparation

Today’s BTE 1522 class was an exciting dive into the world of GPS technology and its integration with Raspberry Pi. We explored the essential concepts, from importing relevant Python modules for GPS functionality to circuit construction and function coding. This session is a crucial part of our project development series, providing students with hands-on experience in incorporating GPS modules into their Raspberry Pi projects.

Understanding GPS and Its Importance

Global Positioning System (GPS) is a satellite-based navigation system that provides geolocation and time information to a GPS receiver anywhere on or near the Earth. Integrating GPS into Raspberry Pi projects opens up numerous possibilities, such as tracking, navigation, and location-based services, which are pivotal in various applications like autonomous vehicles, drones, and IoT devices.

Circuit Construction for GPS Integration

Components Needed:

  1. Raspberry Pi
  2. GPS Module (e.g., NEO-6M)
  3. Connecting Wires
  4. Breadboard (optional)

Steps:

  1. Connecting the GPS Module:

    • UART Communication: Connect the GPS module’s TX (transmit) pin to the Raspberry Pi’s RX (receive) pin and the GPS module’s RX pin to the Raspberry Pi’s TX pin. Additionally, connect the VCC pin to the 3.3V or 5V power supply (depending on your GPS module specifications) and the GND pin to the ground.
    • I2C Communication: If your GPS module supports I2C, connect the SDA (data) and SCL (clock) pins of the GPS module to the corresponding pins on the Raspberry Pi. Ensure the VCC and GND pins are also properly connected.
  2. Powering Up: Power on the Raspberry Pi and ensure all connections are secure.

Coding for GPS Integration

Python Modules:

  • gpsd: A popular library for interfacing with GPS modules.
  • serial: A library for handling serial communication.

UART Communication:

  1. Installing Libraries:

    sudo apt-get install gpsd gpsd-clients python-gps
  2. Python Code Example:

    python
     
    import gpsd # Connect to the local gpsd
    gpsd.connect() # Get GPS data
    def get_gps_data():
    packet = gpsd.get_current()
    latitude = packet.lat
    longitude = packet.lon
    time = packet.time return latitude, longitude, time # Print GPS data lat, lon,
    timestamp = get_gps_data() print(f"Latitude: {lat}, Longitude: {lon}, Time: {timestamp}")
     

I2C Communication:

  1. Enabling I2C:

    sudo raspi-config

    Navigate to ‘Interfacing Options’ and enable I2C.

  2. Python Code Example:

    python
     
    import smbus2 import time bus = smbus2.SMBus(1) address = 0x42 # Replace with your GPS module's I2C address
    def read_gps(): data = bus.read_i2c_block_data(address, 0, 16) return data while True:
    gps_data = read_gps()
    print(gps_data) time.sleep(1)

Communication Protocols

UART (Universal Asynchronous Receiver-Transmitter):

  • Pros: Simple to use, widely supported.
  • Cons: Limited to point-to-point communication.

I2C (Inter-Integrated Circuit):

  • Pros: Supports multiple devices on the same bus, more flexible.
  • Cons: More complex than UART, requires addressing.

Key Learning Outcomes

  • Circuit Construction: Students learned how to set up a GPS module with Raspberry Pi, ensuring correct connections for power, ground, and communication lines.
  • Coding Techniques: We explored Python coding for both UART and I2C communication protocols, highlighting the differences and use cases for each.
  • Real-Time Data Acquisition: Students gained practical skills in capturing and processing GPS data, which can be applied to various projects requiring geolocation capabilities.

Integrating GPS functionality into Raspberry Pi projects offers a robust foundation for creating advanced IoT applications and location-based services. Today’s class provided a comprehensive understanding of the hardware setup and coding techniques necessary to harness GPS data effectively. As we move forward, these skills will be crucial for the final project development phase, enabling students to implement sophisticated and innovative solutions.

 

 

 

 

BTE 3232 – Week 13 – Global Classroom Dr Agussalim: Universitas Pembangunan Nasional “Veteran” Jawa Timur

Today, the BTE3232 Communication System Design Laboratory had the honor of hosting Dr. Eng. Agussalim, S.Pd., MT from Magister of Information Technology UPN “Veteran” Jawa Timur for a global classroom initiative. Dr. Agussalim’s lecture, titled “An Alternative Data Collection Method for IoT Devices in a Smart Environment Scenario using Delay-Tolerant Network,” provided valuable insights into innovative approaches to data collection in IoT environments.

An Alternative Data Collection Method for IoT Devices in a Smart Environment Scenario using Delay-Tolerant Network

In today’s world, where everything is connected through technology, we use many smart devices that gather data. But sometimes, these devices struggle to collect data in areas with poor or intermittent internet connections. To solve this problem, there is a new method called Delay-Tolerant Network (DTN). DTN allows devices to share data even when the internet connection isn’t always available.

Delay-Tolerant Network (DTN) is a novel networking paradigm that allows for communication in environments where continuous end-to-end connectivity is not guaranteed. Unlike traditional networks that rely on stable connections, DTN employs store-and-forward mechanisms to opportunistically route data packets through intermittent links. This resilience to network disruptions makes DTN particularly well-suited for IoT applications in smart environment scenarios, where reliable data collection is paramount.

Discussion on the Questions Asked During the Session

During the session, Dr. Agussalim addressed a range of questions, shedding light on the intricacies of Delay-Tolerant Networks (DTN) and their applications in IoT environments. Here’s a summary of the key points discussed:

  1. Differences between Delay-Tolerant Network (DTN) and Traditional Networking Approaches – Dr. Agussalim explained that Delay-Tolerant Network (DTN) differs from traditional networking approaches in its approach to handling intermittent connectivity. He highlighted two key protocols used in DTN: epidemic and spray and wait. In epidemic routing, nodes forward copies of messages to all neighboring nodes, ensuring redundancy and increasing the likelihood of message delivery. In contrast, spray and wait protocol involves spraying a fixed number of message copies into the network and waiting for encounters with other nodes. These approaches are tailored to address the challenges posed by unpredictable connectivity in IoT environments.
  2. Key Challenges in Collecting Data from IoT Devices in Remote or Inaccessible Areas – During the session, Dr. Agussalim emphasized the significant challenges associated with collecting data from IoT devices in remote or inaccessible areas. These challenges include intermittent connectivity, limited network infrastructure, and harsh environmental conditions. Addressing these challenges is crucial for ensuring reliable data collection and maintaining connectivity in such environments.
  3. Communication Protocols Used in the Surabaya Project – Dr. Agussalim discussed the communication protocols utilized in the Surabaya project, providing insights into the practical implementation of DTN in real-world scenarios. While specific protocols may vary depending on the project requirements, common examples include Bundle Protocol (BP) and Message Queue Telemetry Transport (MQTT). These protocols are designed to facilitate communication between IoT devices and central servers, even in environments with intermittent connectivity.
  4. How Delay-Tolerant Network Addresses Intermittent Connectivity in IoT Environments – Dr. Agussalim elaborated on how Delay-Tolerant Network (DTN) addresses the issue of intermittent connectivity in IoT environments. Unlike traditional networks, which rely on continuous end-to-end connectivity, DTN leverages store-and-forward mechanisms to route messages opportunistically. This resilience to network disruptions allows DTN to maintain communication even in environments with unpredictable connectivity, such as remote or disaster-affected areas.
  5. Factors to Consider When Designing a Data Collection System Using Delay-Tolerant Network – When designing a data collection system using Delay-Tolerant Network (DTN), several factors must be considered. Dr. Agussalim outlined key considerations, including network architecture, data aggregation techniques, and energy consumption. These factors play a crucial role in optimizing the performance and efficiency of the data collection system, ensuring reliable operation in diverse environments.
  6. Concept of Data Aggregation in the Context of IoT Devices and Delay-Tolerant Network: Dr. Agussalim explained the concept of data aggregation in the context of IoT devices and Delay-Tolerant Network (DTN). Data aggregation involves combining multiple data packets into a single packet for transmission, reducing redundant transmissions and conserving network resources. This technique is particularly beneficial in IoT environments with limited bandwidth or intermittent connectivity, where efficient use of resources is essential.
  7. Potential Security Concerns Associated with Data Collection in IoT Environments Using Delay-Tolerant Network – During the session, potential security concerns associated with data collection in IoT environments using Delay-Tolerant Network (DTN) were addressed. Dr. Agussalim emphasized the need for robust encryption and authentication mechanisms to safeguard data privacy and integrity. Without proper security measures in place, IoT devices and the data they collect may be vulnerable to unauthorized access or tampering.
  8. Impact of Delay-Tolerant Network on the Energy Consumption of IoT Devices – Dr. Agussalim discussed the impact of Delay-Tolerant Network (DTN) on the energy consumption of IoT devices. By optimizing data transmission and reducing the need for continuous connectivity, DTN can prolong the battery life of IoT devices. This energy efficiency is crucial for IoT deployments in remote or off-grid locations, where power sources may be limited.
  9. Real-World Applications of Delay-Tolerant Network in Smart Cities or Environmental Monitoring Systems – Real-world applications of Delay-Tolerant Network (DTN) in smart cities or environmental monitoring systems were explored during the session. Dr. Agussalim showcased the versatility and potential of DTN for addressing connectivity challenges in diverse scenarios, such as disaster response, wildlife tracking, and remote environmental monitoring. These applications highlight the importance of innovative data collection methods in creating resilient and sustainable smart environments.

Reflection

As a participant in this global classroom initiative, I found Dr. Agussalim’s lecture to be interesting and relatable with the work we are currently developing involving IoT Applications on UMP STEM Cube. Delay-Tolerant Networks is indeed an alternative data collection methods for IoT devices, opening up new avenues for research and innovation. I look forward to future opportunities to engage with experts from other universities, as it offers a valuable platform for exchanging ideas and learning from diverse perspectives.

In particular, this session underscored the importance of understanding the network aspect of IoT, highlighting its critical role in shaping the future of smart environments.

Nurul Hazlina, June 3rd.