BlueSwift icon indicating copy to clipboard operation
BlueSwift copied to clipboard

advertisement string does not work

Open krutitrivedi opened this issue 6 years ago • 2 comments

hi i want to match advertisement string for example from peripheral side it advertise "gtpV5nm8Znm" and central side it scan for "gtpV5nm8Znm" if both match then central able to write data so how is it possible i put this string with let configuration = try! Configuration(services: [service], advertisement: "1004FD87-820F-438A-B757-7AC2C15C2D56") but it give me error

krutitrivedi avatar Feb 27 '19 05:02 krutitrivedi

@krutitrivedi could you share entire piece of code that does not work? :) Fro what I see here gtpV5nm8Znm can just not match the general pattern for UUID's, but I can't say more without seeing more of your code ;)

poszposz avatar Mar 05 '19 15:03 poszposz

lazy var peripheral: Peripheral<Advertisable> = { let configuration = try! Configuration(services: [service], advertisement: "1004FD87-820F-438A-B757-7AC2C15C2D56") return Peripheral(configuration: configuration, advertisementData: [.localName("Test"), .servicesUUIDs("gtvpV5nm8ZnmMJD")])

}()

krutitrivedi avatar Mar 08 '19 04:03 krutitrivedi

Closing due to inactivity

Siemian avatar Jan 12 '23 20:01 Siemian