Android Question BLE2Peripheral2 & Laird BL600

Pesciolina

Active Member
Licensed User
Hello,
I'm asking for your help again. I modified the BlePeripheral2 library by inserting the Laird services. With the standard library he was able to associate the device to the cell now not anymore.
The beauty is that once paired if I start the demo with the edit library I can connect with the device. The manufacturer has provided me with the demo code which I am attaching
thanks for collaboration

C#:
#include "bluetoothserverclass.h"

#include <QtCore/qbytearray.h>
#include <QtCore/qlist.h>
#include <QtCore/qloggingcategory.h>
#include <QtCore/qscopedpointer.h>
#include <QtCore/qtimer.h>
#include <qlowenergyservice.h>
#include <QDebug>
#include "classes/Application.h"
#include "models/DevicesListModelEx.h"


BluetoothServer::BluetoothServer(QObject *parent) : QObject(parent)
{
}

void BluetoothServer::startActivity()
{
    if(isStarted)
        return;

    isStarted = true;

    //! [Advertising Data]
    advertisingData.setDiscoverability(QLowEnergyAdvertisingData::DiscoverabilityGeneral);
    advertisingData.setIncludePowerLevel(true);
    advertisingData.setLocalName("BTLE Server");

    scanResponseData.setServices(QList<QBluetoothUuid>() << serviceUuid);

#ifndef ANDROID
    advertisingData.setServices(QList<QBluetoothUuid>() << serviceUuid);
#endif
    //! [Advertising Data]

    //! [Service Data]

    charModemIn.setUuid(modemInUuid);
    charModemIn.setValue("");
    charModemIn.setProperties(QLowEnergyCharacteristic::Write | QLowEnergyCharacteristic::WriteNoResponse);
    const QLowEnergyDescriptorData clientConfigModemIn(QBluetoothUuid::ClientCharacteristicConfiguration, QByteArray(2, 0));
    charModemIn.addDescriptor(clientConfigModemIn);

    charModemOut.setUuid(modemOutUuid);
    charModemOut.setValue(QByteArray(2, 0));
    charModemOut.setProperties(QLowEnergyCharacteristic::Notify);
    const QLowEnergyDescriptorData clientConfigModemOut(QBluetoothUuid::ClientCharacteristicConfiguration, QByteArray(2, 0));
    charModemOut.addDescriptor(clientConfigModemOut);

    charRx.setUuid(rxUuid);
    charRx.setValue(QByteArray(2, 0));
    charRx.setProperties(QLowEnergyCharacteristic::Write | QLowEnergyCharacteristic::WriteNoResponse);
    const QLowEnergyDescriptorData clientConfigRx(QBluetoothUuid::ClientCharacteristicConfiguration, QByteArray(2, 0));
    charRx.addDescriptor(clientConfigRx);

    charTx.setUuid(txUuid);
    charTx.setValue(QByteArray(2, 0));
    charTx.setProperties(QLowEnergyCharacteristic::Notify);
    const QLowEnergyDescriptorData clientConfigTx(QBluetoothUuid::ClientCharacteristicConfiguration, QByteArray(2, 0));
    charTx.addDescriptor(clientConfigTx);

    serviceData.setType(QLowEnergyServiceData::ServiceTypePrimary);
    serviceData.setUuid(serviceUuid);
    serviceData.addCharacteristic(charModemIn);
    serviceData.addCharacteristic(charModemOut);
    serviceData.addCharacteristic(charTx);
    serviceData.addCharacteristic(charRx);
    //! [Service Data]

    //! [Start Advertising]
    leController = QSharedPointer<QLowEnergyController>(QLowEnergyController::createPeripheral());
    service = QSharedPointer<QLowEnergyService>(leController->addService(serviceData));
    leController->startAdvertising(QLowEnergyAdvertisingParameters(), advertisingData, scanResponseData);

    //! [Start Advertising]

    QObject::connect(leController.data(), &QLowEnergyController::connected, this, [this]()
    {
        isInConnecting = true;
    });

    QObject::connect(leController.data(), &QLowEnergyController::disconnected, this, [this]()
    {
        isInConnecting = false;
        qDebug() << "Is disconnected";
        _application->setSelectedDeviceAddress(QString());
        _application->isBTServerConnected = false;
        emit _application->isBTServerConnectedChanged();
        isConnected = false;
        emit isConnectedChanged();
    });

    QObject::connect(service.data(), &QLowEnergyService::stateChanged, this, &BluetoothServer::onStateChanged);
    QObject::connect(service.data(), &QLowEnergyService::characteristicChanged, this, &BluetoothServer::onCharacteristicChanged);
    QObject::connect(service.data(), &QLowEnergyService::characteristicRead, this, &BluetoothServer::onCharacteristicRead);
    QObject::connect(service.data(), &QLowEnergyService::characteristicWritten, this, &BluetoothServer::onCharacteristicWritten);
    QObject::connect(service.data(), QOverload<QLowEnergyService::ServiceError>::of(&QLowEnergyService::error), this, &BluetoothServer::onError);

    auto reconnect = [ = ]()
    {
        qDebug() << "Reconnect";
        service.reset(leController->addService(serviceData));

        QObject::connect(service.data(), &QLowEnergyService::stateChanged, this, &BluetoothServer::onStateChanged);
        QObject::connect(service.data(), &QLowEnergyService::characteristicChanged, this, &BluetoothServer::onCharacteristicChanged);
        QObject::connect(service.data(), &QLowEnergyService::characteristicRead, this, &BluetoothServer::onCharacteristicRead);
        QObject::connect(service.data(), &QLowEnergyService::characteristicWritten, this, &BluetoothServer::onCharacteristicWritten);
        QObject::connect(service.data(), QOverload<QLowEnergyService::ServiceError>::of(&QLowEnergyService::error), this, &BluetoothServer::onError);

        if (!service.isNull())
            leController->startAdvertising(QLowEnergyAdvertisingParameters(), advertisingData, scanResponseData);
    };

    QObject::connect(leController.data(), &QLowEnergyController::disconnected, reconnect);
}

