LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-17-2016, 09:08 PM   #1
tiblop
LQ Newbie
 
Registered: Oct 2015
Posts: 5

Rep: Reputation: Disabled
iwlist scan keeps changing


Hello ,
So i have a beaglebone with a linux debian on it. I also have a wifi dongle.
Internet works fine.
However, i always have to change my /etc/network/interfaces file because iwlist scan keeps giving me different results.
Sometimes it gives me wlan0 and sometimes wlan1 so each times it changes i have to change my configuration file to fit the change...

Is there any way to avoid this?
thank you
 
Old 01-18-2016, 07:25 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,228

Rep: Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319
Surely the way to avoid this is to specify wlan0 in the command.
iwlist wlan0

If the lan is morphing from wlan0 to wlan1, that is more involved.
 
Old 01-18-2016, 07:16 PM   #3
tiblop
LQ Newbie
 
Registered: Oct 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
no, if i put iwlist scan wlan0 it will give me nothing because currently the lan is at 1 for some reason.. i just use iwlist scan to know the number associated to the lan currenlty..
 
Old 01-19-2016, 09:59 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,228

Rep: Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319
Something funny in the setup. Are you using gnome network manager?
The lan may be dropping out. What's the quality like? Adjust this line, fill in the <blanks> and try it
Code:
iwlist wlan<x> scan |grep -B5 <your ESSID>
What's the quality?
Personally, if you're needing the thing up, I'd use wired connections. If it's usb, it could be an overcurrent problem.

Describe your setup fully and check the current consumption of the wifi unit.
 
Old 01-20-2016, 07:22 PM   #5
tiblop
LQ Newbie
 
Registered: Oct 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
cannot wire, its for my robot, it is usb. Also my company wifi is very bad, keeps being up and down.. do you think it is hte reason why? because weirdly it never change once the system its on its just when you turn on the thing it will either be wlan0 or wlan1 but then it wont move until next reboot...
 
Old 01-21-2016, 03:51 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,228

Rep: Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319Reputation: 2319
Quote:
weirdly it never change once the system its on its just when you turn on the thing it will either be wlan0 or wlan1 but then it wont move until next reboot...
Why didn't you tell us?

It's in the boot setup. Apparently wlan0 is assigned so it makes wlan1. Are you shutting the thing off properly?
 
Old 01-22-2016, 03:58 AM   #7
tiblop
LQ Newbie
 
Registered: Oct 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
is there any way to force wlan0, like if it is in use just delete whatever use it? It is not always off properly... and it is hard to make it always off properly :/
 
Old 01-22-2016, 04:04 AM   #8
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,144

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
Quote:
Originally Posted by tiblop View Post
is there any way to force wlan0, like if it is in use just delete whatever use it? It is not always off properly... and it is hard to make it always off properly :/
The script that records and reserves interface names for future use is /lib/udev/rules.d/75-persistent-net-generator.rules. It writes rules in /etc/udev/rules.d/70-persistent-net.rules. So remove the existing wlan0 and wlan1 entries from your /etc/udev/rules.d/70-persistent-net.rules, and change wlan2 to wlan0. Run udevadm --trigger --attr-match=vendor='Edimax' (or whatever --attr-match parameter you find matches your device) to reapply the rules to the already-plugged-in device.

above text from this link (wlan number assignment): http://unix.stackexchange.com/questi...ber-assignment

not sure if it will help you. Good luck!

Last edited by JJJCR; 01-22-2016 at 04:05 AM. Reason: edit
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iwlist scan - no scan results compu73rg33k Linux - Wireless Networking 6 05-29-2009 02:37 AM
Iwlist scan y00b Linux - Wireless Networking 17 11-15-2006 08:38 PM
iwlist scan not supported mcd Linux - Wireless Networking 14 02-09-2006 07:42 PM
cannot see any AP using iwlist wlan0 scan dpowers Linux - Wireless Networking 5 08-28-2005 09:36 AM
iwlist and active scan hjd17 Linux - Software 1 04-12-2005 09:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration