Xiaomi WiFi Router 3G

I have the same issue on OpenWrt SNAPSHOT r7452-7e82418372, before the 18.06 finale.
And I chose the channel manually...
There is no real scan.
Maybe it will work in a few used environnement ??

I've an error while building :

make[3]: Entering directory '/home/ubuntu/openwrt/feeds/packages/net/usbip'
touch /home/ubuntu/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/usbip-2.0/.prepared_67daa368d17ae4ddc766a07015f0526c_18f1e190c5d53547fed41a3eaa76e9e9_check
rm -rf /home/ubuntu/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/usbip-2.0
cp -fpR /home/ubuntu/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/linux-4.14.54/tools/usb/usbip /home/ubuntu/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/usbip-2.0
true
[ ! -d ./src/ ] || cp -fpR ./src/. /home/ubuntu/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/usbip-2.0

Applying ./patches-2.0/100-musl-compat.patch using plaintext:
patching file src/usbipd.c
Hunk #1 FAILED at 453.
1 out of 1 hunk FAILED -- saving rejects to file src/usbipd.c.rej
Patch failed!  Please fix ./patches-2.0/100-musl-compat.patch!
Makefile:109: recipe for target '/home/ubuntu/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/usbip-2.0/.prepared_67daa368d17ae4ddc766a07015f0526c_18f1e190c5d53547fed41a3eaa76e9e9' failed
make[3]: *** [/home/ubuntu/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/usbip-2.0/.prepared_67daa368d17ae4ddc766a07015f0526c_18f1e190c5d53547fed41a3eaa76e9e9] Error 1
make[3]: Leaving directory '/home/ubuntu/openwrt/feeds/packages/net/usbip'
Command exited with non-zero status 2
time: package/feeds/packages/usbip/compile#0.01#0.87#2.84
package/Makefile:107: recipe for target 'package/feeds/packages/usbip/compile' failed
make[2]: *** [package/feeds/packages/usbip/compile] Error 2
make[2]: Leaving directory '/home/ubuntu/openwrt'
package/Makefile:103: recipe for target '/home/ubuntu/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile' failed
make[1]: *** [/home/ubuntu/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/ubuntu/openwrt'
/home/ubuntu/openwrt/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2

I'm running under WSL with ubuntu 18.04

OK, i've found this in usbipd.c.rej :

--- src/usbipd.c
+++ src/usbipd.c
@@ -453,7 +453,7 @@ static void set_signal(void)
 	sigaction(SIGTERM, &act, NULL);
 	sigaction(SIGINT, &act, NULL);
 	act.sa_handler = SIG_IGN;
-	sigaction(SIGCLD, &act, NULL);
+	sigaction(SIGCHLD, &act, NULL);
 }
 
 static const char *pid_file;

But in usbipd.c.orig, I have, starting @ line 449 :

static void set_signal(void)
{
	struct sigaction act;

	memset(&act, 0, sizeof(act));
	act.sa_handler = signal_handler;
	sigemptyset(&act.sa_mask);
	sigaction(SIGTERM, &act, NULL);
	sigaction(SIGINT, &act, NULL);
	act.sa_handler = SIG_IGN;
	sigaction(SIGCHLD, &act, NULL);
}

static const char *pid_file;

So do I correct it replacing -453,7 +453,7 by 449 ???

Delete the single patch file in the patch folder of usbip. That should be sufficent to get a working build.
The patch is already included in upstream source, thats why it fails to apply.

Thanks helping me, now getting error for usbip_list.o :

make[6]: Entering directory '/home/ubuntu/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/usbip-2.0/src'
  CC       usbip.o
  CC       utils.o
  CC       usbip_network.o
  CC       usbip_attach.o
  CC       usbip_detach.o
  CC       usbip_list.o
usbip_list.c: In function 'list_devices':
usbip_list.c:214:11: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
   devpath = udev_device_get_devpath(dev);
           ^
cc1: all warnings being treated as errors
Makefile:418: recipe for target 'usbip_list.o' failed
make[6]: *** [usbip_list.o] Error 1

Lol... Bad error...

Try to add -Wno-error to the usbip CFLAGS in package/feeds/packages/usbip/Makefile

before:

...
CFLAGS+="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include"
...

after:

...
CFLAGS+="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -Wno-error"
...

The last one that we added here should take precedence over the one that get added with TARGET_CFLAGS.

You could disable usbip, but then the build will be likely not compatible with the kernel config hash from the release builds and you have to use the force-depends option on opkg...

Same again even with openwrt\feeds\packages\net\usbip\Makefile modified...

Yeah, do yourself a favour and don't use WSL or Ubuntu - I struggled with those. Was much easier just using a debian docker image - compiled first time.

I have installed 18.06 release but I can't change router's IP from the official 192.168.1.1 to any another network (192.168.x.1)... Is anyone else facing the same issue?

I ssh'd with Putty, then vi /etc/config/network to change networking. The web interface is flaky. SQM and ntp client and Luci software and wireless is the same. Luci would hang and exit, requiring a login after installing packages.

I need help, 5ghz wifi doesnt work here.

On wireless overview on Luci I see:

 Generic MAC80211 802.11nac
Channel: ? (? GHz) | Bitrate: ? Mbit/s
0%
SSID: wifi_5G | Mode: Master
Wireless is not associated

System Log:

Fri Aug  3 21:25:01 2018 daemon.err hostapd: Configuration file: /var/run/hostapd-phy1.conf
Fri Aug  3 21:25:01 2018 kern.info kernel: [ 1158.178767] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
Fri Aug  3 21:25:01 2018 daemon.notice hostapd: wlan1: INTERFACE-ENABLED
Fri Aug  3 21:25:01 2018 daemon.notice hostapd: wlan1: INTERFACE-DISABLED
Fri Aug  3 21:25:01 2018 daemon.err hostapd: nl80211: Could not configure driver mode
Fri Aug  3 21:25:01 2018 daemon.notice hostapd: nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Fri Aug  3 21:25:01 2018 daemon.err hostapd: nl80211 driver initialization failed.
Fri Aug  3 21:25:01 2018 daemon.notice hostapd: wlan1: interface state UNINITIALIZED->DISABLED
Fri Aug  3 21:25:01 2018 daemon.notice hostapd: wlan1: AP-DISABLED
Fri Aug  3 21:25:01 2018 daemon.notice hostapd: wlan1: CTRL-EVENT-TERMINATING
Fri Aug  3 21:25:01 2018 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan1 wasn't started
Fri Aug  3 21:25:01 2018 daemon.notice netifd: radio1 (7329): cat: can't open '/var/run/wifi-phy1.pid': No such file or directory
Fri Aug  3 21:25:01 2018 daemon.notice netifd: radio1 (7329): WARNING (wireless_add_process): executable path /usr/sbin/wpad does not match process  path ()
Fri Aug  3 21:25:01 2018 daemon.notice netifd: radio1 (7329): Command failed: Invalid argument
Fri Aug  3 21:25:01 2018 daemon.notice netifd: radio1 (7329): Device setup failed: HOSTAPD_START_FAILED

and:

root@OpenWrt:~# cat /var/run/hostapd-phy1.conf
driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
country_code=BR
ieee80211d=1
ieee80211h=1
hw_mode=a
beacon_int=100
channel=108


ieee80211n=1
ht_coex=0
ht_capab=[HT40+][LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1]
vht_oper_chwidth=1
vht_oper_centr_freq_seg0_idx=106
ieee80211ac=1
vht_capab=[RXLDPC][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][MAX-A-MPDU-LEN-EXP3]

interface=wlan1
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
wpa_passphrase=password
auth_algs=1
wpa=3
wpa_pairwise=CCMP
ssid=wifi_5G
bridge=br-lan
wpa_disable_eapol_key_retries=0
wpa_key_mgmt=WPA-PSK
okc=0
disable_pmksa_caching=1
bssid=78:11:dc:25:e9:3e

Hi. I need some help. I had Stable 18.06 installed but decided to try the newest snapshot. So I upgraded directly from LUCI using the latest Snapshot sysupgrade.tar. After reboor I could no longer acess the router via web browser not even with SSH. I can only acess with SSH from failsafe. Considering that I can only acess from failsafe, how can I regain router acess? I tried to revert back to stock using this below from failsafe, but the second command does not work. Did I just bricked my device?

Thank you

Failsafe only:

  1. run: mount_root
  2. run: sh /etc/uci-defaults/30_uboot-envtools
  3. Then do the steps for 'All'

All:

  1. run: fw_setenv flag_try_sys2_failed 1
  2. run: reboot

OK so I've tried with docker, which is much faster, pull a debian image, still the same errors to fix but still blocked on :

 usbip_list.c: In function 'list_devices':
usbip_list.c:214:11: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
   devpath = udev_device_get_devpath(dev);
           ^
cc1: all warnings being treated as errors
Makefile:418: recipe for target 'usbip_list.o' failed
make[6]: *** [usbip_list.o] Error 1

@tanonn, can you try to compile a build on 18.06 to check if you get same errors ?
I assume it's version related...

It's a known bug: https://github.com/openwrt/packages/issues/5630

There was a commit 3 days ago that may make it compile but the binary doesn't work very well either.

Oh nice ! Thanks for the intell...

I've patched target/sdk/Makefile but failed.
Do I have to relaunch other command before make download world -j1 V=s ??

I don't know much about compiling. I would try "make clean" and start from scratch if that doesn't work.

OK, compiled first time the latest snapshot without any warn or error !!
So why the release is so buggy ???

Hello friends, sorry my English, I am a new user, recently bought a mi 3g router, can I install the new stable version using the xiaomi web interface normally?

No, initial installation is a bit more involved and described in detail in this very thread.