void BluetoothServer::write(const QString &text)
{
    qDebug() << "BluetoothServer::write " << text;

    if(text.isEmpty() == false)
    {
        auto array = text.toLocal8Bit();
        //Se inizia per 0x allora converte il comando
        if(text.startsWith("0x") && text.length() >= 4)
        {
            bool ok;
            int hex = text.mid(2, 2).toInt(&ok, 16);
            if(ok == false)
                return;

            array.remove(0, 4);
            array.insert(0, char(hex));
        }
        else
            array.insert(0, '\x19');

        if(array.back() != char(0x0A))
        {
            array.append('\x0D');
            array.append('\x0A');
        }


        QLowEnergyCharacteristic characteristic = service->characteristic(txUuid);
        service->writeCharacteristic(characteristic, text.toLocal8Bit());
    }
}

void BluetoothServer::onStateChanged(QLowEnergyService::ServiceState s)
{
    qDebug() << "serviceStateChanged, state: " << s;
}

void BluetoothServer::onCharacteristicChanged(const QLowEnergyCharacteristic &c, const QByteArray &value)
{
    qDebug() << c.uuid().toString();
    qDebug() << c.name();

    if(isInConnecting && c.uuid() == modemInUuid && value.startsWith(1))
    {
        _application->devicesListModel->clear();
        qDebug() << "Is connected";
        _application->isBTServerConnected = true;
        emit _application->isBTServerConnectedChanged();
        isConnected = true;
        emit isConnectedChanged();
    }
    else
    {
        isInConnecting = false;
        qDebug() << "Characteristic Changed: " << value;
        emit dataReceived(value);
    }
}

void BluetoothServer::onCharacteristicRead(const QLowEnergyCharacteristic &info, const QByteArray &value)
{
    Q_UNUSED(info)
    qDebug() << "Characteristic Read: " << value;
}

void BluetoothServer::onCharacteristicWritten(const QLowEnergyCharacteristic &c, const QByteArray &value)
{
    Q_UNUSED(c)
    qDebug() << "Characteristic Written: " << value;
}

void BluetoothServer::onError(QLowEnergyService::ServiceError e)
{
    Q_UNUSED(e)
    emit error("Service error:");
}

#ifndef BLUETOOTHSERVERCLASS_H
#define BLUETOOTHSERVERCLASS_H

#include <QObject>
#include <QtBluetooth/qlowenergyadvertisingdata.h>
#include <QtBluetooth/qlowenergyadvertisingparameters.h>
#include <QtBluetooth/qlowenergycharacteristic.h>
#include <QtBluetooth/qlowenergycharacteristicdata.h>
#include <QtBluetooth/qlowenergydescriptordata.h>
#include <QtBluetooth/qlowenergycontroller.h>
#include <QtBluetooth/qlowenergyservice.h>
#include <QtBluetooth/qlowenergyservicedata.h>

