Wifi

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

lolof
Atariator
Atariator
Posts: 26
Joined: Sat Oct 06, 2018 9:21 pm

Re: Wifi

Post by lolof »

Trying to set up wifi....

In wiki they speak about a file /Linux/_wpa_supplicant

I coud not find it but instead found one in /etc

wpa_supplicant

Here is the file :
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

network={
key_mgmt=NONE
}
Is it the good one ?
If yes, what exactly should I add to it ?
How to modify it because in FTP it tells me that I have no right to do it. I can modify /Media but not /etc

Thanks for the help.
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Wifi

Post by Sorgelig »

lolof wrote:Trying to set up wifi....

In wiki they speak about a file /Linux/_wpa_supplicant

I coud not find it but instead found one in /etc

wpa_supplicant
Take the SD card installer from official source and it will be there.
lolof
Atariator
Atariator
Posts: 26
Joined: Sat Oct 06, 2018 9:21 pm

Re: Wifi

Post by lolof »

Finally found the file located @ /media/fat/linux/_wpa_supplicant.conf

Is it the good one ?

Replace my ssid and password, put my contry code and change name to wpa_supplicant.conf but it's not working :-(
It's not working out of the box :-(

The model is :

XIAOMI Mi Portable Wifi mini Router 150M
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Wifi

Post by Sorgelig »

lolof wrote:Finally found the file located @ /media/fat/linux/_wpa_supplicant.conf

Is it the good one ?

Replace my ssid and password, put my contry code and change name to wpa_supplicant.conf but it's not working :-(
It's not working out of the box :-(

The model is :

XIAOMI Mi Portable Wifi mini Router 150M
Ok, i'm like an idiot will re-post my message on every page:
Basically linux is not plug-and-play OS. So you can't expect that random WiFi adapter will work.
It's not like Windows where you install supplied by vendor driver and it will start to work.
The best practice is to read the tread and check what dongles are confirmed to work.
lolof
Atariator
Atariator
Posts: 26
Joined: Sat Oct 06, 2018 9:21 pm

Re: Wifi

Post by lolof »

Thank you.

I took a look at all the thread and find the solution :

http://www.atari-forum.com/viewtopic.ph ... 69#p344349

Working like a charm..... The MisTer is connected through wifi now. Read help a lot :-) Thanks again.
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Wifi

Post by Sorgelig »

I've added some known to work WiFi dongles here:
https://github.com/MiSTer-devel/Main_Mi ... WiFi-setup

everyone is welcome to add more dongles.
djmartins
Captain Atari
Captain Atari
Posts: 328
Joined: Wed Nov 21, 2018 10:26 pm

Re: Wifi

Post by djmartins »

I used the Xiaomi one like Terasic sells and the way to make it work is in this thread.
Works well and is cheap.
Ldaborc
Retro freak
Retro freak
Posts: 16
Joined: Fri Nov 23, 2018 3:03 pm

Re: Wifi

Post by Ldaborc »

Please tell us how to build a working driver for wifi from the source code.
If I could, I would have done it myself! 8)
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Wifi

Post by Sorgelig »

Ldaborc wrote:Please tell us how to build a working driver for wifi from the source code.
There is no universal solution for this.
You need to refer the sources and readme of the driver. It's not user friendly and sometimes requires a lot of knowledge.
Some drivers support one range of versions of kernel, some drivers support other range. Sometimes need to modify the sources.

Welcome to Linux :)
Beaps
Atari User
Atari User
Posts: 30
Joined: Sun Apr 17, 2011 3:58 pm

Re: Wifi

Post by Beaps »

Hi All,

I am trying to get this working on my MiSTer and I ain't got a clue lol. It says its a RalinkWIFI

Image

Can someone help me out please
BBond007
Captain Atari
Captain Atari
Posts: 466
Joined: Wed Feb 28, 2018 3:23 am

Re: Wifi

Post by BBond007 »

Beaps wrote:Hi All,

I am trying to get this working on my MiSTer and I ain't got a clue lol. It says its a RalinkWIFI

Image

Can someone help me out please
If you go into console or SSH and type "dmesg" you should get some info, but at the very least, the USB vendor and product IDs which can be used to identify the specific Ralink chipset.
viperman3
Atarian
Atarian
Posts: 9
Joined: Tue Nov 27, 2018 3:12 am

Re: Wifi

Post by viperman3 »

Using tp-link tl-wn823n v2 with the correct firmware installed and noting that evertime I exit any core the wifi stops working. Performing a reset or cold boot from the OSD does not get the wifi to start again. Only way to get wifi again is if I remove and reapply power to the DE-10 nano. I have the I/O board and the USB boards on this setup. Has anyone else experienced this issue with wifi not reconnecting after exiting any core?
Ldaborc
Retro freak
Retro freak
Posts: 16
Joined: Fri Nov 23, 2018 3:03 pm

Re: Wifi

Post by Ldaborc »

Yes, i have tp-link tl-wn823n v3 & This work only after power on. Reboot & cold reboot no take effect to connect Wi-Fi.
If I could, I would have done it myself! 8)
arkhos
Atarian
Atarian
Posts: 3
Joined: Thu Jan 10, 2019 4:29 pm

Re: Wifi

Post by arkhos »

Reporting tplink T2U(US) ver.2.0 USB wifi dongle, is working out of the box with the current mister build (Linux kernel Kernel v4.19)
User avatar
spark2k06
Atari User
Atari User
Posts: 31
Joined: Sat Feb 23, 2019 6:46 am
Location: Barakaldo, Spain

Re: Wifi

Post by spark2k06 »

BBond007 wrote:
Beaps wrote:Hi All,

I am trying to get this working on my MiSTer and I ain't got a clue lol. It says its a RalinkWIFI

Image

Can someone help me out please
If you go into console or SSH and type "dmesg" you should get some info, but at the very least, the USB vendor and product IDs which can be used to identify the specific Ralink chipset.
I have one similar, and dmesg report me this on infinite loop:

[ 95.533364] usb 1-1.2: new full-speed USB device number 10 using dwc2
[ 95.618458] usb 1-1.2: not running at top speed; connect to a high speed hub
[ 95.634141] usb 1-1.2: New USB device found, idVendor=148f, idProduct=7601, bcdDevice= 0.00
[ 95.634152] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 95.634159] usb 1-1.2: Product: 802.11 n WLAN
[ 95.634166] usb 1-1.2: Manufacturer: MediaTek
[ 95.634172] usb 1-1.2: SerialNumber: 1.0
[ 95.702367] usb 1-1.2: reset full-speed USB device number 10 using dwc2
[ 95.793446] mt7601u 1-1.2:1.0: ASIC revision: 76010001 MAC revision: 76010500
[ 95.804580] mt7601u 1-1.2:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____
[ 96.435612] mt7601u 1-1.2:1.0: Warning: unsupported EEPROM version 0d
[ 96.435623] mt7601u 1-1.2:1.0: EEPROM ver:0d fae:00
[ 96.707194] mt7601u 1-1.2:1.0: Error: RX urb failed:-71
[ 96.712533] mt7601u 1-1.2:1.0: Error: RX urb failed:-71
[ 96.717827] mt7601u 1-1.2:1.0: Error: RX urb failed:-71
[ 96.723119] mt7601u 1-1.2:1.0: Error: RX urb failed:-71
[ 96.728414] mt7601u 1-1.2:1.0: Error: RX urb failed:-71
[ 96.733700] mt7601u 1-1.2:1.0: Error: RX urb failed:-71
[ 96.740122] mt7601u 1-1.2:1.0: Error: MCU resp urb failed:-71
[ 96.745877] mt7601u 1-1.2:1.0: Error: MCU resp evt:0 seq:5-4!
[ 96.751965] usb 1-1: USB disconnect, device number 5
User avatar
spark2k06
Atari User
Atari User
Posts: 31
Joined: Sat Feb 23, 2019 6:46 am
Location: Barakaldo, Spain

Re: Wifi

Post by spark2k06 »

I have been researching something and it seems that there is a solution:
1\. From archive unpack just folder `drivers/net/wireless/mediatek/mt7601u`
2\. Edit phy.c. Find function `mt7601u_init_cal` and comment out call `mt7601u_mcu_calibrate(dev, MCU_CAL_RXIQ, 0);` like so:

```
// ret = mt7601u_mcu_calibrate(dev, MCU_CAL_RXIQ, 0);
// if (ret)
// return ret;
// ret = mt7601u_mcu_calibrate(dev, MCU_CAL_DPD, dev->dpd_temp);
// if (ret)
// return ret;
```
Find function `mt7601u_phy_recalibrate_after_assoc` and comment out call `mt7601u_mcu_calibrate(dev, MCU_CAL_DPD, dev->curr_temp);` like so:

```
void mt7601u_phy_recalibrate_after_assoc(struct mt7601u_dev *dev)
{
// mt7601u_mcu_calibrate(dev, MCU_CAL_DPD, dev->curr_temp);

mt7601u_rxdc_cal(dev);
}
```
3. Rebuild module...
More info here: https://github.com/kuba-moo/mt7601u/issues/64

Can someone rebuild the module 'mt7601u' with this solution and leave the release here to test it? At this moment I don't have idea of ​​how to do it on my own but if necessary, I would investigate it too ...
BBond007
Captain Atari
Captain Atari
Posts: 466
Joined: Wed Feb 28, 2018 3:23 am

Re: Wifi

Post by BBond007 »

