Vonger / vocore2

VoCore2 firmware drivers
https://vocore.io
96 stars 45 forks source link

apcli0 cann't get ip after wifi reload #3

Closed elgent closed 5 years ago

elgent commented 6 years ago

Have anyone meet my problem as below? After modify the wireless to ap+sta mode correctly, when first start up, it probably work well.

  1. exec shell cmd "wifi up";
  2. rescan to connect another ssid by luci
  3. /etc/init.d/network restart When i do any of above, the apcli0 can connect success, but can't get ip again. If i reboot the device now or do the following steps, it probably work well again. ifconfig apcli0 down ifconfig ra0 down rmmod mt7628 insmod mt7628 wifi up

Any suggestion? Thank you.

rkkoszewski commented 6 years ago

Same here on a Vocore 2 Lite. Once it connects to an AP and then you restart the wifi, it won't get a new IP unless you restart the device.

Vonger commented 6 years ago

currently solution is have to restart... I have no idea about this bug yet :)

rkkoszewski commented 6 years ago

From what I could observe, it doesn't seem to be an issue with the ip, but a connection issue.

If you run "iwinfo" while connected it shows the AP and the AP MAC. When you run "wifi" and wait a bit, the AP name will show up but the AP MAC will be 00:00:00...

Also if you set a static IP, you will see that even with a valid IP you will get nothing trough.

elgent commented 6 years ago

I found not every time 'rmmod + insmod mt7628' take effect now This problem has puzzled me for a long time :(

elgent commented 6 years ago

@rkkoszewski I agree with you It seem that something is wrong in the driver cause fail to send pkt out... But i have on idea now after review some driver code

Vonger commented 6 years ago

I think this problem can be fixed. currently I am using iwpriv to setup the driver. So once the wifi driver reloaded, maybe some settings is not setting to driver correctly.

rkkoszewski commented 5 years ago

Any update on this? Has there been any work with this? There have been several commits and I'm unable to test it right now.

Vonger commented 5 years ago

It should fixed by the new script.

rkkoszewski commented 5 years ago

Issue is still present. Completely fresh build following Vocore2.git instructions as per Readme. I go to Luci, connect to an AP (Run ifconfig trough serial and you see an IP), and when I click on "restart" ra0, apcli0 never manages to get an IP again (Run ifconfig trough serial, and no IP in sight). Restart of Vocore2 Lite fixes the issue as always.

Vonger commented 5 years ago

I just update new patch ralink.sh has updated. This time it should be totally fixed :)

rkkoszewski commented 5 years ago

I confirm, seems to be fixed now. I just compiled it again from scratch and flashed it on my Vocore 2 Lite. When you reconnect from command line with "wifi" it reconnects and gets the IP. If you use Luci and restart the wifi interface, it resets the wifi and finds an IP also. So it seems like the IP bug after wifi restart is fixed.

One thing I noticed is that when you ONLY disable the wifi client from Luci, the AP data gets copied to the Client and it breaks everything till you restart. But that's a different bug.

Vonger commented 5 years ago

@rkkoszewski that might be luci bug.