class BluetoothServer : public QObject
{
    Q_OBJECT
    Q_PROPERTY(bool isConnected MEMBER isConnected NOTIFY isConnectedChanged)

public:
    explicit BluetoothServer(QObject *parent = nullptr);
    Q_INVOKABLE void write(const QString &text);
    void startActivity();

signals:
    void dataReceived(const QByteArray &buffer);
    void error(const QString &error);
    void isConnectedChanged();
    void connected();
    void disconnected();

private:
    bool isStarted = false;
    QLowEnergyAdvertisingData advertisingData;
    QLowEnergyServiceData serviceData;
    QLowEnergyAdvertisingData scanResponseData;

    QBluetoothUuid serviceUuid = QBluetoothUuid(QStringLiteral("569a1101-b87f-490c-92cb-11ba5ea5167c"));
    QBluetoothUuid modemInUuid = QBluetoothUuid(QStringLiteral("569a2003-b87f-490c-92cb-11ba5ea5167c"));
    QBluetoothUuid modemOutUuid = QBluetoothUuid(QStringLiteral("569a2002-b87f-490c-92cb-11ba5ea5167c"));
    QBluetoothUuid txUuid = QBluetoothUuid(QStringLiteral("569a2000-b87f-490c-92cb-11ba5ea5167c"));
    QBluetoothUuid rxUuid = QBluetoothUuid(QStringLiteral("569a2001-b87f-490c-92cb-11ba5ea5167c"));

    QLowEnergyCharacteristicData charModemIn;
    QLowEnergyCharacteristicData charModemOut;
    QLowEnergyCharacteristicData charRx;
    QLowEnergyCharacteristicData charTx;

    QSharedPointer<QLowEnergyController> leController;
    QSharedPointer<QLowEnergyService> service;

    bool isConnected = false;
    bool isInConnecting = false;

public slots:
    void onStateChanged(QLowEnergyService::ServiceState s);
    void onCharacteristicChanged(const QLowEnergyCharacteristic &c, const QByteArray &value);
    void onCharacteristicRead(const QLowEnergyCharacteristic &info, const QByteArray &value);
    void onCharacteristicWritten(const QLowEnergyCharacteristic &c, const QByteArray &value);
    void onError(QLowEnergyService::ServiceError e);

};

#endif // BLUETOOTHSERVERCLASS_H
Bl600.png
 

Pesciolina

Active Member
Licensed User
Hello,
today I found the Laird demo app, having chosen B4A I'm not fasting on java. I have seen that the Gatt of the service has the same value as the variable of the Bleperipheral. As a client I can connect to the Bl600 server but not vice versa, can someone show me the way?
Thanks
 

Attachments

  • BleNamesResolver.java
    14.5 KB · Views: 130
  • DefinedBleUUIDs.java
    5.5 KB · Views: 154
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
Hello,
I'm asking for your help again. I modified the BlePeripheral2 library by inserting the Laird services. With the standard library he was able to associate the device to the cell now not anymore.
The beauty is that once paired if I start the demo with the edit library I can connect with the device. The manufacturer has provided me with the demo code which I am attaching
thanks for collaboration

C#:
#include "bluetoothserverclass.h"

#include <QtCore/qbytearray.h>
#include <QtCore/qlist.h>
#include <QtCore/qloggingcategory.h>
#include <QtCore/qscopedpointer.h>
#include <QtCore/qtimer.h>
#include <qlowenergyservice.h>
#include <QDebug>
#include "classes/Application.h"
#include "models/DevicesListModelEx.h"


BluetoothServer::BluetoothServer(QObject *parent) : QObject(parent)
{
}

