The Thunderboard Forum is no longer active. If you would like to post a question regarding Thunderboard Kits, please use the Bluetooth Forum.

This discussion and its replies are closed

The Thunderboard sense is awesome. I am having issues keeping the BLE connectivity even when the sensor is close to my raspberry PI. Is there a way to reestablish connectivity without pressing the reset button (remote reset or soft reset)? Is there a better way to maintain/ have more reliable connectivity maybe through zigbee?

  • Bluetooth Low Energy
  • Discussion Forums
  • Thunderboard Kits
Unanswered
  • Hi,

     

    Why would you have to hit the reset button, can't you just re-connect from the Pi side? Maybe the Pi's TX signal is too high, try to increase the supervision timeout.

     

    Regards,

    Tiago

    0
  • Could you let me know where I can modify that parameter? Also, how can I do a soft reset if connection is lost or change to listening mode without having to push the button physically?
    0
  • Hi,

     

    You can do it from the slave side with  le_connection_parameters command. However, it is not guaranteed that the master will accept the new parameters so you can also do that from the Raspberry Pi side, I don't know how that's done.

     

    Regards,

    Tiago

    0
  • I am new to the board. Can you give me an example where to use this connection command on the slave ? The way it looks is that somehow the connection is lost every time I pulled data from the board and then the PI can't find the board for a couple of seconds and then it connects again and does this for 12 hr or so but eventually I can't connect. Looks like I should keep the board in advertising mode to accept connections all the time but don't know how. On the PI side (master), would you do the supervision connection on the ble side (I use bluepy) if so do you know of any places I can find sample code?
    0
  • This is what I see: Thunder Sense #44267 UV Index: 0 Pressure: 793.707 Temperature: 26.48 C Sound Level: 64.91 tVOC: 26 eCO2: 571 Humidity: 35.74 %RH Ambient Light: 14.97 Lux JSON updated No Thunderboard Sense devices found! Traceback (most recent call last): File "tbsense_scan.py", line 152, in thunderboards = getThunderboards() File "tbsense_scan.py", line 45, in getThunderboards tbsense[deviceId] = Thunderboard(dev) File "/home/openhabian/thundercloud/tbsense.py", line 23, in __init__ ble_service.connect(dev.addr, dev.addrType) File "/home/openhabian/thundercloud/bluepy/btle.py", line 408, in connect self._connect(addr, addrType, iface) File "/home/openhabian/thundercloud/bluepy/btle.py", line 402, in _connect "Failed to connect to peripheral %s, addr type: %s" % (addr, addrType)) bluepy.btle.BTLEException: Failed to connect to peripheral 00:0b:57:51:ac:eb, addr type: public
    0
  • I have sucessfully managed to keep a RPi connected for 3 weeks until I turned it off. To achive the constant advertising I made a change in radio_ble.c as follows:

    #ifndef DEBUG
      if ( (loopCount - advStartedLC) > sleepTimeout ) {
        /*  printf("\r\nSleep! %u %u", loopCount, advStartedLC); */
    	  loopCount = 0; // added to make infinite wait
        /* removed to make infinite wait
          if ( !UTIL_isLowPower() ) {
          MAIN_deInitSensors();
        }
        BOARD_picWriteReg(BOARD_PIC_REG_INT_CLEAR, 0);
        BOARD_ledSet(0x00);
        UTIL_shutdown();
      */
    }

    Basicaly removed the timeout.

    I then ran it from a USB charger.

    I hope this helps

     

    Yours Simon M.

    0