Jump to content

R1 - wifi issue


petrmaje

Recommended Posts

Hi All,

 

Is here somebody, who use R1+SATA disk+wifi together? (with Igor's great debian with kernel 3.4.107)

When I switch on wifi, everything seems to be ok. I live in highly interfered area, so performance is sometimes low, but everything works for several hours.

After several hours my R1 gets frozen. Last log message is "DHCP ACK" from my wifi printer.

The question is, can it be power issue? I have USB power meter and current sometimes exceed 1,5A, but voltage holds still above 5V.

When I tested the board with OpenWRT, I had connected USB LTE modem to R1, wifi was switched on too, but system was stable. Another thing is that OpenWRT has a bug in wifi driver and wifi was unusable.

Sooo, has somebody idea, how to investigate the problem? Where to begin?

 

Any idea is welcome :)

 

Thanks ...

Link to comment
Share on other sites

There is some problem with latest 3.4.107 build. Currently not sure where - it just hangs ... after days. I experience this first on Orange, than on Banana ... so I thing it affect all A20 boards.

 

I suspect u-boot but am currently very tight with time for serious debugging.

 

A good start would be to debug. :D We need to find out what's causing this. B)

 

Try also with kernel 4.0.5 (u-boot is also a bit different).

Link to comment
Share on other sites

Thanks, I'm VERY happy that this is not HW issue :)

I'm not linux expert, so one more question if I can :) Is there some painless way, howto upgrade the system to kernel 4.0.5?

I did lot of things with my router, 7 LEDs triggered by the system events, MRTG etc and I don't want to startover with zero again.. 

Link to comment
Share on other sites

After installation jessie with 4.0.5 kernel, wifi have better performance and system looks stable. But kernel 4.0.5 has probably bug with SATA. And this is the reason, why my system hangs after kernel upgrade:

 

[ 1046.318010] ata1.00: configured for UDMA/133 (device error ignored)
[ 1046.318062] ata1.00: device reported invalid CHS sector 0
[ 1046.318164] ata1: EH complete
[ 1046.323039] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[ 1046.323078] ata1.00: irq_stat 0x40000000
[ 1046.323109] ata1.00: failed command: FLUSH CACHE EXT
[ 1046.323175] ata1.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 3
         res 61/04:00:00:00:00/00:00:00:00:00/a0 Emask 0x1 (device error)
[ 1046.323211] ata1.00: status: { DRDY DF ERR }
[ 1046.323236] ata1.00: error: { ABRT }
[ 1046.327870] ata1.00: configured for UDMA/133 (device error ignored)
[ 1046.327927] ata1.00: device reported invalid CHS sector 0
[ 1046.328085] blk_update_request: I/O error, dev sda, sector 0
[ 1046.328168] JBD2: recovery failed
[ 1046.328209] EXT4-fs (sda1): error loading journal
[ 1046.328221] ata1: EH complete
root@lamobo:~#

Link to comment
Share on other sites

.. .yes read like power issue.

 

if you Think i.e 1000mA usb loader  are good eoth for power all this - you fool yourself.

 

i have an 5000mA powerLoader connected to an poweree usb hub and my R1 + wifi, + mouse + keyboard + ssd at R1 and umts modem as well.

Link to comment
Share on other sites

.. .yes read like power issue.

 

if you Think i.e 1000mA usb loader  are good eoth for power all this - you fool yourself.

 

i have an 5000mA powerLoader connected to an poweree usb hub and my R1 + wifi, + mouse + keyboard + ssd at R1 and umts modem as well.

I have 3000mA power supply, it should be enough. As I said before, on 3.4 kernel SATA works perfectly, so my problem should be caused by software. Which kernel do you use?

Link to comment
Share on other sites

There is a hardware walk around for powering SATA.

 

GPIOs. On new kernel you will need recalculate:

http://linux-sunxi.org/GPIO