void BluetoothServer::startActivity()
{
    if(isStarted)
        return;

    isStarted = true;

    //! [Advertising Data]
    advertisingData.setDiscoverability(QLowEnergyAdvertisingData::DiscoverabilityGeneral);
    advertisingData.setIncludePowerLevel(true);
    advertisingData.setLocalName("BTLE Server");

    scanResponseData.setServices(QList<QBluetoothUuid>() << serviceUuid);

#ifndef ANDROID
    advertisingData.setServices(QList<QBluetoothUuid>() << serviceUuid);
#endif
    //! [Advertising Data]

    //! [Service Data]

    charModemIn.setUuid(modemInUuid);
    charModemIn.setValue("");
    charModemIn.setProperties(QLowEnergyCharacteristic::Write | QLowEnergyCharacteristic::WriteNoResponse);
    const QLowEnergyDescriptorData clientConfigModemIn(QBluetoothUuid::ClientCharacteristicConfiguration, QByteArray(2, 0));
    charModemIn.addDescriptor(clientConfigModemIn);

    charModemOut.setUuid(modemOutUuid);
    charModemOut.setValue(QByteArray(2, 0));
    charModemOut.setProperties(QLowEnergyCharacteristic::Notify);
    const QLowEnergyDescriptorData clientConfigModemOut(QBluetoothUuid::ClientCharacteristicConfiguration, QByteArray(2, 0));
    charModemOut.addDescriptor(clientConfigModemOut);

    charRx.setUuid(rxUuid);
    charRx.setValue(QByteArray(2, 0));
    charRx.setProperties(QLowEnergyCharacteristic::Write | QLowEnergyCharacteristic::WriteNoResponse);
    const QLowEnergyDescriptorData clientConfigRx(QBluetoothUuid::ClientCharacteristicConfiguration, QByteArray(2, 0));
    charRx.addDescriptor(clientConfigRx);

    charTx.setUuid(txUuid);
    charTx.setValue(QByteArray(2, 0));
    charTx.setProperties(QLowEnergyCharacteristic::Notify);
    const QLowEnergyDescriptorData clientConfigTx(QBluetoothUuid::ClientCharacteristicConfiguration, QByteArray(2, 0));
    charTx.addDescriptor(clientConfigTx);

    serviceData.setType(QLowEnergyServiceData::ServiceTypePrimary);
    serviceData.setUuid(serviceUuid);
    serviceData.addCharacteristic(charModemIn);
    serviceData.addCharacteristic(charModemOut);
    serviceData.addCharacteristic(charTx);
    serviceData.addCharacteristic(charRx);
    //! [Service Data]

    //! [Start Advertising]
    leController = QSharedPointer<QLowEnergyController>(QLowEnergyController::createPeripheral());
    service = QSharedPointer<QLowEnergyService>(leController->addService(serviceData));
    leController->startAdvertising(QLowEnergyAdvertisingParameters(), advertisingData, scanResponseData);

    //! [Start Advertising]

    QObject::connect(leController.data(), &QLowEnergyController::connected, this, [this]()
    {
        isInConnecting = true;
    });

    QObject::connect(leController.data(), &QLowEnergyController::disconnected, this, [this]()
    {
        isInConnecting = false;
        qDebug() << "Is disconnected";
        _application->setSelectedDeviceAddress(QString());
        _application->isBTServerConnected = false;
        emit _application->isBTServerConnectedChanged();
        isConnected = false;
        emit isConnectedChanged();
    });

    QObject::connect(service.data(), &QLowEnergyService::stateChanged, this, &BluetoothServer::onStateChanged);
    QObject::connect(service.data(), &QLowEnergyService::characteristicChanged, this, &BluetoothServer::onCharacteristicChanged);
    QObject::connect(service.data(), &QLowEnergyService::characteristicRead, this, &BluetoothServer::onCharacteristicRead);
    QObject::connect(service.data(), &QLowEnergyService::characteristicWritten, this, &BluetoothServer::onCharacteristicWritten);
    QObject::connect(service.data(), QOverload<QLowEnergyService::ServiceError>::of(&QLowEnergyService::error), this, &BluetoothServer::onError);

    auto reconnect = [ = ]()
    {
        qDebug() << "Reconnect";
        service.reset(leController->addService(serviceData));

        QObject::connect(service.data(), &QLowEnergyService::stateChanged, this, &BluetoothServer::onStateChanged);
        QObject::connect(service.data(), &QLowEnergyService::characteristicChanged, this, &BluetoothServer::onCharacteristicChanged);
        QObject::connect(service.data(), &QLowEnergyService::characteristicRead, this, &BluetoothServer::onCharacteristicRead);
        QObject::connect(service.data(), &QLowEnergyService::characteristicWritten, this, &BluetoothServer::onCharacteristicWritten);
        QObject::connect(service.data(), QOverload<QLowEnergyService::ServiceError>::of(&QLowEnergyService::error), this, &BluetoothServer::onError);

        if (!service.isNull())
            leController->startAdvertising(QLowEnergyAdvertisingParameters(), advertisingData, scanResponseData);
    };

    QObject::connect(leController.data(), &QLowEnergyController::disconnected, reconnect);
}

