HDR LAN(Wi-Fi) Settings Mysteriously Corrupted

OP
Black Hole

Black Hole

May contain traces of nut
For the record, Edimax dongle:
Code:
HDRFOX4# iwconfig wlan0                                                                       
wlan0     RT2870 Wireless  ESSID:"XXXXXXXXXXXXXXXX"  Nickname:"RT2870STA"                     
          Mode:Managed  Frequency=2.452 GHz  Access Point: 44:94:FC:E8:34:9A                   
          Bit Rate=54 Mb/s                                                                     
          RTS thr:off   Fragment thr:off                                                       
          Encryption key:XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX [2]                           
          Link Quality=100/100  Signal level:-57 dBm  Noise level:-83 dBm                     
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0                             
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
And my unbranded dongle (after a reboot):
Code:
HDRFOX4# iwconfig wlan0                                                                          
wlan0     RT2870 Wireless  ESSID:"XXXXXXXXXXXXXXXX"  Nickname:"RT2870STA"                        
          Mode:Managed  Frequency=2.452 GHz  Access Point: 44:94:FC:E8:34:9A                      
          Bit Rate=54 Mb/s                                                                        
          RTS thr:off   Fragment thr:off                                                          
          Encryption key:XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX [2]                              
          Link Quality=79/100  Signal level:-61 dBm  Noise level:-83 dBm                          
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0                                
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
Link Quality 79 might have something to do with the problem. What do you suppose 'Nickname:"RT2870STA"' means?

I expected the Access Point MAC to change.
 

prpr

Well-Known Member
I expected the Access Point MAC to change.
Why? Presumably you are using the same access point - that's your Netgear router's Wireless interface MAC. The MAC address of the RT2870 will have changed, but that's not what is being displayed here.
If you want that, then you need ifconfig wlan0 or ip link or something like cat /sys/class/net/wlan0/address
 

Ezra Pound

Well-Known Member
prpr : Huawei :eek:
Ah well it will give BH another reason not to like them :)
EDIT
Ah, that is the router not the dongle?, the router was supplied by Talktalk, I'm certainly no fan of Huawei (I worked for a company who were their rivals) , but I have to say if they are sending stuff back to China via 5G or my router it's about time someone came up with some evidence
 
Last edited:

/df

Active Member
The evaluation centre reported that Huawei's software development practices and quality management weren't adequate to ensure that their products could be trusted to do what and only what they were meant to do. So they could be hacked by any bad actor -- and were.

A state actor with stooges installed by law throughout the organisation might be particularly well placed to exploit a product defect, even if it hadn't actually ordered or covertly arranged the defect. No doubt there is some sort of Chinese version of the secret National Security Letter used in the USA to compel cooperation, except with the bonus possibility of a bullet in the back of the head for non-compliance.

A "bullet in the back of the head" approach to quality management would certainly concentrate minds as the auditors' visit looms.
 
Last edited:
OP
Black Hole

Black Hole

May contain traces of nut
The unbranded dongle is behaving itself at the moment.

I have an idea: periodically collect data into a log file (say every hour) which gives a timestamp, the current IP address, and the iwconfig lines. I think I know how to do that, just have to look up creating persistent scripts and cron entries...

Anything I need to know to make a cron job survive a reboot?
 
OP
Black Hole

Black Hole

May contain traces of nut
In case anybody else wants to have a go (all done through WebIF >> Diagnostics >> File Editor, which can create text files wherever you want (and edit existing ones... but be careful!) and has a button to give execute permission... other tools are available):-

Create file wlanmonitor in /mod/bin:
Code:
#! /bin/sh
date >> /mod/tmp/wlanmonitor.log
ifconfig wlan0 >> /mod/tmp/wlanmonitor.log
iwconfig wlan0 >> /mod/tmp/wlanmonitor.log
...and make it executable. Output is to a file /mod/tmp/wlanmonitor.log, and will be listed in WebIF Diagnostics with all the other log files. OK, it's not very elegant and more data gets dumped into the log file than is strictly necessary (but who knows – it might come in handy when debugging), but it gets the job done with minimum fuss.

For newbies: the lines in the script are exactly what could be used on the command line, prepended by a special comment line which tells the system what tool to use to execute the commands which follow - ie the standard command interpreter /bin/sh. Any other line starting "#" will be ignored and can be used to insert comments. ">>" simply sends the response to each command to the named file (instead of displayed on the console), adding to the existing contents or creating the file if it doesn't exist.

Add this line to file /mod/var/spool/cron/crontabs/root:
Code:
15 * * * * /mod/bin/wlanmonitor
This makes wlanmonitor run on the 15th minute of each hour.

Now reboot (or restart the cron service).

For newbies: the lines in the existing crontab file "root" schedule various routine actions for the CF, according to what packages you have chosen to install, and can be added to (as here). In this case, the script file /mod/bin/wlanmonitor will be run just as if "wlanmonitor" were typed on the command line, on the recurring schedule "15 * * * *". The five parameters represent minute, hour, date, month, day, where "*" means "any". So each time the system time matches minute=15, wlanmonitor gets run (ie once an hour, at quarter past the hour). "Day" is the day of the week, and if not "*" should be read as "also" (by which I mean "on this date and month and also this day"). See here for full details.

The WebIF >> Diagnostics log file viewer displays log files in reverse order, ie newest lines first, so if using that to view the output one has to read each new multi-line log entry from the bottom up, which is a little awkward but is a small price to pay (and I will only need to do that once the IP address has changed and I am trying to find out why – the whole point of this exercise). I did say this isn't very elegant, but it doesn't need to be! Sometimes too much effort goes into making things pretty.

For search hits ('cos I'll never remember the details and have to look it all up next time): How to write/create a script/program which executes on a regular schedule using cron.
 
Last edited:
OP
Black Hole

Black Hole

May contain traces of nut
Oh yesh, a whole five lines!

FWIW, it is currently logging quality 100/100 and still on the right IP address.
 
Top