wabisabit / ble-osc

Receiving data from Bluetooth LE and forwarding it through OSC to Max
19 stars 1 forks source link

connecting and disconnecting #5

Open asha-blue opened 7 years ago

asha-blue commented 7 years ago

Hi Roman,

I have the same hardware as you: the HM-10 and the MPU-6050 connected to an Arduino Uno. The SCL is in A5 of the Arduino and the SDA in the A4. The TX of the HM-10 is on pin 7 and the RX on pin 8. I am getting the following info after uncommenting the console.log lines in the ble-osc.js file.

Are those the same connections you are using?

Below is the info I get from the terminal

poweredOn
Discovered: MLT-BT05
Connected to MLT-BT05
[ Characteristic {
    _noble: 
     Noble {
       state: 'poweredOn',
       address: '6c:40:08:a8:c1:7b',
       _bindings: [Object],
       _peripherals: [Object],
       _services: [Object],
       _characteristics: [Object],
       _descriptors: [Object],
       _discoveredPeripheralUUids: [Object],
       _events: [Object],
       _eventsCount: 3,
       _allowDuplicates: false },
    _peripheralId: '4d9eadafbbb841679690bb747e418f6c',
    _serviceUuid: '180a',
    uuid: '2a23',
    name: 'System ID',
    type: 'org.bluetooth.characteristic.system_id',
    properties: [ 'read' ],
    descriptors: null },
  Characteristic {
    _noble: 
     Noble {
       state: 'poweredOn',
       address: '6c:40:08:a8:c1:7b',
       _bindings: [Object],
       _peripherals: [Object],
       _services: [Object],
       _characteristics: [Object],
       _descriptors: [Object],
       _discoveredPeripheralUUids: [Object],
       _events: [Object],
       _eventsCount: 3,
       _allowDuplicates: false },
    _peripheralId: '4d9eadafbbb841679690bb747e418f6c',
    _serviceUuid: '180a',
    uuid: '2a24',
    name: 'Model Number String',
    type: 'org.bluetooth.characteristic.model_number_string',
    properties: [ 'read' ],
    descriptors: null },
  Characteristic {
    _noble: 
     Noble {
       state: 'poweredOn',
       address: '6c:40:08:a8:c1:7b',
       _bindings: [Object],
       _peripherals: [Object],
       _services: [Object],
       _characteristics: [Object],
       _descriptors: [Object],
       _discoveredPeripheralUUids: [Object],
       _events: [Object],
       _eventsCount: 3,
       _allowDuplicates: false },
    _peripheralId: '4d9eadafbbb841679690bb747e418f6c',
    _serviceUuid: '180a',
    uuid: '2a25',
    name: 'Serial Number String',
    type: 'org.bluetooth.characteristic.serial_number_string',
    properties: [ 'read' ],
    descriptors: null },
  Characteristic {
    _noble: 
     Noble {
       state: 'poweredOn',
       address: '6c:40:08:a8:c1:7b',
       _bindings: [Object],
       _peripherals: [Object],
       _services: [Object],
       _characteristics: [Object],
       _descriptors: [Object],
       _discoveredPeripheralUUids: [Object],
       _events: [Object],
       _eventsCount: 3,
       _allowDuplicates: false },
    _peripheralId: '4d9eadafbbb841679690bb747e418f6c',
    _serviceUuid: '180a',
    uuid: '2a26',
    name: 'Firmware Revision String',
    type: 'org.bluetooth.characteristic.firmware_revision_string',
    properties: [ 'read' ],
    descriptors: null },
  Characteristic {
    _noble: 
     Noble {
       state: 'poweredOn',
       address: '6c:40:08:a8:c1:7b',
       _bindings: [Object],
       _peripherals: [Object],
       _services: [Object],
       _characteristics: [Object],
       _descriptors: [Object],
       _discoveredPeripheralUUids: [Object],
       _events: [Object],
       _eventsCount: 3,
       _allowDuplicates: false },
    _peripheralId: '4d9eadafbbb841679690bb747e418f6c',
    _serviceUuid: '180a',
    uuid: '2a27',
    name: 'Hardware Revision String',
    type: 'org.bluetooth.characteristic.hardware_revision_string',
    properties: [ 'read' ],
    descriptors: null },
  Characteristic {
    _noble: 
     Noble {
       state: 'poweredOn',
       address: '6c:40:08:a8:c1:7b',
       _bindings: [Object],
       _peripherals: [Object],
       _services: [Object],
       _characteristics: [Object],
       _descriptors: [Object],
       _discoveredPeripheralUUids: [Object],
       _events: [Object],
       _eventsCount: 3,
       _allowDuplicates: false },
    _peripheralId: '4d9eadafbbb841679690bb747e418f6c',
    _serviceUuid: '180a',
    uuid: '2a28',
    name: 'Software Revision String',
    type: 'org.bluetooth.characteristic.software_revision_string',
    properties: [ 'read' ],
    descriptors: null },
  Characteristic {
    _noble: 
     Noble {
       state: 'poweredOn',
       address: '6c:40:08:a8:c1:7b',
       _bindings: [Object],
       _peripherals: [Object],
       _services: [Object],
       _characteristics: [Object],
       _descriptors: [Object],
       _discoveredPeripheralUUids: [Object],
       _events: [Object],
       _eventsCount: 3,
       _allowDuplicates: false },
    _peripheralId: '4d9eadafbbb841679690bb747e418f6c',
    _serviceUuid: '180a',
    uuid: '2a29',
    name: 'Manufacturer Name String',
    type: 'org.bluetooth.characteristic.manufacturer_name_string',
    properties: [ 'read' ],
    descriptors: null },
  Characteristic {
    _noble: 
     Noble {
       state: 'poweredOn',
       address: '6c:40:08:a8:c1:7b',
       _bindings: [Object],
       _peripherals: [Object],
       _services: [Object],
       _characteristics: [Object],
       _descriptors: [Object],
       _discoveredPeripheralUUids: [Object],
       _events: [Object],
       _eventsCount: 3,
       _allowDuplicates: false },
    _peripheralId: '4d9eadafbbb841679690bb747e418f6c',
    _serviceUuid: '180a',
    uuid: '2a2a',
    name: 'IEEE 11073-20601 Regulatory Certification Data List',
    type: 'org.bluetooth.characteristic.ieee_11073-20601_regulatory_certification_data_list',
    properties: [ 'read' ],
    descriptors: null },
  Characteristic {
    _noble: 
     Noble {
       state: 'poweredOn',
       address: '6c:40:08:a8:c1:7b',
       _bindings: [Object],
       _peripherals: [Object],
       _services: [Object],
       _characteristics: [Object],
       _descriptors: [Object],
       _discoveredPeripheralUUids: [Object],
       _events: [Object],
       _eventsCount: 3,
       _allowDuplicates: false },
    _peripheralId: '4d9eadafbbb841679690bb747e418f6c',
    _serviceUuid: '180a',
    uuid: '2a50',
    name: 'PnP ID',
    type: 'org.bluetooth.characteristic.pnp_id',
    properties: [ 'read' ],
    descriptors: null },
  Characteristic {
    _noble: 
     Noble {
       state: 'poweredOn',
       address: '6c:40:08:a8:c1:7b',
       _bindings: [Object],
       _peripherals: [Object],
       _services: [Object],
       _characteristics: [Object],
       _descriptors: [Object],
       _discoveredPeripheralUUids: [Object],
       _events: [Object],
       _eventsCount: 3,
       _allowDuplicates: false },
    _peripheralId: '4d9eadafbbb841679690bb747e418f6c',
    _serviceUuid: 'ffe0',
    uuid: 'ffe1',
    name: null,
    type: null,
    properties: [ 'read', 'writeWithoutResponse', 'write', 'notify' ],
    descriptors: null } ]
wabisabit commented 7 years ago

Looking at the name of your BLE device, it seems it's a different clone of the HM-10. Maybe that's why it disconnects. https://blog.yavilevich.com/2017/03/mlt-bt05-ble-module-a-clone-of-a-clone/

asha-blue commented 7 years ago

I will look into this! Thanks!

esridhar126 commented 6 years ago

Hi everyone, I am working on the BLE 4.0, HM-10(CC2540/CC2541) module for my product updation from Bluetooth 2.0. Main controller i am using is Arduino Uno/ Mega. For 2.0 I easily got Firmata from Arduino examples, but BLE4.0 is more advanced one having many specs to interface, i cant get a Firmata from anywhere. In arduino also its available for minimum modules that doesnot include Arduino mega/Uno.

Is anyone from here suggest me or help how to interface my Microcontroller with API/ APk apps with or without using Standard Firmata BLE. (If it is with standard Firmata it is more helpful.) My main motive is to control my product with IOS.