This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Function of ScanStart in Mesh SDK

How does scanstart serial command work in the Mesh SDK?

According to the documentation, it appears that the command lists out unprovisioned beacons. I get a success response but nothing seems to happen in my interactive terminal.

I am trying to setup a BLE mesh network where a node scans for beacons (that are not part of the Mesh) and transmits the MAC ids back to master. I would like to print the available beacons via serial port. How do I accomplish this? Should I combine my Mesh SDK and my nRF SDK to accomplish scanning for nearby devices?

Parents
  • Scan start should start the reporting of incoming unprovisioned beacons. This is done with the Prov Unprovisioned Received event.

    This seems to be the relevant part in provisioning.py

    def __event_handler(self, event):
        if event._opcode == Event.PROV_UNPROVISIONED_RECEIVED:
            if event._data not in self.__unprov_list:
                uuid_fmt = str(hexlify(event._data["uuid"]), 'ascii').upper()
                self.logger.info(
                    "Received UUID {} with RSSI: -{} dB".format(
                        uuid_fmt, event._data["rssi"]))
                self.__unprov_list.add(event._data)
    

    Looks like the address isn't printed, but I guess you can add that yourself.

    But if you get nothing printed this is not the problem.

Reply
  • Scan start should start the reporting of incoming unprovisioned beacons. This is done with the Prov Unprovisioned Received event.

    This seems to be the relevant part in provisioning.py

    def __event_handler(self, event):
        if event._opcode == Event.PROV_UNPROVISIONED_RECEIVED:
            if event._data not in self.__unprov_list:
                uuid_fmt = str(hexlify(event._data["uuid"]), 'ascii').upper()
                self.logger.info(
                    "Received UUID {} with RSSI: -{} dB".format(
                        uuid_fmt, event._data["rssi"]))
                self.__unprov_list.add(event._data)
    

    Looks like the address isn't printed, but I guess you can add that yourself.

    But if you get nothing printed this is not the problem.

Children
Related