What "recalculate"? Do you mean fex config for powering SATA? The setting is correct. I will return to old 3,4 kernel and switch off wifi. I dont understand why to do some hardware changes, if it is possible do by software as kernel 3,4 does.

Link to comment
Share on other sites

I have 3000mA power supply, it should be enough. As I said before, on 3.4 kernel SATA works perfectly, so my problem should be caused by software. Which kernel do you use?

 

i am using Igors  kernel 3.19.3 .. from his build lib ...on the way to move to kernel 4.0.5..

Link to comment
Share on other sites

What "recalculate"? Do you mean fex config for powering SATA? The setting is correct. I will return to old 3,4 kernel and switch off wifi. I dont understand why to do some hardware changes, if it is possible do by software as kernel 3,4 does.

 

You mentioned:

 

7 LEDs triggered by the system events

 

So I thought you are using GPIO header. The numbers are different .

 

Regarding power supply. There are some topic on this forum and else where this problem is worked into details. R1 has a design fail regarding power supply. If you want to use board in full scale than you need to fix powering. Micro USB has it's own power limits and they are less then what's needed for everything.

Link to comment
Share on other sites

You mentioned:

 

7 LEDs triggered by the system events

 

So I thought you are using GPIO header. The numbers are different .

 

Regarding power supply. There are some topic on this forum and else where this problem is worked into details. R1 has a design fail regarding power supply. If you want to use board in full scale than you need to fix powering. Micro USB has it's own power limits and they are less then what's needed for everything.

Ok, thanks, LEDs are only design question, they can wait :) I did last test: kernel upgrade 3->4 on SD card. After upgade service hostapd fails with some errors and after second reboot R1 changed to "Micro" on boot screen ...?? :-)

I have not enough technical knowledge to solve this,

I know about power limitations with this board. But my average power consumption is less than 1A, when I fully load the disk, I have ~ 1.5A so I think I am in limit.

Link to comment
Share on other sites

 

Ok, thanks, LEDs are only design question, they can wait  :) I did last test: kernel upgrade 3->4 on SD card. After upgade service hostapd fails with some errors and after second reboot R1 changed to "Micro" on boot screen ...?? :-)

I have not enough technical knowledge to solve this,

I know about power limitations with this board. But my average power consumption is less than 1A, when I fully load the disk, I have ~ 1.5A so I think I am in limit.

 

You need to change wifi module to brcmfmac and you need to use different hostapd binary and configuration. More info:

https://github.com/igorpecovnik/lib/blob/next/documentation/general-faq.md#how-to-setup-wireless-access-point

Link to comment
Share on other sites

I have 3000mA power supply, it should be enough.

 

You can have 20A PSU  :P but still it wont be enough. It's a design fail. Micro USB allows cca. 1.8A @5V and this is a bit tight. I only need to plug in my HDMI2VGA converter and HD doesn't spin, USB devices sometimes fail, ... 

Maybe I should pin this topic ;)

http://forum.armbian.com/index.php/topic/15-lamobo-r-1-sata-power/?p=168

Link to comment
Share on other sites

I have 3000mA power supply, it should be enough.

 

As Igor already pointed out: If you feed the R1 via the standard power-in Micro USB then you won't be able to inject more than 5V/1.8A since this crappy connector isn't made for more (too tiny contacts). The original manufacturer lists 5V/2.7A as minimum requirements but when using an Micro-USB connector this is simply a bad joke.

 

An alternative is to use the battery connector. When you're using Kernel 3.4 then it is highly recommended to have a look what's happening in reality (an external power meter tells you a different story than the AXP209 PMU might tell you that reports what's really available to and used by the board):

 

You can query the PMU using I2C/sysfs. When using the Micro-USB-power-in connector (and kernel 3.4) you get both amperage currently used as well as voltage available to the R1 by querying these:

/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/current_now
/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/voltage_now

If you're using the battery connector you can have a look below

/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/battery/

Unfortunately when you power the board using the Battery connector only the current used by the board can be read out but not voltage:

awk '{printf ("%0.2f",$1/1000000); }' </devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/battery/current_now

will print out the amperage used in A. 'voltage_now' is in this special mode without meaning: I get 134000 when querying

/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/battery/voltage_now

but just confirmed it's 5.1V present at the battery connector using a multimeter.

Link to comment
Share on other sites

As Igor already pointed out: If you feed the R1 via the standard power-in Micro USB then you won't be able to inject more than 5V/1.8A since this crappy connector isn't made for more (too tiny contacts). The original manufacturer lists 5V/2.7A as minimum requirements but when using an Micro-USB connector this is simply a bad joke.

 

An alternative is to use the battery connector. When you're using Kernel 3.4 then it is highly recommended to have a look what's happening in reality (an external power meter tells you a different story than the AXP209 PMU might tell you that reports what's really available to and used by the board):

 

You can query the PMU using I2C/sysfs. When using the Micro-USB-power-in connector (and kernel 3.4) you get both amperage currently used as well as voltage available to the R1 by querying these:

/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/current_now
/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/voltage_now

If you're using the battery connector you can have a look below

/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/battery/

Unfortunately when you power the board using the Battery connector only the current used by the board can be read out but not voltage:

awk '{printf ("%0.2f",$1/1000000); }' </devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/battery/current_now

will print out the amperage used in A. 'voltage_now' is in this special mode without meaning: I get 134000 when querying

/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/battery/voltage_now

but just confirmed it's 5.1V present at the battery connector using a multimeter.

Thank you for the explanation. Everytihg is clear now. I will connect secondary power. 

Link to comment
Share on other sites

Thank you for the explanation. Everytihg is clear now. I will connect secondary power. 

Don't know if I understand you correctly since the AXP209 PMU can be fed through 3 different sources: pwr-in (unfortunately using a crappy Micro-USB connector on R1), USB-OTG (unfortunately using a crappy Micro-USB connector on R1) and Li-Po battery connector (using a JST XH 2.5mm header on the R1 and not the smaller and more common JST PHR-2 header normally used for connecting Li-Po batteries)

 

You can do some experimentation with different power sources available in parallel and see how the AXP209 PMU behaves. But I would rely on a single power source. And that means either soldering and still using pwr-in (see two examples in this thread) or relying on the Li-Po connector (only downside: you have to press the power button to boot the board)

Link to comment
Share on other sites

Don't know if I understand you correctly since the AXP209 PMU can be fed through 3 different sources: pwr-in (unfortunately using a crappy Micro-USB connector on R1), USB-OTG (unfortunately using a crappy Micro-USB connector on R1) and Li-Po battery connector (using a JST XH 2.5mm header on the R1 and not the smaller and more common JST PHR-2 header normally used for connecting Li-Po batteries)

 

You can do some experimentation with different power sources available in parallel and see how the AXP209 PMU behaves. But I would rely on a single power source. And that means either soldering and still using pwr-in (see two examples in this thread) or relying on the Li-Po connector (only downside: you have to press the power button to boot the board)

At first, I want to connect secondary power to LiPo connector and do some experiments. But all connectors which I have are too long to fit to space between HD and onboard connector .... So first I have to buy right connector :)

Link to comment
Share on other sites

It's a 'JST XH 0.1"/2.5mm' connector, just uploaded a picture of my R1 powered this way to http://linux-sunxi.org/Lamobo_R1 

 

Some final words. I have R1 powered by two power supplies, microUSB current is 329mA and battery connector 658mA. SATA disk works with new kernel now.

But I am still unhappy with wifi. When I use wifi only for my laptop and printer, everything works fine. But when I enable wifi to my neighbours, they are walking around with phones, tablets etc., wifi starts to be very, very slow, unusable. Everything works fine with external wifi from TP-LINK (WN722N), but the onboard wifi has this issue.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines