change ssh command with gatttool --listen
This commit is contained in:
parent
7f730aefa1
commit
0796690559
@ -47,7 +47,7 @@ use JSON;
|
|||||||
use Blocking;
|
use Blocking;
|
||||||
|
|
||||||
|
|
||||||
my $version = "2.0.6debug3";
|
my $version = "2.0.6debug5";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -465,9 +465,9 @@ sub XiaomiBTLESens_ExecGatttool_Run($) {
|
|||||||
$cmd .= "gatttool -i $hci -b $mac ";
|
$cmd .= "gatttool -i $hci -b $mac ";
|
||||||
$cmd .= "--char-read -a $handle" if($gattCmd eq 'read');
|
$cmd .= "--char-read -a $handle" if($gattCmd eq 'read');
|
||||||
$cmd .= "--char-write-req -a $handle -n $value" if($gattCmd eq 'write');
|
$cmd .= "--char-write-req -a $handle -n $value" if($gattCmd eq 'write');
|
||||||
$cmd = "timeout -s 9 10 ".$cmd." --listen" if( AttrVal($name,"model","none") eq 'thermoHygroSens' and $gattCmd eq 'write' and $handle eq '0x10');
|
|
||||||
$cmd .= " 2>&1 /dev/null";
|
$cmd .= " 2>&1 /dev/null";
|
||||||
$cmd .= "'" if($sshHost ne 'none');
|
$cmd .= "'" if($sshHost ne 'none');
|
||||||
|
$cmd = "ssh $sshHost 'timeout 15 gatttool -i $hci -b $mac --char-write-req -a $handle -n $value --listen 2>&1 /dev/null'" if( AttrVal($name,"model","none") eq 'thermoHygroSens' and $gattCmd eq 'write' and $handle eq '0x10');
|
||||||
$cmd = "ssh $sshHost 'gatttool -i $hci -b $mac --char-write-req -a 0x33 -n A01F && gatttool -i $hci -b $mac --char-read -a 0x35 2>&1 /dev/null'" if($sshHost ne 'none' and $gattCmd eq 'write' and AttrVal($name,"model","none") eq 'flowerSens');
|
$cmd = "ssh $sshHost 'gatttool -i $hci -b $mac --char-write-req -a 0x33 -n A01F && gatttool -i $hci -b $mac --char-read -a 0x35 2>&1 /dev/null'" if($sshHost ne 'none' and $gattCmd eq 'write' and AttrVal($name,"model","none") eq 'flowerSens');
|
||||||
|
|
||||||
$loop = 0;
|
$loop = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user