Jump to content

Set Channel from SSH Shell


Recommended Posts

I'm running a Pineapple Tetra with the 2.0.2 firmware. From a SSH shell, I can place the phy1 interface in monitor mode and capture traffic:

root@Pineapple:~# iw dev wlan1 del
root@Pineapple:~# iw phy phy1 interface add mon0 type monitor
root@Pineapple:~# ifconfig mon0 up
root@Pineapple:~# tcpdump -ni mon0 -s0 -c 3
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on mon0, link-type IEEE802_11_RADIO (802.11 plus radiotap header), capture size 262144 bytes
21:31:54.460978 5094830us tsft 1.0 Mb/s 2412 MHz 11b -88dBm signal -90dBm signal antenna 0 -92dBm signal antenna 1 Beacon (FiOS-SKNBR_2GEXT) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 1, PRIVACY
21:31:54.499926 5134115us tsft 1.0 Mb/s 2412 MHz 11b -35dBm signal -39dBm signal antenna 0 -38dBm signal antenna 1 Beacon (somethingclever) [1.0* 2.0* 5.5* 11.0* 18.0 24.0 36.0 54.0 Mbit] ESS CH: 1, PRIVACY
21:31:54.506008 5139839us tsft 1.0 Mb/s 2412 MHz 11b -88dBm signal -91dBm signal antenna 0 -92dBm signal antenna 1 Beacon (000000_EXT) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 1, PRIVACY
3 packets captured
4 packets received by filter
0 packets dropped by kernel

 

This is great, but I am unable to set the channel:

root@Pineapple:~# iw dev wlan1 set channel 52
command failed: No such device (-19)

This fails every time, even using 2.4 GHz channel numbers, or the iwconfig utility:

root@Pineapple:~# iw dev wlan1 set channel 11
command failed: No such device (-19)
root@Pineapple:~# iw dev wlan1 set channel 1
command failed: No such device (-19)
root@Pineapple:~# iwconfig wlan1 channel 1
Error for wireless request "Set Frequency" (8B04) :
    SET failed on device wlan1 ; No such device.
root@Pineapple:~# iw dev wlan1 set channel 52
command failed: No such device (-19)

What is the right way to set the channel number on an interface in monitor mode from the command line?

Thanks,

-Josh

Link to comment
Share on other sites

Hi Josh,

You removed the wlan1 interface (iw dev wlan1 del) and then added a mon0 interface (iw phy phy1 interface add mon0 type monitor). If you want to change the channel of the mon0 interface now, you will need to use mon0 instead of wlan1 in their channel setting commands.

Edit:
It would be far easier to type "airmon-ng start wlan1" and then use the wlan1mon interface to change channels.

Link to comment
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...