WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: WiFi stack added  (Read 121148 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: WiFi stack added
« Reply #60 on: February 16, 2013, 05:09:08 AM »
Check sent/received frames with ifconfig to see where the traffic goes.

iptraf.tcz can provide details on traffic.

And 'route' command displays rules how traffic is routed actually.

Planty of ways to find out :)
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: WiFi stack added
« Reply #61 on: February 16, 2013, 05:19:31 AM »
Hi Gerrelt

What is your problem without the LAN cable connected?

PS: Thanks for you alternative wifi-script, however, I don't have succes with it. Everytime I start with it I get this error:
ioctl[SIOCSIWAP]: Operation not permitted.

And the Raspberry is not seen on my LAN (Using an IP-scanner), so I can't connect via Putty. but I can ping fine from the Raspberry???

EDIT: Gerrelt - you could simply pull the LAN cable, then you will soon discover if you are connected via WiFi or via LAN
« Last Edit: February 16, 2013, 05:23:50 AM by sbp »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10958
Re: WiFi stack added
« Reply #62 on: February 16, 2013, 05:55:33 AM »
Hi sbp
Quote
Everytime I start with it I get this error:
ioctl[SIOCSIWAP]: Operation not permitted.
That sounds like it needs to be run as root.

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: WiFi stack added
« Reply #63 on: February 16, 2013, 06:06:50 AM »
Check sent/received frames with ifconfig to see where the traffic goes.

iptraf.tcz can provide details on traffic.

And 'route' command displays rules how traffic is routed actually.

Planty of ways to find out :)

Thanx! I will try that.

What is your problem without the LAN cable connected?
Exactly the same problems as yours!  ;D

PS: Thanks for you alternative wifi-script, however, I don't have succes with it. Everytime I start with it I get this error:
ioctl[SIOCSIWAP]: Operation not permitted.
Yes, I get that too, but I think it's just a warning. Sometimes it just works fine allthough I had the "error".

And the Raspberry is not seen on my LAN (Using an IP-scanner), so I can't connect via Putty. but I can ping fine from the Raspberry???
Reset your router, and then try again. That usually makes my raspberry reconnect again.

EDIT: Gerrelt - you could simply pull the LAN cable, then you will soon discover if you are connected via WiFi or via LAN
I think it all just stops working. But that test could also prove the wireless just needs the wired.

Hi sbp
Quote
Everytime I start with it I get this error:
ioctl[SIOCSIWAP]: Operation not permitted.
That sounds like it needs to be run as root.

I start my script from bootlocal.sh. Then it's automatically started as root?
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10958
Re: WiFi stack added
« Reply #64 on: February 16, 2013, 06:13:11 AM »
Hi Gerrelt
Quote
I start my script from bootlocal.sh. Then it's automatically started as root?
Yes it is.

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: WiFi stack added
« Reply #65 on: February 16, 2013, 06:41:33 AM »


What is your problem without the LAN cable connected?
Exactly the same problems as yours!  ;D


My problem is the following:
1. The sound is breaking up when connected to a Wireless-N router (at 150 Mb/s).

and

2. The sound is perfect when connected to 54 Mb/sec using WPA or no protection, whereas WPA2 breaks the sound.

However, I don't have any problems connecting without a LAN cable. 

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: WiFi stack added
« Reply #66 on: February 16, 2013, 06:59:55 AM »
Well, OK, my problem started just like yours. The sound breaks up after a little while when using wifi.
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: WiFi stack added
« Reply #67 on: February 16, 2013, 07:59:21 AM »
Hi generelt.

Is it possible for you to confirm that using WPA and reducing the speed of the router to 54 Mb/s Will solve the sound problem?

It would be good to know if we Could solve the problem by going this route.

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: WiFi stack added (SOLVED - sort of)
« Reply #68 on: February 17, 2013, 12:40:43 AM »
Hi.

I'm now absolutely sure that my problem with the sound breaking up after app 30-60 sec when playing music via WiFi, is caused by the raspberry struggling to deliver/decode the packages fast enough.

I have now connected with my D-Link N-type router, connected at 150 Mb/sec and using WPA2 (which for sure will break the music after a short period of time) - and I have never been able to play music from this connection

BUT it is now playing nicely, I just needed to overclock the raspberry, and now everything is working.

I added this to the config.txt file:
arm_freq=900
core_freq=333
sdram_freq=450

Luckily, my raspberry booted fine, and I did not need any overvolting.
(I'm not sure if overvolting via the config.txt (without using force_turbo=1) will void your warranty.) If you did it in rasbian I think it would be OK, but doing it in microcore, I'm not sure. http://www.raspberrypi.org/archives/2008 here it says something about.
Therefore I did not overvolt it, but for me it is booting fine even without overvolting.


So in order to fix our problem we have three opportunities:
1. Force the raspberry to connect at max 54 Mb/sec and using WPA (or no protection)
2. Increase the speed of our raspberry (by overclocking)
3. Increase the efficiency of the WiFi driver (or the WPA2 decoding) - I don't have a clue whether this is possible?

Steen
« Last Edit: February 17, 2013, 12:44:41 AM by sbp »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: WiFi stack added (SOLVED - sort of)
« Reply #69 on: February 17, 2013, 12:43:11 AM »

BUT it is now playing nicely, I just needed to overclock the raspberry, and now everything is working.


WHhch model, 256 or 512MB RAM?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: WiFi stack added
« Reply #70 on: February 17, 2013, 12:45:09 AM »
It is a Model B with 256 RAM

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: WiFi stack added
« Reply #71 on: February 17, 2013, 01:18:07 AM »
It sounds reasonable and confirms that it is a performance issue with WPA2.

wpa_supplicant issue can be reported to upstream vendor but for sure would require significant rewrite. Also, compiler optimization may help but requires lot of time. Anybody welcome to play with it. Build script available in the repositoy, so you can try different options, or previous versions, etc.

:)

« Last Edit: February 17, 2013, 01:19:51 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: WiFi stack added
« Reply #72 on: February 17, 2013, 02:08:43 AM »
Hi gerrelt.

Is it possible for you to confirm that using WPA and reducing the speed of the router to 54 Mb/s Will solve the sound problem?

It would be good to know if we Could solve the problem by going this route.

I think I am using WPA. And I think my problem is not exactly the same as yours, see below.
But I can do some tests with my old 54 Mb/s router. But I will have to figure out how to reach the nas first, where the LMS server is. That's connected to the new router.

Hi.

I'm now absolutely sure that my problem with the sound breaking up after app 30-60 sec when playing music via WiFi, is caused by the raspberry struggling to deliver/decode the packages fast enough.

OK, I think my problem is totally different from your problem. I did have that behaviour a couple of times, but now my problem is different.
Yesterday I could connect and play (through Squeezelite) music without problems. Even synced with the two other raspberries. I let it play for an hour or so, and it didn't break up.

But then, after being disconnected for half an hour or something, it wouldn't connect anymore. Sometimes I see it gets an IP address, but I still cannot connect to it. I can't even ping it.
I even had a situation when I could not ssh to it from my PC, but I could ssh into it when I first ssh'd into my NAS and then ssh to the raspberry from withing this ssh session. So it must be some routing problem, or intialisation.

After trying several things, I rebooted my router, and it reconnected again.  ???


my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: WiFi stack added
« Reply #73 on: February 18, 2013, 07:08:25 AM »
Just a quick question.

The firmware.tzc can that be used directly in the picore, or does it need to be compiled for ARM?
Or is there a better way to add support for more wifi devices?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10958
Re: WiFi stack added
« Reply #74 on: February 18, 2013, 08:32:09 AM »
Hi sbp
To the best of my knowledge, that firmware executes in the hardware on the wireless card and does not need
to be recompiled for ARM. Assuming that the tcz formats between ARM and X86 are the same, you should be
able to use it.