smartyouth92 / lorcon

Automatically exported from code.google.com/p/lorcon
GNU General Public License v2.0
0 stars 0 forks source link

Failure to set channel (1 packets transmitted on channel -1) #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
System: ARM v6 (raspberry pi)
Libnl Version: 1,2,3 3-gen

Lorcon 2 will compile without any errors, but will refuse to properly change 
the channel on the network interface despite being able to do literally 
everything else (including creating a monitor mode virtual interface)

When running tx, I get the following:

root@raspberrypi /home/pi/Dev/lorcon # ./tx -i wlan1mon -d mac80211 -c 7 -n 1
1 packets transmitted on wlan1monmon mac80211 channel -1.

That -1 I'm guessing is a error code from the setchannel function.

Looking for any help, oversites I may have made during compile, additional libs 
I need, anything before I try to tackle this in C.

Original issue reported on code.google.com by BryanH...@gmail.com on 10 Apr 2013 at 4:05

GoogleCodeExporter commented 9 years ago
I'm facing the same problem . I hope someone can help me solve this problem。

the next problem is  when I accessed AP I could not setchannel. There seems 
some error message return from Netlink.
AP is in channel 7.

root@ubuntu~~~~# ./rtsTest -s mon0 -i wlan4 -c 6

Failed to set channel 6 on wlan4mon: nl80211_setchannel() could not set channel 
6/2437 on interface 'wlan4mon' err -16

Original comment by ziyoo...@gmail.com on 13 May 2013 at 9:08

GoogleCodeExporter commented 9 years ago
I've found a way to fix that (although I still get strange errors from 
getChannel()):

#!/bin/bash
killall wpa_supplicant
killall NetworkManager
killall wicd
killall ifplugd
killall dhclient

Try running that script -- those are all the processes that will keep your card 
in managed mode.  To test that it worked, run ifconfig wlan0 down.  then run 
ifconfig.  If you see your wireless interface up in the list, then you probably 
have other processes to shut off.

Make sure you run ifconfig wlan0 up again before you try running lorcon again.

Original comment by BryanH...@gmail.com on 13 May 2013 at 12:04

GoogleCodeExporter commented 9 years ago
thank you for your help.  I just found something new yesterday.
I don't think setChanel function doesn't work. In unaccess state getchannel 
function always return -1 , As I know there is no -1 channel. 
I set channel as 6. setchannel function didn't return any error message.
So i think setchannel function works well. Than i chacked wireshark. All the 
packets transfer through channel 6. So  I think setchannel function defined 
interface's channel but not the frame's. I noticed all the other packets 
transfer from channel 6 marks channel information (like channel fraquency)in 
radiotap header(wireshark).But the frame which I send didn't mark any 
information about channel.
Even I can capture my frame in interface(channel 6) and other packets all 
transfer through channel 6.  Since only my frame has no information about 
channel. so i can't sure if my frame transfer through channel 6.
I'm looking for some way to fix radiotap header now. Trying to find more 
desireable solution. 
Because 

Original comment by ziyoo...@gmail.com on 14 May 2013 at 3:54