Navigation

    Welcome to the Pycom forum

    Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Tags
    3. bluetooth
    Log in to post

    • F

      Serial over bluetooth implementation
      Discussion • bluetooth serial documentation bluetoorh bl • • francoisMorillon  

      1
      2
      Votes
      1
      Posts
      559
      Views

      No one has replied

    • A

      Bluetooth on Lopy4 doesn't detect any device
      LoPy • lopy4 bluetooth scan • • AlejandroReyes  

      2
      0
      Votes
      2
      Posts
      669
      Views

      dan

      Hi @AlejandroReyes, I've just tried this code and managed to find my BT headphones with it. The issue could be that your devices don't use BLE, so the LoPy board couldn't find them. Currently, only BLE is supported. You can find more on this on the Bluetooth docs page. Let me know if this helped!
    • L

      Visualised acc data on app via Bluetooth using Pysense/Lopy4
      Guides • lopy4 pysense bluetooth accelerometer • • luke89  

      1
      0
      Votes
      1
      Posts
      693
      Views

      No one has replied

    • A

      FiPy-Android Bluetooth Communication
      Discussion • fipy ble bluetooth ble send data ble connect • • Alon  

      1
      0
      Votes
      1
      Posts
      653
      Views

      No one has replied

    • N

      WiPy, send and receive bytes from service characteristic
      WiPy 2&3 • bluetooth • • nick9995  

      3
      0
      Votes
      3
      Posts
      888
      Views

      N

      Thanks! That answers my question!
    • N

      External directional bluetooth antenna?
      Comments & Feedback • bluetooth wipy3.0 antenna directional • • nicobijl  

      5
      0
      Votes
      5
      Posts
      1546
      Views

      J

      @nicobijl Interesting use case, though you'll be faced with reflections and multipath which may give you false results, depending on the exact layout (and most importantly, distances). Also, you should check the gain of your antenna in various directions, it's not because it's "concentrated" in some directions that it doesn't receive anything in others. Note also that if you do anything that transmits (active scanning, which I believe is the default now?), using a directional antenna means more gain, which may bring you above the allowed TX power threshold (depends on your region). Conversely, at short distances the high gain main saturate the receiver. Finally, one would need to check the exact radiation pattern, but I'm not sure 4 such antennas would be enough to cover 360°, they have a relatively narrow aperture. Let us know what you find out!
    • N

      Bluetooth Major ID
      Comments & Feedback • ble bluetooth wipy3.0 • • nicobijl  

      1
      0
      Votes
      1
      Posts
      532
      Views

      No one has replied

    • B

      Bluetooth GATTSCharacteristic set permissions
      Discussion • ble bluetooth characteristic permission • • binux  

      2
      0
      Votes
      2
      Posts
      679
      Views

      B

      Got the issue sorted out myself. The values are documented in the esp-idf: https://github.com/espressif/esp-idf/blob/master/components/bt/bluedroid/api/include/esp_gatt_defs.h#L267 just set the values corresponding to your needs. Be sure to set both permissions and properties. Example: The below characteristic supports only READ and NOTIFY: service.characteristic(uuid=0x2001, permissions=(1<<0), properties=(1 << 1) | (1 << 4), value=0)
    • M

      Maximum characteristics that can be created in a service
      FiPy • fipy ble pycom bluetooth gatt • • mdk22  

      1
      0
      Votes
      1
      Posts
      588
      Views

      No one has replied

    • S

      Bluetooth Low Energy (BLE) Security via Encryption
      WiPy 2&3 • bluetooth encryption • • semireg  

      7
      0
      Votes
      7
      Posts
      2372
      Views

      N

      Hello @jmarcelino, do you know if this is already available in any Pycom's firmware?
    • S

      Reading data from bluetooth device
      LoPy • bluetooth gatt • • sam_uk  

      7
      0
      Votes
      7
      Posts
      3022
      Views

      L

      @seb I write this code to be able to find where it doesn't work from network import Bluetooth import time bt = Bluetooth() print("searching") bt.start_scan(-1) print("connection") conn = bt.connect('C47C8D643FAF') print("connected") def characteristic_callback(char): v = int.from_bytes(char.value(), "little") print("Got new value: {}".format(v)) print("before services") services = conn.services() print("services") for service in services: print("Service: {}".format(service.uuid())) if service.uuid() == b'XXXXXXXXXXXXX': characteristics = service.characteristics() for characteristic in characteristics: print("Characteristic: {}".format(characteristic.uuid())) if characteristic.uuid() == b'XXXXXXXXXXXX': characteristic.callback(trigger=Bluetooth.CHAR_NOTIFY_EVENT, handler=characteristic_callback, arg=None) So, in the terminal it print searching connection connected before services So it never reach the line : services = conn.services() in the page https://wiki.hackerspace.pl/projects:xiaomi-flora , it's specified that "You need to write 0xA01F to the handle 0x0033 to enable real-time data reading " How can I write the value 0xA01F in the handle 0x0033 ? Thanks in advance for your precious help.
    • S

      BLE Features - non-blocking connects, char presentation format
      WiPy 2&3 • ble bluetooth • • semireg  

      1
      1
      Votes
      1
      Posts
      949
      Views

      No one has replied

    • N

      Set Bluetooth MAC address
      Enhancements • bluetooth • • nick_aus  

      2
      0
      Votes
      2
      Posts
      1039
      Views

      jmarcelino

      @nick_aus Those are constants used to determine the addr_type returned by bluetooth.get_adv() There is currently no method to change the public Bluetooth MAC address. I'll add that as a feature request.
    • S

      Callback when BLE client subscribes to notify characteristic?
      WiPy 2&3 • ble bluetooth • • semireg  

      8
      1
      Votes
      8
      Posts
      3364
      Views

      jmarcelino

      @semireg Thank a lot, looks great. Good call on catching the descriptor write in modbt.c We'll review it and it should make into the next release.
    • P

      Explain BLE Example Code
      Discussion • ble bluetooth wipy 2.0 • • panos29  

      1
      0
      Votes
      1
      Posts
      1469
      Views

      No one has replied

    • S

      Any plans for Bluetooth 5?
      Comments & Feedback • bluetooth new project features bluetooth-5 • • sandipg  

      2
      0
      Votes
      2
      Posts
      881
      Views

      jmarcelino

      @sandipg No, sadly the ESP32 microcontroller we use will not support Bluetooth 5.
    • iber

      LoPy Bluetooth characteristic buffer size
      LoPy • lopy ble bluetooth ble send data mobile • • iber  

      2
      0
      Votes
      2
      Posts
      988
      Views

      jmarcelino

      @iber That's normal because it's not really a buffer, Bluetooth LE characteristics are usually restricted to 20 bytes by the protocol - it's what fits in the BLE packet - so unless you negotiate a larger MTU (larger packets than standard) between peers or use Long attributes you are restricted to that amount. Neither of those extended techniques are currently supported.
    • M

      Bluetooth and serial connection at the same time
      MicroPython • lopy micropython bluetooth serial • • monersss  

      4
      0
      Votes
      4
      Posts
      1208
      Views

      C

      Hi...I haven't found anything short of implementing a significant chunk of the bluetooth protocol stack (which I have no desire to take on).All of the bluetooth modules I've been able to find are similar to the one used by the arduino BT in that they only support one serial connection. smt assembly service
    • soren

      errno 12 ENOMEM ?
      LoPy • lopy bluetooth enomem beacons errno 12 • • soren  

      21
      0
      Votes
      21
      Posts
      8037
      Views

      A

      @alvaroav Dear all, Some advances by the end of the week. I have tried from a clean code, just building a new program. I come back to the option to open the socket, send all data in a loop, and at the end of the loop, close the socket. I am not so sure why, BUT now the ENOMEM error just appears from time to time. Moreover, I don't need any server (blocking or non-blocking) running. Moreover, I place this exception into the loop, and allow me to "reconnect" and continue the program even if an error appers. flag = 1 Nerrors = 0; socketUDP = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) while (flag<200): time.sleep(0.05) data=bytes() data = data + b'counter = ' + bytes(str(flag),'utf-8') try: sent = socketUDP.sendto(data, addr) print(data) led.toggle() flag=flag+1 except OSError: Nerrors+=1 print('error ', Nerrors) continue socketUDP.close() I am thinking that the problem might come from the wifi connection to the router... I will check this next week. BR
    • J

      Unable to get Service from Bluetooth Sensor Device
      WiPy 2&3 • bluetooth getting started import gattcconnection service • • jmahesh  

      2
      0
      Votes
      2
      Posts
      826
      Views

      S

      please add time.sleep after connection and make service as dictionary, things will work...
    • 1
    • 2
    • 3
    • 4
    • 5
    • 2 / 5