Android Question Need to "grep" text from text file

Noel

Member
Licensed User
Longtime User
Hi all,

I'm sure that it's easy as pie for you guys, but I've been at it for some time now with no luck till now :/

I'm trying to make a small app for my router what will show all "found" AP stations.
Basically I need to grep some text from a text file, and put them in an array.

The part that I need is: BSS, signal, SSID, primary channel and Authentication suites.
(ie: 00:e0:4c:c8:22:a7, -57.00 dBm, Home 1, 11, PSK)

Please note that the block shown below is only the result from one station. There are about more in the text file.

Anyone here who can show me with a small example how this can be done?

Thank you for any info on this.

B4X:
BSS 00:e0:4c:c8:22:a7(on wlan0) -- associated
  TSF: 1703670085061 usec (19d, 17:14:30)
  freq: 2462
  beacon interval: 100 TUs
  capability: ESS Privacy ShortSlotTime (0x0411)
  signal: -57.00 dBm
  last seen: 20 ms ago
  Information elements from Probe Response frame:
  SSID: Home 1
  Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0
  DS Parameter set: channel 11
  ERP: <no flags>
  Extended supported rates: 24.0 36.0 48.0 54.0
  HT capabilities:
  Capabilities: 0x186e
  HT20/HT40
  SM Power Save disabled
  RX HT20 SGI
  RX HT40 SGI
  No RX STBC
  Max AMSDU length: 7935 bytes
  DSSS/CCK HT40
  Maximum RX AMPDU length 32767 bytes (exponent: 0x002)
  Minimum RX AMPDU time spacing: 16 usec (0x07)
  HT RX MCS rate indexes supported: 0-15
  HT TX MCS rate indexes are undefined
  HT operation:
  * primary channel: 11
  * secondary channel offset: below
  * STA channel width: any
  * RIFS: 0
  * HT protection: no
  * non-GF present: 0
  * OBSS non-GF present: 0
  * dual beacon: 0
  * dual CTS protection: 0
  * STBC beacon: 0
  * L-SIG TXOP Prot: 0
  * PCO active: 0
  * PCO phase: 0
  RSN:  * Version: 1
  * Group cipher: CCMP
  * Pairwise ciphers: CCMP
  * Authentication suites: PSK
  * Capabilities: 1-PTKSA-RC 1-GTKSA-RC (0x0000)
  WMM:  * Parameter version 1
  * BE: CW 15-1023, AIFSN 3
  * BK: CW 15-1023, AIFSN 7
  * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
  * VO: CW 3-7, AIFSN 2, TXOP 1504 usec
 
Top