mangOH Red lost 192.168.2.2 IP


#21

Hi David,

I am not sure what is expected from the “iw dev wlan1 scan”. Copied the output below.

I tried to run “wifi” application commands. I stared the wifi service and executed “wifi client start”. It returned an error.
root@swi-mdm9x28:~# wifi client start
ERROR: le_wifiClient_Start returns ERROR.

Could you please suggest if anything I missed in the configuration?

dmesg shows -> both SPI and Serial are initialized for mt7697 and serial is on ttyHS0.

root@swi-mdm9x28:~# iw dev wlan1 scan
BSS a0:ab:1b:1c:bc:2b(on wlan1)
TSF: 662604697982 usec (7d, 16:03:24)
freq: 2437
beacon interval: 100 TUs
capability: ESS Privacy ShortSlotTime (0x0411)
signal: -49.00 dBm
last seen: 500 ms ago
Information elements from Probe Response frame:
SSID: \x00\x00\x00\x00\x00\x00\x00\x00
Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0
DS Parameter set: channel 6
TIM: DTIM Count 0 DTIM Period 1 Bitmap Control 0x0 Bitmap[0] 0x0
ERP: Barker_Preamble_Mode
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 65535 bytes (exponent: 0x003)
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: 6
* secondary channel offset: no secondary
* STA channel width: 20 MHz
* 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
Overlapping BSS scan params:
* passive dwell: 20 TUs
* active dwell: 10 TUs
* channel width trigger scan interval: 180 s
* scan passive total per channel: 200 TUs
* scan active total per channel: 20 TUs
* BSS width channel transition delay factor: 5
* OBSS Scan Activity Threshold: 0.25 %
Extended capabilities: HT Information Exchange Supported
WPA: * Version: 1
* Group cipher: TKIP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
RSN: * Version: 1
* Group cipher: TKIP
* 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
BSS e4:6f:13:aa:ff:f5(on wlan1)
TSF: 775467110782 usec (8d, 23:24:27)
freq: 2462
beacon interval: 100 TUs
capability: ESS Privacy ShortSlotTime (0x0411)
signal: -82.00 dBm
last seen: 220 ms ago
Information elements from Probe Response frame:
SSID: Emmanuel
Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0
DS Parameter set: channel 11
TIM: DTIM Count 0 DTIM Period 1 Bitmap Control 0x0 Bitmap[0] 0x0
ERP: Barker_Preamble_Mode
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 65535 bytes (exponent: 0x003)
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: no secondary
* STA channel width: 20 MHz
* 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
Overlapping BSS scan params:
* passive dwell: 20 TUs
* active dwell: 10 TUs
* channel width trigger scan interval: 180 s
* scan passive total per channel: 200 TUs
* scan active total per channel: 20 TUs
* BSS width channel transition delay factor: 5
* OBSS Scan Activity Threshold: 0.25 %
Extended capabilities: HT Information Exchange Supported
WPA: * Version: 1
* Group cipher: TKIP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
RSN: * Version: 1
* Group cipher: TKIP
* 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
root@swi-mdm9x28:~#


#22

Ok, that’s a good sign. That means you have a working flash and kernel drivers.

Are you trying to be a WiFi client or access point? The SSID being NULL looks odd, although maybe that’s normal if you’re in AP mode.

For the client side, at least with my vintage of the software, wpa_supplicant doesn’t correctly start out of the ifup script and I end up starting it manually. I’ve always thought that’s odd since I haven’t seen anyone else report that same problem, but who knows?


#23

Thank you Godfrey.

I would like to operate them in AP mode as we need to integrate another wifi client device with this. Ideally I want it to operate in both modes, but unfortunately, it can’t run in both modes simultaneously, as per mangOH team.

To test the wifi, I tried to set up the client mode using the wifi application. But for some reason, it won’t start as a client. (ERROR: le_wifiClient_Start returns ERROR.)

Maybe I do have the same issue on the ifup. Every time it’s rebooted, wlan1 is lost. And I have to run ifup manually.

At the minute, I am clueless how to move it forward.


#24

what legato version are you using?


#25

Here is the legato vesrion :
18.05.1-1-g08a23be_f9e48fb1999b9cf2ade59b66b90b888c


#26

Have you followed the github wiki


#27

It was unsuccessful. So I had taken help from one of your FAE here. He got me the binaries for MT7697 and mangoH.

After installing them, I was able to get wlan1 up. However, it’s just sitting there and not able to connect to any WiFi AP.

wifi client start command fails. (ERROR: le_wifiClient_Start returns ERROR.)


#28

did you apply the patch to legato
" Run ./apply_legato_patches.sh ~/legato_workspace/legato 18.01.0 to apply the Legato patches provided by the mangOH team to the Legato workspace fetched previously. Make sure to adjust the previous command if the Legato version you received differs from 18.01.0. Also make sure that there is a correspondingly named folder inside the Legato_patches folder."


#29

As I said earlier, I could not build anything on my virtual machine. Hence, your FAE sent me the binaries to upload into mangOH. He assisted to get them uploaded. That resolved the ‘wlan1’ interface issue. But next issue is wifi client doesnt start.

What is missing here?


#30

It is important to follow all the steps in the doc.
If that is not done you will end up with the issue you have right now.
I went through all the steps listed and had no issues.
Why can’t you build your VM?


#31

I think that’s the only way left now, to get the VM re-built. I will start with a fresh VM.
For this, which doc to start with? GSG or WiFi Wiki ? (seems like there are few overlapping steps with mangOH build).


#32

I think the WiFi wiki page may have been written a bit before the getting started guide was re-done. I’m going to edit the wiki page now to make it refer to the getting started guide where relevant.


#33

Ok, I will use the updated wiki page and of course will start with the GSG as you suggest.


#34

Hi @dfrey,

It’s good that the new VM image is now updated to latest version and most of the things already done.

I am facing a couple of issues here.

  1. MT7967 Flash tool is not running on the VM for some reason.

Here is the command failure —>
mangoh@mangoh-vm:~/mt76x7-flash-tool-64_1.0.5$ ./mt76x7-flash-tool
This application failed to start because it could not find or load the Qt platform plugin “xcb”.

Reinstalling the application may fix this problem.
Aborted (core dumped)
---->

However, I managed to upload the MT7697 binaries from the Windows host.

  1. Legato Patch won’t run successfully.
    I had created the 'legato_workspace/legato" folder. And ran patch command.
    Here is the message it throws —>

mangoh@mangoh-vm:~/Legato_patches$ ./apply_legato_patches.sh ~/legato_workspace/legato 18.07.0
fatal: not a git repository (or any of the parent directories): .git
“18.07.0” doesn’t appear to be a valid release tag

----->

I checked the folder and found that 18.07.0 folder present.
I even cloned the git folders again. (renamed the existing folder).
But still the command fails.

What could go wrong here?

Thanks for your support.

Regards
Madan


#35

Hi @dfrey,

looks like there is a typo.
I think “legato_workspace” should be replaced with “legato_framework”.

I could get the patches done with this modification and also rest of the process is completed as per the wiki.
Skipped wherever the VM had already supported.

I still can’t connect to WiFi.

Here are some observations -->

  1. ifup command needed to be run on every restart.
  2. iw dev wlan1 scan —> gives a couple of SSIDs around including mine
  3. Tried to run “/sbin/udhcpc -R -b -i wlan1”…it said ‘sending discover…’ for 3 or4times and return no lease.

A question - Does it need the SIM card activated and running? I was told it is required for AP mode.


#36

please check if this info helps to root cause,

root@swi-mdm9x28:~# ifup wlan1
ifup wlan1
Setup MT7697 UART
[ 152.507059] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:1 cur:0 tx) bc(rx:0 tx:2) mode:FIFO slv_addr:0x3a MSTR_STS:0x0c1300c8 OPER:0x00000090
Device: WP76
Enable power control
Initialized Linux WiFi modules
[ 155.071404] mt7697serial mt7697serial: mt7697_uart_open(): open serial device ‘/dev/ttyHS0’
Initialized MT7697 WiFi core
[ 155.156351] mt7697core mt7697core: mt7697_interface_add(): added(‘wlan1’) type(2)
Started MT7697 WiFi uart core wlan1


#37

Thanks for reporting this. I just realized that I left two things out of the instructions on the wiki page.

  1. You have to do source env-setup.sh before running ./mt767x7-flash-tool to setup environment variables necessary to run the flash tool.
  2. If you’re running in the VM, you need to map the USB to UART device into the VM, so that the VM can perform the upgrade. That’s done by choosing Devices > USB > FTDI FT230X Basic UART [1000] from the VirtualBox menu.

I will now update the wiki page to include these instructions.

You’re right that it should have said ~/legato_framework instead of ~/legato_workspace. Is ~/legato_framework a valid legato workspace? The expectation is that there should be a .repo folder and a legato folder in there. What does this command show?

mangoh@mangoh-vm:~$ ls -l ~/legato_framework/.repo/manifest.xml
lrwxrwxrwx 1 mangoh mangoh 44 Aug 14 19:27 /home/mangoh/legato_framework/.repo/manifest.xml -> manifests/legato/releases/18.07.0/legato.xml

I run the above command on the latest mangOH VM image and it’s showing that I have the 18.07.0 repo manifest checked out. It’s necessary to have the correct version checked out before you can patch the code. To do that:

cd ~/legato_framework/
repo sync -d
repo init -m legato/releases/18.07.0/legato.xml
repo sync

At this point you should be able to run the command to patch your Legato framework.

Try this:

# Bring up the network interface
ifup wlan1
# Perform a WiFi scan to see what APs are available
iw dev wlan1 scan | less
# Create a wpa_supplicant config file
wpa_passphrase your_ssid your_passphrase > your_ssid.wpa_supplicant.conf
# Invoke wpa_supplicant to join your network
wpa_supplicant -D wext _b -i wlan1 -c your_ssid.wpa_supplicant.conf
# Get an IP address via DHCP
udhcpc -R -b -i wlan1