Hi All,
I use a switch called blue2 in an app for OS X, Windows and iOS.
Is there a way to know if a switch is connected ?
Here is the doc about blue2 switch : https://www.ablenetinc.com/blue2-bluetooth-switch
Best regards
Jean-Marc
detecting if a switch is connected
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
detecting if a switch is connected
https://alternatic.ch
Re: detecting if a switch is connected
Perhaps you should give a little more information, e.g. about how you communicate with the switch.
Mark
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: detecting if a switch is connected
Hi Jean-Marc,
you are looking for commandline tools, I presume.
On Mac I use the built-in "system_profiler":
put shell("system_profiler -timeout 20 SPBluetoothDataType") into fld 1
Timeout, if any, is here in seconds.
On Windows 7/10 I use (seldom) third-party tools:
http://www.nirsoft.net/utils/bluetoothcl.html
http://bluetoothinstaller.com/bluetooth ... ine-tools/
Hermann
you are looking for commandline tools, I presume.
On Mac I use the built-in "system_profiler":
put shell("system_profiler -timeout 20 SPBluetoothDataType") into fld 1
Timeout, if any, is here in seconds.
On Windows 7/10 I use (seldom) third-party tools:
http://www.nirsoft.net/utils/bluetoothcl.html
http://bluetoothinstaller.com/bluetooth ... ine-tools/
Hermann
shiftLock happens
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: detecting if a switch is connected
Hi Hermann,
Thanks a lot.
Exactly what I need for OS X but I haven't enough knowledge to understand what i have to do for windows.
I also search an iOS way.
@ Mark
This is a bluetooth switch. It can send two keyboard messages
Best regards
Jean-Marc
Thanks a lot.
You presume that my knowledge is larger than it isyou are looking for commandline tools, I presume.
Exactly what I need for OS X but I haven't enough knowledge to understand what i have to do for windows.
I also search an iOS way.
@ Mark
This is a bluetooth switch. It can send two keyboard messages
Best regards
Jean-Marc
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: detecting if a switch is connected
J-M.
For iOS (and also MacOS) you could use "mergBLE" (scroll down page):
https://livecode.com/merging-with-mergext/
For the demo you could look** into the app's contents:
"LiveCode Indy 8.0.0 (rc 1).app/Contents/Tools/MergExt/mergBLE-1.1.4/mergBLE.livecode".
For windows you could download the tools
http://bluetoothinstaller.com/bluetooth ... ine-tools/
and then use
get shell("btdiscovery -d""e&"%a%""e)
H.
_________
[** Edit. MergExt is contained in the new LC 800-rc1 Indy-release (of Apr 12, 2016)]
For iOS (and also MacOS) you could use "mergBLE" (scroll down page):
https://livecode.com/merging-with-mergext/
For the demo you could look** into the app's contents:
"LiveCode Indy 8.0.0 (rc 1).app/Contents/Tools/MergExt/mergBLE-1.1.4/mergBLE.livecode".
For windows you could download the tools
http://bluetoothinstaller.com/bluetooth ... ine-tools/
and then use
get shell("btdiscovery -d""e&"%a%""e)
H.
_________
[** Edit. MergExt is contained in the new LC 800-rc1 Indy-release (of Apr 12, 2016)]
shiftLock happens