void BluetoothServer::write(const QString &text)
{
    qDebug() << "BluetoothServer::write " << text;

    if(text.isEmpty() == false)
    {
        auto array = text.toLocal8Bit();
        //Se inizia per 0x allora converte il comando
        if(text.startsWith("0x") && text.length() >= 4)
        {
            bool ok;
            int hex = text.mid(2, 2).toInt(&ok, 16);
            if(ok == false)
                return;

            array.remove(0, 4);
            array.insert(0, char(hex));
        }
        else
            array.insert(0, '\x19');

        if(array.back() != char(0x0A))
        {
            array.append('\x0D');
            array.append('\x0A');
        }


        QLowEnergyCharacteristic characteristic = service->characteristic(txUuid);
        service->writeCharacteristic(characteristic, text.toLocal8Bit());
    }
}

void BluetoothServer::onStateChanged(QLowEnergyService::ServiceState s)
{
    qDebug() << "serviceStateChanged, state: " << s;
}

void BluetoothServer::onCharacteristicChanged(const QLowEnergyCharacteristic &c, const QByteArray &value)
{
    qDebug() << c.uuid().toString();
    qDebug() << c.name();

    if(isInConnecting && c.uuid() == modemInUuid && value.startsWith(1))
    {
        _application->devicesListModel->clear();
        qDebug() << "Is connected";
        _application->isBTServerConnected = true;
        emit _application->isBTServerConnectedChanged();
        isConnected = true;
        emit isConnectedChanged();
    }
    else
    {
        isInConnecting = false;
        qDebug() << "Characteristic Changed: " << value;
        emit dataReceived(value);
    }
}

void BluetoothServer::onCharacteristicRead(const QLowEnergyCharacteristic &info, const QByteArray &value)
{
    Q_UNUSED(info)
    qDebug() << "Characteristic Read: " << value;
}

void BluetoothServer::onCharacteristicWritten(const QLowEnergyCharacteristic &c, const QByteArray &value)
{
    Q_UNUSED(c)
    qDebug() << "Characteristic Written: " << value;
}

void BluetoothServer::onError(QLowEnergyService::ServiceError e)
{
    Q_UNUSED(e)
    emit error("Service error:");
}

#ifndef BLUETOOTHSERVERCLASS_H
#define BLUETOOTHSERVERCLASS_H

#include <QObject>
#include <QtBluetooth/qlowenergyadvertisingdata.h>
#include <QtBluetooth/qlowenergyadvertisingparameters.h>
#include <QtBluetooth/qlowenergycharacteristic.h>
#include <QtBluetooth/qlowenergycharacteristicdata.h>
#include <QtBluetooth/qlowenergydescriptordata.h>
#include <QtBluetooth/qlowenergycontroller.h>
#include <QtBluetooth/qlowenergyservice.h>
#include <QtBluetooth/qlowenergyservicedata.h>

class BluetoothServer : public QObject
{
    Q_OBJECT
    Q_PROPERTY(bool isConnected MEMBER isConnected NOTIFY isConnectedChanged)

public:
    explicit BluetoothServer(QObject *parent = nullptr);
    Q_INVOKABLE void write(const QString &text);
    void startActivity();

signals:
    void dataReceived(const QByteArray &buffer);
    void error(const QString &error);
    void isConnectedChanged();
    void connected();
    void disconnected();

private:
    bool isStarted = false;
    QLowEnergyAdvertisingData advertisingData;
    QLowEnergyServiceData serviceData;
    QLowEnergyAdvertisingData scanResponseData;

    QBluetoothUuid serviceUuid = QBluetoothUuid(QStringLiteral("569a1101-b87f-490c-92cb-11ba5ea5167c"));
    QBluetoothUuid modemInUuid = QBluetoothUuid(QStringLiteral("569a2003-b87f-490c-92cb-11ba5ea5167c"));
    QBluetoothUuid modemOutUuid = QBluetoothUuid(QStringLiteral("569a2002-b87f-490c-92cb-11ba5ea5167c"));
    QBluetoothUuid txUuid = QBluetoothUuid(QStringLiteral("569a2000-b87f-490c-92cb-11ba5ea5167c"));
    QBluetoothUuid rxUuid = QBluetoothUuid(QStringLiteral("569a2001-b87f-490c-92cb-11ba5ea5167c"));

    QLowEnergyCharacteristicData charModemIn;
    QLowEnergyCharacteristicData charModemOut;
    QLowEnergyCharacteristicData charRx;
    QLowEnergyCharacteristicData charTx;

    QSharedPointer<QLowEnergyController> leController;
    QSharedPointer<QLowEnergyService> service;

    bool isConnected = false;
    bool isInConnecting = false;

public slots:
    void onStateChanged(QLowEnergyService::ServiceState s);
    void onCharacteristicChanged(const QLowEnergyCharacteristic &c, const QByteArray &value);
    void onCharacteristicRead(const QLowEnergyCharacteristic &info, const QByteArray &value);
    void onCharacteristicWritten(const QLowEnergyCharacteristic &c, const QByteArray &value);
    void onError(QLowEnergyService::ServiceError e);

};

#endif // BLUETOOTHSERVERCLASS_H
View attachment 122077

If I understand rigth, that module use a popular microcontroller nRF51 then the B4X example should just work.

Have you tried the B4X demo?

If yes, what are you trying to do that you need to edit the library?
 
Upvote 0

Pesciolina

Active Member
Licensed User
Hello,
modifying the library doesn't even pair anymore, so I'm back to the official library.
Using Erel's example, the device pairs regularly but does not make the serial connection as the characteristics are different.
B4X:
Private Sub Manager_StateChanged (State As Int)
    If State <> manager.STATE_POWERED_ON Then
        ToastMessageShow("Please enable Bluetooth", True)
        NotAvailable = True
    Else
        peripheral.Initialize("peripheral", manager)
        
        
        
        If peripheral.IsPeripheralSupported = False Then
            ToastMessageShow("Peripheral mode not supported.", True)
            NotAvailable = True
        Else
            
            
            peripheral.Start("BAServerTest")
            'peripheral.Start2("BAServerTest",  CreateAdvertiseSettings)
            Wait For Peripheral_Start (Success As Boolean)
            Log("Peripheral started successfully? " & Success)
            
        End If
    End If
    SetState(False)
End Sub

Java:
mServices.put("569a1101-b87f-490c-92cb-11ba5ea5167c", "Laird Virtual Serial Port Service");
mCharacteristics.put("569a2001-b87f-490c-92cb-11ba5ea5167c", "Laird Virtual Serial Port RX");
mCharacteristics.put("569a2000-b87f-490c-92cb-11ba5ea5167c", "Laird Virtual Serial Port TX");
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
Probably you only need to edit the UUID from the example with your UUID

1. Can you upload your full app?
2.- Can you post the UUID that you are reading - use the Nordic Semiconductor App to double check that information in your Smartphone.
 
Upvote 0

Pesciolina

Active Member
Licensed User
For testing I am using the example of Erel BlePeripheral.
How can I change the UUID value?
I read that I have to change the value of the features once I have paired the device, but I don't know how to do it ??
on the forum I could not find anything suitable, I hope someone will give me a hand. Thanks
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
For testing I am using the example of Erel BlePeripheral.
How can I change the UUID value?
I read that I have to change the value of the features once I have paired the device, but I don't know how to do it ??
on the forum I could not find anything suitable, I hope someone will give me a hand. Thanks
OK please use this example,
(once you got it working you can use any example)

In order to change the UUID go to:
B4X:
Private Sub UUID(id As String) As String 'ignore
#if B4A
    Return "0000" & id.ToLowerCase & "-0000-1000-8000-00805f9b34fb" 'replace with your UUID
#else if B4I
    Return id.ToUpperCase
#End If
End Sub

Edit: I re-read the question then not sure if it can help.
 
Last edited:
Upvote 0

Pesciolina

Active Member
Licensed User
maybe I explained myself wrong, the App must do if server and the device is client, is the function you passed me good also for the server?
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
maybe I explained myself wrong, the App must do if server and the device is client, is the function you passed me good also for the server?
I'm not sure what you are trying to do; from your first pic: write "1", read data etc can be done.
 
Upvote 0

Pesciolina

Active Member
Licensed User
nothing to do.
The method you showed me is to connect as a client to the BL600 device.
On the other hand, with the cell I have to act as a server and the BL600 is a client.
 
Upvote 0
Top