Giter VIP home page Giter VIP logo

easyble's People

Contributors

dsesen avatar ficat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

easyble's Issues

read Characteristic value max length is 20 ?

hello @Ficat
i am calling this function in notify call back to read the data that come from my BLE device

@Override
        public void onCharacteristicChanged(byte[] data, BleDevice device) {
          readValue = new String(data);
          System.out.println(data.length);
        }

and i get length of data is 20 and my ble device send data of 50 to 60 character string.
how can i increase the size of the data to read all value that come from my BLE device?

write Characteristics

I call write Characteristics with static value after the device is connected like that :

if (characteristicInfo.writable) {
                    writeCharacteristic = characteristicInfo;
                    String str = "c100";
                    if (TextUtils.isEmpty(str)) {
                        Toast.makeText(getActivity(), getResources().getString(R.string.tips_write_operation), Toast.LENGTH_SHORT).show();
                        return;
                    }
                    BleManager.getInstance().write(device, e.getKey().uuid, writeCharacteristic.uuid, ByteUtils.hexStr2Bytes(str), writeCallback);
                }
private BleWriteCallback writeCallback = new BleWriteCallback() {
        @Override
        public void onWriteSuccess(byte[] data, BleDevice device) {
            Logger.e("write success:" + ByteUtils.bytes2HexStr(data));
        }

        @Override
        public void onFailure(int failCode, String info, BleDevice device) {
            Logger.e("write fail:" + info);
            Logger.e("write failCode:" + failCode);
        }
    };

and I get onFailure :
write fail:write fail because of unknown reason
write failCode:201

@Ficat can you please help me to solve this ?

Scan options

i want to set a static service UUID in scan option like this:
private UUID uuid = UUID.fromString(serviceUUID);
BleManager.ScanOptions scanOptions = BleManager.ScanOptions .newInstance() .scanPeriod(4000) .scanDeviceName(null) .scanServiceUuids(uuid);

but it's throw error:

Required type: UUID[]
Provided: UUID

@Ficat how to set array for this ?

didn't get any BLE device in android 12

I upgrade my api version target sdk version is 32 and i am getting null onLeScan() in device

BleManager.toggleBluetooth(true); is also not working for this version

how can I fix these issues please help !

Write notifications

Hi, im trying to send notification with the write method of your sample, the problem is that the method dont send the complete message, i tried write to batch but didnt work. Can you help me pls?

Not readalble

Read characteristics always return 201 code that is characteristics not readable.

tap on back button BLE device disconnect

When coming back to the home screen from the Bluetooth screen I get “bluetoothGatt: close()” and the BLE device disconnects.
What can I do to solve this problem?

save to shared preferences

hi. whe a device is selected is it possible to save it to shared preferences so when the app is opened again it will try to connect with out scanning?
ive tried saving the device and then assign it to device but get app crash.
thank you

Create socket

How can i create a BluetoothSocket after i connected a BLE device and use

bluetoothSocket.connect();
outputStream = bluetoothSocket.getOutputStream();

Not detect BLE device without paired

It not detect BLE device without paired. I checked twice. I scan BLE device its not detect but once i paired it manually through phone setting and then rescan it through app and it detect. so without paired its not detect?

  • I allowed all required permissions.

custom data field to send to device ble center

writing custom code to the ble device, can you please add a field where we can add service uuid and character uuid and write hex code to the device?
or just advice me how to use manager to send text to ble using service_uuid and character_uuid
thank you!

HI NICE TO MEET YOU

I checked multiple connect & send message.
But i didn't checked read data.

HM-10 <-> APP <-> HM-10

if i send to message in app to HM-10(BLE Module) It was checked it.

if i send to message in hm-10(using to terminal) to APP, but it was not wokring.

How to received data from hm-10 to app?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.