|
From: | Cristian Rodríguez |
Subject: | Re: [Discuss-gnuradio] IEEE802.11 transceiver - problems sending data |
Date: | Fri, 26 May 2017 10:04:41 -0500 |
Hi,
On 5/26/2017 10:57 AM, Marcus Müller wrote:
Hi Cristian,
assuming this is a network config issue
Me too. I think that trying to ping a local address and having it routed over interfaces might, in theory, be possible, but hard to setup.
Try communicating with a WiFi card of another PC. Set the interface to ad hoc mode and setup static routing and ARP entries. That's what I did in the video. You already have the script for the SDR host. The other hosts uses similar IP and ARP configurations (but, of course, doesn't create the TUN/TAP device or start GNU Radio).
sudo ifconfig wlp2s0 down
sudo iwconfig wlp2s0 mode monitor/managed
sudo ifconfig wlp2s0 up
sudo iw dev wlp2s0 set freq 2472
sudo ifconfig wlp2s0 192.168.123.2
sudo route add -net 192.168.123.0/24 <http://192.168.123.0/24> wlp2s0
sudo arp -s 192.168.123.1 12:34:56:78:90:ab -i wlp2s0
Best,
Bastian
: On modern Linuxes, it's usually
not a great idea to manipulate network config using ifconfig directly – NetworkManager tends to change things automagically if it doesn't think the link is functional (sometimes, even if it is). Please make sure your card is either unmanaged by NetworkManager, or set up the device like you want it to behave, and then activate the connection with `nmcli`. I'm not quite sure this is best solved on the discuss-gnuradio mailing list – we're not really linux networking setup experts :)
Best regards,
Marcus
On 05/26/2017 07:18 AM, Cristian Rodríguez wrote:
2017-05-19 7:04 GMT-05:00 Bastian Bloessl <address@hidden <mailto:address@hidden>>:
Hi,
> On 19. May 2017, at 12:09, Cristian Rodríguez
<address@hiddenom I've tried to solve the trouble the whole week. I don't think my computer is able to support the communication between its Wifi card and the USRP B210. When i do a Ping from the USRP to the wifi card (in monitor mode), and it receives the ping, it stops working and in the terminal which is executing the app nic.sh appear *ether type: IP. *In the wireshark file for the side of Tx, it clearly have stoped working. I've tried to solve it, but i don't think is a configuration problem.<mailto:cristian.rodriguez.ud@gmail.com >> wrote:
>
> You will have to also add the corresponding entry in reverse
direction. It’s not in the script since I always used the WiFi
card of another PC.
> I did that as follows:
>
> sudo arp -s 192.168.123.1 12:34:56:78:90:ab -i wlp4s0
So you just set up one ARP entry.
>
> Then use Wireshark to monitor GNU Radio (that’s what you might
do at the moment) and also the WiFi card. This might help to
understand what frames are actually sent, if they are OK (MAC, IP,
BSS) and if they are successfully received by the WiFi card and
the SDR.
> If i do a ping from the interface tap0 to 192.168.123.2 (IP of
my wifi card) it doesn't work. The signal is going out of the USRP
but the Wifi Card of the computer is not taking it.
>
> ping -I tap0 192.168.123.2
>
> If i do a ping from the interface wlp4s0 to 192.168.123.1 (IP of
USRP B210) it doesn't work. The signal is NOT going out of the
Wifi card (i verifed that through wireshark).
>
> ping -I wlp4s0 192.168.123.1
As I said, you will have to actually look at the frame (BSS, MAC,
IP, …) and see if the fields are OK. Also put the receiver in
monitor mode to check if the packet is actually received. It’s a
configuration issue and you will have to find out where in the
network stack it gets dropped.
On the other side, i got a computer and i'm try to communicate to it. When i configure Monitor mode i can get packages.
What interface Mode do you think i should use? Ad-hoc or managed?
I've tried both but for me it doesn't work.
I've checked the frame and it looks as supposed. It shows the MAC of the PC which is receiving, the MAC associated to the USRP and the common flags.
I think it is a problem in the configuration file in the PC which is receiving.
In that PC i'm doing the next:
Turn off the interface:
sudo ifconfig wlp2s0 down
Set the mode
sudo iwconfig wlp2s0 mode monitor/managed
Turn on the interface:
sudo ifconfig wlp2s0 up
Set in the channel that USRP is going to send
sudo iw dev wlp2s0 set freq 2472
Assign an IP in the network, the USRP is .1
sudo ifconfig wlp2s0 192.168.123.2
Modify the kernel's IPv4 network
sudo route add -net 192.168.123.0/24 <http://192.168.123.0/24> wlp2s0
Set a static route
sudo arp -s 192.168.123.1 12:34:56:78:90:ab -i wlp2s0
All the commands work, i checked with iwconfig, ifconfig, route, arp -a
*arp -a*
? (192.168.123.1) at 12:34:56:78:90:ab [ether] PERM on wlp2s0
*route*
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.123.0 * 255.255.255.0 U 0 0 0 wlp2s0
*ifconfig*
wlp2s0 Link encap:Ethernet HWaddr e0:ca:94:68:06:a7
inet addr:192.168.123.2 Bcast:192.168.123.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
*iwconfig*
wlp2s0 IEEE 802.11 ESSID:off/any
Mode:Managed Frequency:2.462 GHz Access Point: Not-Associated
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
Then i don't catch the problem.
*Finally, May you share to me the configuration file that you used when you configure your PC in these experiments?*
Really, thanks a lot for your time.
Best regards,
Cristian
[Prev in Thread] | Current Thread | [Next in Thread] |