spark2k06 wrote:
Can someone rebuild the module 'mt7601u' with this solution and leave the release here to test it? At this moment I don't have idea of ​​how to do it on my own but if necessary, I would investigate it too ...
Building the module on its own won't do you any good, as the module is statically linked into the kernel.

Anyway, I have made the source change suggested:

https://github.com/bbond007/Linux-Kerne ... 387f3ba2e8

The resulting kernel is too large to post in the forum but you can download it here:

https://github.com/bbond007/Linux-Kerne ... er/RELEASE

This is a one-shot deal. If it works great, if not... oh well.. I'm not going to spend much more time making changes to sources I don't understand for hardware I don't own and can't test. This thread contains info on compiling the kernel for yourself:

http://www.atari-forum.com/viewtopic.php?f=117&t=32764

Good Luck...
User avatar
spark2k06
Atari User
Atari User
Posts: 31
Joined: Sat Feb 23, 2019 6:46 am
Location: Barakaldo, Spain

Re: Wifi

Post by spark2k06 »

BBond007 wrote: The resulting kernel is too large to post in the forum but you can download it here:

https://github.com/bbond007/Linux-Kerne ... er/RELEASE
Works successfully! Thank you :-)

Image
BBond007 wrote:
This is a one-shot deal. If it works great, if not... oh well.. I'm not going to spend much more time making changes to sources I don't understand for hardware I don't own and can't test. This thread contains info on compiling the kernel for yourself:

http://www.atari-forum.com/viewtopic.php?f=117&t=32764

Good Luck...
Thank you very much too for the link with the information about kernel rebuilding, I may need it in the future.
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Wifi

Post by Sorgelig »

would be good if others who has previously working mt7601u dongles try this modification. If it will work, then i can include into standard release.
barbaro00
Atariator
Atariator
Posts: 20
Joined: Tue Feb 07, 2017 10:34 am

Re: Wifi

Post by barbaro00 »

spark2k06 wrote:
BBond007 wrote: The resulting kernel is too large to post in the forum but you can download it here:

https://github.com/bbond007/Linux-Kerne ... er/RELEASE
Works successfully! Thank you :-)

Image
BBond007 wrote:
This is a one-shot deal. If it works great, if not... oh well.. I'm not going to spend much more time making changes to sources I don't understand for hardware I don't own and can't test. This thread contains info on compiling the kernel for yourself:

http://www.atari-forum.com/viewtopic.php?f=117&t=32764

Good Luck...
Thank you very much too for the link with the information about kernel rebuilding, I may need it in the future.
How can I install this Kernel?
I have the same wifi dongle...

Thank you!
BBond007
Captain Atari
Captain Atari
Posts: 466
Joined: Wed Feb 28, 2018 3:23 am

Re: Wifi

Post by BBond007 »

barbaro00 wrote: How can I install this Kernel?
I have the same wifi dongle...

Thank you!
simple method: pull SD card and use your reader/writer to replace /media/fat/linux/zImage_dtb

I only pull my card as a last resort after I have broken something :)

more complicated method:

1. connect wired ethernet and use WinSCP to transfer zImage_dtb to /media/fat
2. connect via SSH and type:
#cp /media/fat/zImage_dtb /media/fat/linux;reboot


good luck :)
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Wifi

Post by Sorgelig »

BBond007 wrote:1. connect wired ethernet and use WinSCP to transfer zImage_dtb to /media/fat
2. connect via SSH and type:
#cp /media/fat/zImage_dtb /media/fat/linux;reboot
Simpler method is just transfer zImage_dtb directly to /media/fat/linux by replacing the old one.
zImage_dtb is not opened while MiSTer running.
BBond007
Captain Atari
Captain Atari
Posts: 466
Joined: Wed Feb 28, 2018 3:23 am

Re: Wifi

Post by BBond007 »

Sorgelig wrote:
BBond007 wrote:1. connect wired ethernet and use WinSCP to transfer zImage_dtb to /media/fat
2. connect via SSH and type:
#cp /media/fat/zImage_dtb /media/fat/linux;reboot
Simpler method is just transfer zImage_dtb directly to /media/fat/linux by replacing the old one.
zImage_dtb is not opened while MiSTer running.
I agree that should work :)

I had an issue at some point that caused me to start doing that extra step.
barbaro00
Atariator
Atariator
Posts: 20
Joined: Tue Feb 07, 2017 10:34 am

Re: Wifi

Post by barbaro00 »

Hi,

I does not work for me... :(
The Kernel works well but no wifi...
BBond007
Captain Atari
Captain Atari
Posts: 466
Joined: Wed Feb 28, 2018 3:23 am

Re: Wifi

Post by BBond007 »

barbaro00 wrote:Hi,

I does not work for me... :(
The Kernel works well but no wifi...
did you look at dmesg output?

my guess is you need the bin file

http://www.atari-forum.com/viewtopic.ph ... 1u#p344349
Locked

Return to “MiSTer”