SHARE
TWEET

Untitled

a guest Apr 21st, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python3
  2.  
  3. import sys
  4. from logging import DEBUG
  5. from time import sleep
  6.  
  7. from bleson import get_provider, Advertiser,UUID128,  Advertisement
  8.  
  9. UUID = "3ebdbc03-fa0e-4a14-9084-6e14412bfc40"
  10. SERVICE = "XRPTIP"
  11.  
  12. adapter = get_provider().get_adapter()
  13.  
  14. advertiser = Advertiser(adapter)
  15. advertisement = Advertisement()
  16. advertisement.name = SERVICE
  17. advertisement.uuid128s = [UUID128(UUID)]
  18.  
  19. advertiser.advertisement = advertisement
  20.  
  21. advertiser.start()
  22. print("Started advertisering on UUID %s - %s" % (UUID, SERVICE))
  23.  
  24. while True:
  25.   try:
  26.     sleep(1)
  27.   except KeyboardInterrupt:
  28.      advertiser.stop()
  29.      sys.exit()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top