🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)
🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)

🔧 Programmierung 🕛 kürzlich 4 Min Lesezeit
0

Developing BLE Applications : A Tutorial for Linux/MacOS

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

Bluetooth Low Energy (BLE) technology has become increasingly popular for creating wireless applications with low power consumption. In this tutorial, we’ll explore the process of scanning for nearby BLE devices, connecting to a specific device, and reading characteristics using the BleuIO BLE USB dongle. The tutorial is designed for Linux/MacOS environments.






Introduction to BleuIO



Connect the BleuIO dongle to your computer.

  • Python: Ensure that Python is installed on your system.






  • Writing the BLE Application Script



    The provided Python script demonstrates the process of connecting to the BleuIO dongle, scanning for nearby BLE devices, and reading characteristics. Let’s break down the key components of the script:




    CODE


    # Importing necessary modules
    import serial
    import time

    # Establishing connection to the BleuIO dongle
    connecting_to_dongle = 0
    print("Connecting to dongle...")

    while connecting_to_dongle == 0:
    try:
    # Configuring the serial connection
    console = serial.Serial(
    port='/dev/cu.usbmodem4048FDE52CF21',
    baudrate=57600,
    parity="N",
    stopbits=1,
    bytesize=8,
    timeout=0
    )
    if console.is_open.__bool__():
    connecting_to_dongle = 1
    except:
    print("Dongle not connected. Please reconnect Dongle.")
    time.sleep(5)

    # Sending commands to the BleuIO dongle
    console.write(str.encode("AT+CENTRAL"))
    console.write('\r'.encode())
    time.sleep(0.1)
    console.write(str.encode("AT+GAPSCAN=3"))
    console.write('\r'.encode())
    time.sleep(3.5)
    console.write(str.encode("AT+GAPCONNECT=[1]D1:79:29:DB:CB:CC"))
    console.write('\r'.encode())
    console.write(str.encode("AT+GATTCREAD=0013"))
    console.write('\r'.encode())

    # Waiting for the dongle to respond
    time.sleep(1)
    out = ""
    while console.inWaiting() > 0:
    out += console.read(console.inWaiting()).decode()
    else:
    if not out.isspace():
    print(out + " ")
    out = " "










    Explanation:



    1. Connecting to BleuIO:




    • Download and install a serial terminal emulator like screen or minicom.

    • Ensure your dongle is connected and note its port (e.g., /dev/cu.usbmodem4048FDE52CF21).

    • Run the script with the correct port and baudrate (57600) in your terminal.

    • The script attempts connection until successful, then sends essential AT commands:


      • AT+CENTRAL: Configures BleuIO as a central device (scanning/connecting).

      • AT+GAPSCAN=3: Starts scanning for BLE devices for 3 seconds.








    2. Selecting and Connecting:




    • The scan results will appear in your terminal.

    • Identify the desired device, usually by name or MAC address.

    • Replace D1:79:29:DB:CB:CC in the script with your device’s MAC address.

    • Send AT+GAPCONNECT=[1]D1:79:29:DB:CB:CC to connect to the device (replace the mac address with your desired device if needed).



    3. Reading a Characteristic:




    • Every BLE device exposes characteristics containing specific data.

    • Replace 0013 in AT+GATTCREAD with the characteristic’s UUID to read its value.

    • This script reads the characteristic with UUID 0013 and prints its value. Currently its showing the device type.






    The outout



    The output will be shown on the screen as




    CODE
    Value read: SSD002/2B
    Hex: 0x5353443030322F3242
    Size: 9




    , and unlock the full potential of BLE applications with BleuIO. Happy coding!

    Vollständiger Original-Bericht
    Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
    ↗ Original-Artikel auf dev.to lesen
    Wie bewertest du diesen Beitrag?
    1 Klick Feedback
    Teilen mit Netzwerk & Team:

    Community-Analysen & Experten-Meinungen 0

    Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
    Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
    Community Pulse: Relevanz-Einschätzung
    1 Klick Experten-Votum
    🔴 Akute Relevanz 0%
    🟡 In Evaluierung 0%
    🟢 Keine Auswirkung 0%
    Spannende Innovation 0%
    Verwandte Story-Cluster & Quellen (Vektor-KI)
    Port 8095 Engine
    3 Quellen
    GPT-6 Astra Release Today? OpenAI’s Next Major AI Model Is Almost Here
    1 Quelle
    Apple accuses OpenAI of destroying evidence as trade-secrets fight intensifies
    1 Quelle
    Major AI platforms go down in unprecedented simultaneous outage
    Ähnliche Beiträge
    🔍 Verwandte News

    Auch interessante Nachrichten Developing BLE Applications : A Tutorial for Linux/MacOS

    Thematisch verwandte Begriffe: Developing, Applications, Tutorial, LinuxMacOS · 6 Treffer

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...