Re: [Discuss-gnuradio] tunnel.py command not working

2013-03-29 Thread M. Ranganathan
There's stuff missing in tunnel.py. The receiver has to return ICMP echo
reply. Instead it writes to the tunnel socket. The packet will get to the
kernel but will be promptly dropped as it has a source address that does
not originate locally.

Add code in tunnel.py to do an icmp echo reply.


On Wed, Mar 27, 2013 at 11:54 AM, Nada ABDELKADER <
nada.abdelka...@etu.upmc.fr> wrote:

> Hi,
>
> I tried to run tunnel.py on my machine (Ubuntu 11.10) with 2 USRPs (usrp1).
>
> from one side I launched:
> ./tunnel.py --tx-freq 2.4G --rx-freq 2.4001G -a="name=dev1" -A TX/RX
> --bitrate 500k -v
> then :
> sudo ifconfig gr0 192.168.200.1
> from another terminal (on the same machine):
> ./tunnel.py --rx-freq 2.4G --tx-freq 2.4001G -a="name=dev0" -A TX/RX
> --bitrate 500k -v
> sudo ifconfig gr1 192.168.200.2
> But when I run ping from both sides I see nothing displayed!
> Is what I've done correct? Is it possible to use one machine? What did I
> miss?
> Can you help me plz!
>
> Best Regards,
> Nada
>
> --**--**
> This message was sent using IMP, the Internet Messaging Program.
>
>
>
> __**_
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/**listinfo/discuss-gnuradio
>



-- 
M. Ranganathan
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] tunnel.py command not working

2013-03-27 Thread Nada ABDELKADER

Hi,

I tried to run tunnel.py on my machine (Ubuntu 11.10) with 2 USRPs (usrp1).

from one side I launched:
./tunnel.py --tx-freq 2.4G --rx-freq 2.4001G -a="name=dev1" -A TX/RX  
--bitrate 500k -v

then :
sudo ifconfig gr0 192.168.200.1
from another terminal (on the same machine):
./tunnel.py --rx-freq 2.4G --tx-freq 2.4001G -a="name=dev0" -A TX/RX  
--bitrate 500k -v

sudo ifconfig gr1 192.168.200.2
But when I run ping from both sides I see nothing displayed!
Is what I've done correct? Is it possible to use one machine? What did I miss?
Can you help me plz!

Best Regards,
Nada


This message was sent using IMP, the Internet Messaging Program.



___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] tunnel.py command not working.

2013-02-27 Thread Tom Rondeau
On Wed, Feb 27, 2013 at 2:01 PM, sumitstop
 wrote:
> Tom what do you mean by using different Tx & Rx frequencies.

I mean exactly that: use different frequencies like in an FDD system.
Set the transmit frequency to f_tx and the receive frequency to f_rx.
When you run "tunnel.py -h", you'll see options "--tx-freq" and
"--rx-freq". Just setting "--freq" automatically sets tx_freq =
rx_freq = freq.

> Also recently I did following. I connected 2 usrp with a single PC and ran 2
> instances of tunnel in it with 1 usrp for each. Made two virtual ethernet
> interfaces gr0 & gr1 also set two different ip addresses. And I was able to
> ping from one ip address to another. I also did ssh and scp.
>
> Now suddenly I am getting doubt that was that a wireless ping ?? Or was it
> just withing a system i.e ping between two virtual ethernet interfaces
> inside the system.

It was probably being done internally. First check your routing table,
but your system is probably being smart and just passing packets over
the loopback device. You can use wireshark/tcpdump to check this out.

> If it was within the system then I might have made a wrong screen cast on
> this tunnel thing which I recently uploaded on my channel
>
> http://www.youtube.com/watch?v=CLvV2Q7vh-o
>
> PS : Video is a bit blurred but one can easily make out

Tom

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] tunnel.py command not working.

2013-02-27 Thread sumitstop
Tom what do you mean by using different Tx & Rx frequencies. 

Also recently I did following. I connected 2 usrp with a single PC and ran 2
instances of tunnel in it with 1 usrp for each. Made two virtual ethernet
interfaces gr0 & gr1 also set two different ip addresses. And I was able to
ping from one ip address to another. I also did ssh and scp.

Now suddenly I am getting doubt that was that a wireless ping ?? Or was it
just withing a system i.e ping between two virtual ethernet interfaces
inside the system.

If it was within the system then I might have made a wrong screen cast on
this tunnel thing which I recently uploaded on my channel  

http://www.youtube.com/watch?v=CLvV2Q7vh-o

PS : Video is a bit blurred but one can easily make out 



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/tunnel-py-command-not-working-tp39857p39886.html
Sent from the GnuRadio mailing list archive at Nabble.com.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] tunnel.py command not working.

2013-02-27 Thread Tom Rondeau
On Wed, Feb 27, 2013 at 9:28 AM, Sajjad Safdar
 wrote:
> Hi,
> Yes now it works but can not able to ping the Machines. I am using RFX400
> daughter card and set 192.168.200.1 and 192.168.200.2 respectively on
> machine A and B.
>
> On machine A:
>
>
>   # sudo ./tunnel.py --freq 423.0M --bitrate 500k -A TX/RX -v
>   # # in another window on A,
>   # ifconfig gr0 192.168.200.1
>
>
> On machine B:
>
>
>   # sudo ./tunnel.py --freq 423.0M --bitrate 500k -A TX/RX -v
>   # # in another window on B
>   # ifconfig gr0 192.168.200.2
>

Try using different transmit and receive frequencies. tunnel.py has
some serious issues, and among them is with how data is handled with
the UHD interface where it doesn't really handle the proper SOB and
BOB concepts that would allow you to do full duplex on the same
frequency. At this point, I'm not even sure doing FDD is going to work
properly with it.

Tom

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] tunnel.py command not working.

2013-02-27 Thread Sajjad Safdar
Hi,
Yes now it works but can not able to ping the Machines. I am using RFX400 
daughter card and set 192.168.200.1 and 192.168.200.2 respectively on machine A 
and B.

On machine A: # sudo ./tunnel.py --freq 423.0M --bitrate 500k -A TX/RX -v # # 
in another window on A, # ifconfig gr0 192.168.200.1 On machine B: # sudo 
./tunnel.py --freq 423.0M --bitrate 500k -A TX/RX -v # # in another window on B 
# ifconfig gr0 192.168.200.2
I got the following outputs
ON MACHINE A after setting up the virtual ethernet by sudo ifconfig gr0 
192.168.200.1:
helmut@ubuntu:~/gnuradio/gnuradio/gr-digital/examples/narrowba$ sudo 
./tunnel.py --freq 423.0M --bitrate 500k -A TX/RX -v
linux; GNU C++ version 4.6.3; Boost_104800; UHD_003.005.001-29-g3cb515f7

>>> gr_fir_fff: using SSE
bits per symbol = 1
Gaussian filter bt = 0.35
-- Opening a USRP1 device...
-- Using FPGA clock rate of 64.00MHz...

No gain specified.
Setting gain to 32.50 (from [0.00, 65.00])

UHD Receiver:
UHD Args:    
Freq:        423MHz
Gain:        32.50 dB
Sample Rate: 1Msps
Antenna:     TX/RX
Spec:        None

No gain specified.
Setting gain to -10.00 (from [-20.00, 0.00])

UHD Transmitter:
Args:     
Freq:        423MHz
Gain:        -10.00 dB
Sample Rate: 1Msps
Antenna:     TX/RX
Subdev Sec:  None
bits per symbol = 1
Gaussian filter bt = 0.35
Using Volk machine: ssse3_32
Tx amplitude     0.25
modulation:      gmsk_mod
bitrate:         500kb/s
samples/symbol:  2.
Differential:    False
bits per symbol = 1
M&M clock recovery omega = 2.00
M&M clock recovery gain mu = 0.175000
M&M clock recovery mu = 0.50
M&M clock recovery omega rel. limit = 0.005000
frequency error = 0.00

Receive Path:
modulation:      gmsk_demod
bitrate:         500kb/s
samples/symbol:  2.
Differential:    False
modulation:     gmsk
freq:           423M
bitrate:        500kb/sec
samples/symbol:   2
Carrier sense threshold: 30 dB

Allocated virtual ethernet interface: gr0
You must now use ifconfig to set its IP address. E.g.,

  $ sudo ifconfig gr0 192.168.200.1

Be sure to use a different address in the same subnet for each machine.

UUTx: len(payload) =   90
Tx: len(payload) =   54
Rx: ok = True  len(payload) =   90
UTx: len(payload) =   81
URx: ok = True  len(payload) =   54
Tx: len(payload) =  299
Tx: len(payload) =  202
Rx: ok = True  len(payload) =   81
Rx: ok = True  len(payload) =  299
UUTx: len(payload) =  299
Rx: ok = False  len(payload) =  299
UUTx: len(payload) =  299
Rx: ok = False  len(payload) =  299
URx: ok = False  len(payload) =  101
Tx: len(payload) =   78
UUTx: len(payload) =  275
Rx: ok = False  len(payload) =  275
UUTx: len(payload) =   81
UUTx: len(payload) =  202
URx: ok = True  len(payload) =   81
UTx: len(payload) =   70
Tx: len(payload) =  110
Rx: ok = True  len(payload) =   70
UUTx: len(payload) =  101
Rx: ok = True  len(payload) =  110
Tx: len(payload) =  377
Tx: len(payload) =  192
Tx: len(payload) =  105
Tx: len(payload) =  222
Rx: ok = True  len(payload) =  101
URx: ok = True  len(payload) =  377
Rx: ok = True  len(payload) =  192
Rx: ok = True  len(payload) =  105
UTx: len(payload) =  236
URx: ok = True  len(payload) =  222
Rx: ok = False  len(payload) =  236
UTx: len(payload) =  377
Tx: len(payload) =  192
Rx: ok = True  len(payload) =  377
URx: ok = False  len(payload) =  192
UTx: len(payload) =  377
Tx: len(payload) =  192
URx: ok = True  len(payload) =  377
Rx: ok = False  len(payload) =  192
UTx: len(payload) =  353
Tx: len(payload) =  180
Rx: ok = True  len(payload) =  353
Rx: ok = False  len(payload) =  180
UUTx: len(payload) =  101
UUTx: len(payload) =  222
Rx: ok = True  len(payload) =  101
UUTx: len(payload) =   81
UUTx: len(payload) =  319
Rx: ok = False  len(payload) =  319
UUTx: len(payload) =  353
Tx: len(payload) =  152
Rx: ok = True  len(payload) =  353
Rx: ok = False  len(payload) =  152
UTx: len(payload) =   90
UUTx: len(payload) =  303
Rx: ok = False  len(payload) =  303
UUTx: len(payload) =   54
UUTx: len(payload) =  101
UUTx: len(payload) =  323
Rx: ok = False  len(payload) =  323
UUTx: len(payload) =  353
Tx: len(payload) =  180
Rx: ok = True  len(payload) =  353
Tx: len(payload) =   70
Rx: ok = False  len(payload) =  180
UUTx: len(payload) =   81
UUTx: len(payload) =  101
UUTx: len(payload) =   70
UUTx: len(payload) =   81
UUTx: len(payload) =  101
UU



FROM the MACHINE B after setting virtual ethernet sudo ifconfig gr0 
192.168.200.2

hw@E-Lab:~/gnuradio/gr-digital/examples/narrowband$ sudo ./tunnel.py --freq 
423.0M --bitrate 500k -A TX/RX -v
linux; GNU C++ version 4.6.1; Boost_104601; UHD_003.005.001-25-ge134b863

>>> gr_fir_fff: using SSE
bits per symbol = 1
Gaussian filter bt = 0.35
-- Opening a USRP1 device...
-- Using FPGA clock rate of 64.00MHz...

No gain specified.
Setting gain to 32.50 (from [0.00, 65.00])

UHD Receiver:
UHD Args:    
Freq:    423MHz
Gain:    32.50 dB
Sample Rate: 1Msps
Antenna: TX/RX
Spec:    None

No gain specifie

Re: [Discuss-gnuradio] tunnel.py command not working.

2013-02-27 Thread Andre Puschmann
On 02/26/2013 06:55 PM, Sajjad Safdar wrote:
> HI,
> I am using tunnel.py command to setup a TCP/IP link between two usrp1.
> When i try to use the command , i get this error
> 
> ./tunnel.py
> linux; GNU C++ version 4.6.3; Boost_104800; UHD_003.005.001-29-g3cb515f7
> 
> Traceback (most recent call last):
>   File "./tunnel.py", line 295, in 
> main()
>   File "./tunnel.py", line 241, in main
> (tun_fd, tun_ifname) = open_tun_interface(options.tun_device_filename)
>   File "./tunnel.py", line 79, in open_tun_interface
> ifs = ioctl(tun, TUNSETIFF, struct.pack("16sH", "gr%d", mode))
> IOError: [Errno 1] Operation not permitted

Try running it with root rights, i.e. "sudo ./tunnel.py". Also make sure
that the device actually exists, run "ifconfig tun0".

-Andre


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] tunnel.py command not working.

2013-02-26 Thread Sajjad Safdar
HI,
I am using tunnel.py command to setup a TCP/IP link between two usrp1. When i 
try to use the command , i get this error

./tunnel.py
linux; GNU C++ version 4.6.3; Boost_104800; UHD_003.005.001-29-g3cb515f7

Traceback (most recent call last):
  File "./tunnel.py", line 295, in 
    main()
  File "./tunnel.py", line 241, in main
    (tun_fd, tun_ifname) = open_tun_interface(options.tun_device_filename)
  File "./tunnel.py", line 79, in open_tun_interface
    ifs = ioctl(tun, TUNSETIFF, struct.pack("16sH", "gr%d", mode))
IOError: [Errno 1] Operation not permitted


ANy suggestions,

BEST REGARDS;
SAJJAD SAFDAR___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio