Disconnect from ble device in app designer
이전 댓글 표시
Hi everyone,
I am trying to disconnect from a ble device in app desginer, but somehow "clear app.ble" or "clear ble" does not work. I am still connected after that. Does anybody know how to disconnect properly?
댓글 수: 4
Geoff Hayes
2022년 7월 6일
편집: Geoff Hayes
2022년 7월 6일
@Niklas Maximilian Busse - can you disconnect from the ble device outside of App Designer (like from the command line)? Can you show us the code where you create the connection? Is the variable/member really named ble like the ble function?
Niklas Maximilian Busse
2022년 7월 6일
Geoff Hayes
2022년 7월 8일
@Niklas Maximilian Busse - how does
properties (Access = private)
Device ble % Description
? Are you defining two properties, one called Device and the other ble? I see the code
clear app.Device
but you indicate that it doesn't work. Is that because when you try to re-connect, you get an error saying "already connected" (or something similar)? Have you tried just setting
app.Device = [];
which I've seen in the forum but I'm not sure if that will work as expected.
I was able to connect to a device (from the command line) and the clear seemed to work (in that I could then re-connect to the same device). I didn't try from within an app though.
Niklas Maximilian Busse
2022년 7월 8일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Data Acquisition Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!