| 1 | #!/usr/bin/perl
|
|---|
| 2 | #
|
|---|
| 3 | # Login to the nodes and setup Bluetooth
|
|---|
| 4 | #
|
|---|
| 5 |
|
|---|
| 6 | # MAC of the master node
|
|---|
| 7 | $mac='00:0A:3A:53:D4:82';
|
|---|
| 8 | print "Master MAC address $mac \n";
|
|---|
| 9 |
|
|---|
| 10 | system("ssh root\@node1-10 pand --listen -role NAP --master --autozap");
|
|---|
| 11 | print "ssh root\@node1-10 pand --listen -role NAP --master --autozap \n";
|
|---|
| 12 | sleep 10;
|
|---|
| 13 |
|
|---|
| 14 | system("ssh root\@node4-10 pand --connect $mac --service NAP --autozap");
|
|---|
| 15 | print "ssh root\@node4-10 pand --connect $mac --service NAP --autozap \n";
|
|---|
| 16 | sleep 10;
|
|---|
| 17 |
|
|---|
| 18 | system("ssh root\@node4-10 ifconfig bnep0 192.169.1.2; exit");
|
|---|
| 19 | print "ssh root\@node4-10 ifconfig bnep0 192.169.1.2; exit \n";
|
|---|
| 20 |
|
|---|
| 21 | system("ssh root\@node1-10 ifconfig bnep0 192.169.1.1; exit");
|
|---|
| 22 | print "ssh root\@node1-10 ifconfig bnep0 192.169.1.1; exit \n";
|
|---|