OSMC - Setup a bridge with Ralink RT 5572 problem

Hi,

i brought a new USB-WiFi-Stick wich is able to set up an Access Point. The stick shipps with the Ralink RT5572 chipset.

I really want a regular bridge because a already have a DHCP-Server in my Network and also i want to bridge (later) another ethernet-usb-dongle.

I used this Settings to build the bridge:
http://www.foxplex.com/sites/raspberry-pi-als-wlan-access-point/

I works with raspian. No Problems so far. But it doesn’t work with OSMC. It seems that the Drivers are not working. Do you have any solution for it?

Hiere is the pastebin:
http://pastebin.com/TfXxvCpp

sudo hostapd -dd /etc/hostapd/hostapd.conf suddenly stops (it shouldnt).
In line 86 there is: wlan0: Could not connect to kernel Driver.

How is it possible to get that orginal driver to work?

Thanks in advance.

hi, is firmware-ralink package installed??

Hi,

i tried to install the firmware: It always tells me this:
sudo apt-get install firmware-ralink
Reading package lists… Done
Building dependency tree
Reading state information… Done
Suggested packages:
initramfs-tools
The following NEW packages will be installed:
firmware-ralink
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 22.2 kB of archives.
After this operation, 103 kB of additional disk space will be used.
Get:1 Index of /debian jessie/non-free firmware-ralink all 0.43 [22.2 kB]
Fetched 22.2 kB in 0s (116 kB/s)
Selecting previously unselected package firmware-ralink.
(Reading database … 22718 files and directories currently installed.)
Preparing to unpack …/firmware-ralink_0.43_all.deb …
Unpacking firmware-ralink (0.43) …
dpkg: error processing archive /var/cache/apt/archives/firmware-ralink_0.43_all.deb (–unpack):
trying to overwrite ‘/lib/firmware/rt3290.bin’, which is also in package wireless-firmware-osmc 1.1.2
Errors were encountered while processing:
/var/cache/apt/archives/firmware-ralink_0.43_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I also disabled connman.
systemctl disable connman.service
No sucess!

Don’t do that, the firmware is already included, and you’ll create issues with APT if you try and do this.

Our connection manager ConnMan, expects an nl80211 implementation for tethering. Some chipset vendors (Ralink for example) don’t do this. A search for ‘nl80211’ will cover this.

Thread jacking is rude. Merged into an existing topic: Tethering wired-to-wireless fails with “invalid password”

so for me it´s not working ether.

I installed the latest osmc-build a few times refresh. I didn´t imported any settings. I did sudo apt-get update
and during another test i didn´t update, so no success.

If i use the original osmc build in-thetering-feature (wifi enabled, ethernet to wifi)- the raspberry give me a hotspot wich im able to connect… buuut my iPhone shows no WiFi Symbol in the top but i am connected and get an IP (192.168.0.2) from the Raspberry. But no Data. Thats quite strange.

When i´m trying whole thing with hostapd - always the driver issue and no ap. I did this various times from scratch with the latest osmc build.

I tried the same steps with raspbian - it was working flawless. I tried also the thetering feature of LibreELEC. No problems with the AP! So for me it looks that there is a driver problem with the ralink drivers.

For testing- is there a possibillity to deinstall the osmc-ralink drivers and install the jessie drivers? Lets give that a shot.

best regards

what exact wifi dongle do you use?
what does iw list and dmesg show for it?

osmc@osmc:~$ iw list
-bash: iw: command not found
osmc@osmc:~$ lsusb
Bus 001 Device 005: ID 04d9:1603 Holtek Semiconductor, Inc. Keyboard
Bus 001 Device 004: ID 148f:5572 Ralink Technology, Corp. RT5572 Wireless Adapter
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
osmc@osmc:~$ iwconfig
wlan0 IEEE 802.11abgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off

lo no wireless extensions.

eth0 no wireless extensions.

after setting uscmax current =1 i recieve:

nl80211 driver initialization failed.
that seems to be a bit better. Here is the whole output.

Half way done. Few steps to go. I´ve done a few things… and AP-is working. But no bridge or no password gets accepted. What i´ve done…(i started fresh again)

Deactivate connman: sudo systemctl disable connman.service
Install iw and unblock wlan: sudo apt-get install rfkill; sudo rfkill unblock wlan

Turn off wpa.supplicant: sudo systemctl --force stop wpa_supplicant.service

If i have this hostapd.conf Hostap - complete wi-fi AP configuration - Niwi web I can connect to the AP.

But if iam set bridge=br0. It is no possible to connect to the AP! I recieve the following errors.
wlan0: AP-ENABLED
wlan0: STA bc:54:36:2c:e9:ba IEEE 802.11: authenticated
wlan0: STA bc:54:36:2c:e9:ba IEEE 802.11: associated (aid 1)
WPA: wpa_sm_step() called recursively

And ideas?

Not really. Only thing that may give clues is a clap, but some of this starts to get beyond my knowledge.

So, i got it (maybe most of it)!

It seems thats wpa_supplicant is blocking the driver. If you don´t need to connect with a WiFi, you can deinstall/ disable it. Then u have a few further problems…

Bridge is not up, ethernet is not part of the bridge, Network (Lan) is locking when u add ether net to the bridge…no possibillity to access via SCP.

Just control all you steps with brctl show and ifconfig (not ifconfig -a!).

What are the steps (after the others in the fist post):

Remove wpa_supplicant - sudo apt-get remove wpasupplicant
Bring Bridge up - sudo ifconfig br0 up
Add eth0 to the bridge (in my settig wlan0 is already part of the network) - sudo brctl addif br0 eth0 (after that- eth0 is locking!)
Stop and restart the network services - sudo service networking stop, sudo systemctl daemon-reload, sudo service networking startifconfig

Now i have to reporoduce that steps automatically after every reboot…and somehow i cant connect to that device via scp. The IP that ifconfig shows for eth0 isnt answerring.

Did anyone know- how its possible to enter OSMC from the commandline again without reboot…???

Wow, after a long journey- i nearly got it! All the encryption problems seems to be related to wpa_supplicant.

My hostapd.conf looks now like:
#hostapd.conf
interface=wlan0
driver=nl80211
ssid=RaspberryWLAN
hw_mode=g
ieee80211n=1
channel=1
macaddr_acl=0
auth_algs=1
wpa=3
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
wpa_ptk_rekey=600
eapol_version=1

U see- no bridge = br0!!! After reboot, just login to the Raspi via SCP and enter:
sudo brctl addbr br0
sudo ifconfig br0 up
sudo brctl addif br0 eth0 wlan0

There u have a bridge up and running, WiFi up and running in N-Mode and connected to the internet! I just have to get this run after every reboot.

But one small problem- OSMC means: Internetconnection = occupied/ no connection to the internet :frowning: