| 1 |
This is a howto about configuring TCP L-in downs |
| 2 |
================================================ |
| 3 |
|
| 4 |
Here is described how one can configure transports wlan and run NoTA tests over it. |
| 5 |
|
| 6 |
On Ubuntu Laptop (using wlan usb adapter): |
| 7 |
========================================= |
| 8 |
a) Assign static-ip by adding the following usb interface to the /etc/network/interface file. |
| 9 |
|
| 10 |
# added for wlan0 connection static-ip |
| 11 |
auto wlan0 |
| 12 |
iface wlan0 inet static |
| 13 |
wireless-mode ad-hoc |
| 14 |
wireless-channel 4 |
| 15 |
wireless-essid 'test' |
| 16 |
wireless-key 1234567890 |
| 17 |
address 169.254.106.224 |
| 18 |
netmask 255.255.255.0 |
| 19 |
gateway 169.254.255.255 |
| 20 |
|
| 21 |
b) Restart the ip-network. sudo /etc/init.d/networking restart |
| 22 |
c) ifconfig -a (this will show ip as 169.254.106.224 in the wlan0) |
| 23 |
d) iwconfig will show the wlan connection and settings.It will show the cell id too.It should be same for the devices connected together. |
| 24 |
e) ping/scp with ip of the tablet(Make sure tablet is connected to the PC Ad-hoc network using wlan option and then run ifconfig in N810 to find the ip) |
| 25 |
|
| 26 |
|
| 27 |
On N810: |
| 28 |
======== |
| 29 |
a) Connect to Ad-hoc network formed by PC(described in ubuntu laptop section) using wlan.This will ask for WEP key. |
| 30 |
b) ifconfig -a (this will show ip of the tablet also for wlan0 interface). |
| 31 |
c) iwconfig will show the wlan connection and settings.It will show the cell id too.It should be same for the devices connected together. |
| 32 |
d) ping 169.254.106.224 (This is the static-ip of the tablet.169.254.106.224 is the static-ip assigned to laptop) |
| 33 |
|
| 34 |
|
| 35 |
Running NoTA for static tcp |
| 36 |
---------------------------- |
| 37 |
a) Run autoreconf script |
| 38 |
b) configure L-in |
| 39 |
./configure --with-static_ip=169.254.106.224 (Give the IP where LMANAGER will run.In this case its running on the PC) |
| 40 |
b) Build the libraries |
| 41 |
c) Run the tests eg |
| 42 |
NOTA_LMANAGER=1 ./simple_tester_sn_sp OR |
| 43 |
NOTA_LMANAGER=1 NOTA_STATIC_TCP_LMANAGER_IP=169.254.106.224 ./simple_tester_sn_sp |
| 44 |
|
| 45 |
Repeat a)-b) for building in N810 as well in scratchbox. |
| 46 |
|
| 47 |
|
| 48 |
Configuring WLAN with dynamic tcp |
| 49 |
================================= |
| 50 |
Connect both PC and tablet to wlan router and try ping or scp from either device.IP of devices can be checked with ifconfig command. |
| 51 |
|
| 52 |
|
| 53 |
Now for running NoTA |
| 54 |
==================== |
| 55 |
|
| 56 |
TCP now provides NOTA_TCP_IP_IF env variable, which allows the option of using default(eth) interface or wlan interface depending on the transport used for comminication.This is done to fetch the broadcast address from the local iptables.Default broadcast/multicast address in code doesn't work in case of wlan.If this env variable is not provided then communication happens with the broadcast/multicast provided in the code.It is advisable to have only one interface during communication. |
| 57 |
|
| 58 |
|
| 59 |
Eg. for dynamic tcp |
| 60 |
-------------------- |
| 61 |
CASE 1: (without NOTA_TCP_IP_IF environment variable) |
| 62 |
======= |
| 63 |
Run SN as: |
| 64 |
NOTA_LMANAGER=1 ./simple_tester_sn_sp |
| 65 |
|
| 66 |
Run AN as: |
| 67 |
./simple_tester_an_sp |
| 68 |
|
| 69 |
|
| 70 |
CASE 2: (with NOTA_TCP_IP_IF environment variable and using wlan interface) |
| 71 |
======= |
| 72 |
Run SN as: |
| 73 |
NOTA_TCP_IP_IF=wlan0 NOTA_LMANAGER=1 ./simple_tester_sn_sp |
| 74 |
|
| 75 |
Run AN as: |
| 76 |
NOTA_TCP_IP_IF=wlan0 ./simple_tester_an_sp |
| 77 |
|
| 78 |
|
| 79 |
With daemon version there is no need to run with NOTA_TCP_IP_IF |