Firefly Open Source Community

Title: New to the forum [Print This Page]

Author: biomecanoid    Time: 7/6/2015 08:27
Title: New to the forum

Hello guys,

I like your site i see that you try and develop new things around android.
I am sad to say that i didn't know the firefly platform earlier and now i am stuck now with another RK3288 platform.

My question to you now is if you are willing to try and help me tweak android even though i run on a different device .

My only problem is the very slow LAN and WiFi which is on a 10mbps level with trasfer so low as 1MB/s

I understand that i must edit my resource file and modify the tx / rx delay.

Can you be so kind and to help me out with the procedure to modify and flash the new resource file on my android ?

Thanks a lot
Author: return0    Time: 7/6/2015 09:55
Hi, it would be helpful to know what board you're working on - even if the SoC is exactly the same (RK3288) there might be substantial differences between the Firefly hardware and yours.

Is the LAN interface pre-built on the board you have or you added it (e.g. USB-LAN)? Have you tried asking the manufacturer directly?

Hard to say how to solve your problem without more details however, the flashing procedure should be very similar to the Firefly given that the RK3288 uses the same tools across multiple boards.

http://wiki.t-firefly.com/index.php/Firefly-RK3288/Flash_image/en
Author: biomecanoid    Time: 7/6/2015 18:11

Thanks for your quick reply,

I can provide you with all the details you need.

i have this box :

http://www.ebay.com/itm/11156699 ... =STRK%3AMEBIDX%3AIT
http://www.aliexpress.com/item/B ... -2K/2021695712.html

eBluetimes Qpro

Here you can even see the PCB inside the casing :

http://freaktab.com/forum/tv-pla ... RK3288-boxes/page1=

The LAN interface is pre-built on the board, I have asked the manufacturer and they only direct me to new firmware images that don't solve the problem.

Also the newer images suggested by the manufacturer have the SPDIF pass-thru broken so i am stuck to an older version where  the sound works properly.

My Firmware is this one:

2015.2.7 QproPlus New software.zip
https://www.sendspace.com/file/mrv2vb

According to what i have found online i should extract the img file find a resource file and a .dts file and change the rx / tx delay there.
but so far i am unable to extract the img file and locate the file that i need to amend.

https://bitbucket.org/T-Firefly/ ... 09b6e49325613e137ed

If with you help i manage to perform the changes can i just flash the the files i change or i should flash the whole box and lose all the data on it  (XBMC Games etc ) ?

The Flashing procedure is exactly as you describe it on your link:
http://wiki.t-firefly.com/index.php/Firefly-RK3288/Flash_image/en

That's what i used to test newer images, but now i need something more, i need to edit the firmware i know its working properly on my box and apply the TCP/IP  rx / tx fix

I would really appreciate all the help you can give me, slow LAN and WiFi is the only downside on my android box and if you help me fix that i would be more than happy.

Best Regards
Author: return0    Time: 7/6/2015 20:20
Hi, do you have the resource.img file? If yes could you post it here?

The patch you pointed to (https://bitbucket.org/T-Firefly/ ... 09b6e49325613e137ed) is part of the kernel device-tree: this basically tells the kernel what kind of hardware you have on the board and a lot more parameters/configurations regarding the SoC (RK3288) itself.

The resource.img file does contain the DT but simply editing that file might/might not work - worst case you'd have to re-compile your kernel so my second question is, do you have the kernel sources for your board?

It should come together with the SDK provided by the manufacturer - probably that zip archive contains everything you need. Is there a /kernel directory in there?

Check out this answer for details on how to unpack your resource.img -> http://bbs.t-firefly.com/forum.p ... &highlight=boot
Author: biomecanoid    Time: 7/6/2015 20:50

The file on sendspace if you unzip it has the drivers for the PC, the flashing tool, instructions and the image file: BluetimesQpro-plus-rk3288-_AP6330_public_20150207.img

I don't know how to extract img file to get to the files inside and sadly i don't have the kernel sources

Maybe you can download my firmware from sendspace and have a look ?

Author: biomecanoid    Time: 7/7/2015 16:23

Any hints on how i can continue will be highly appreciated
Author: return0    Time: 7/8/2015 10:17
biomecanoid Posted at 7/7/2015 16:23
Any hints on how i can continue will be highly appreciated

The file BluetimesQpro-plus-rk3288-_AP6330_public_20150207.img is probably a firmware update for your hardware which contains all the images such as resource.img, system.img etc.

You need to extract that .img file to find out what's in there exactly - you can refer to this wiki page: http://wiki.t-firefly.com/index. ... android_firmware/en

Once you have your resource.img image to work on, you should be able to modify the device tree as you wish.
Author: biomecanoid    Time: 7/8/2015 17:22
Hi,

Thanks for the instructions. The wiki was easy enough to follow

here is my resource.img:

http://wikisend.com/download/207998/resource.img
http://www.filedropper.com/resource_1
http://s000.tinyupload.com/index.php?file_id=41678291015919859085

So whats the next step how do i edit the resource file ?

I get the following error:

sudo mount -o loop resource.img /mnt/resource

NTFS signature is missing.
Failed to mount '/dev/loop0': Invalid argument
The device '/dev/loop0' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
root@HP-ProBook-4320s:/home/support/img/update/Image#


fdisk says the image is not valid

fdisk -l resource.img[

Disk resource.img: 0 MB, 116736 bytes
255 heads, 63 sectors/track, 0 cylinders, total 228 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk resource.img doesn't contain a valid partition table

Also can not unpack boot.img

afptool -unpack boot.img boot
Invalid header magic
UnPack failed

Best Regards
Author: biomecanoid    Time: 7/8/2015 17:58

I was able to extract resource.img with ResTool.exe

Here is the file:

http://wikisend.com/download/794552/rk-kernel.dtb

How do i edit that now ?

Author: biomecanoid    Time: 7/8/2015 19:12
Last edited by biomecanoid In 7/8/2015 19:43 Editor

I decompiled the dtb file to dts

http://wikisend.com/download/520154/devicetree.dts.txt


the rx - tx delay is as follows:

tx_delay = <0x30>;
rx_delay = <0x20>;

What should i change the values to ?
should i just change the rx_delay to 10 ?

can i also add a mac address under tx - rx delay like this ? :
mac-address = [3e0c7948d74e];    #Mac address is 3e:0c:79:48:d7:4e

Author: return0    Time: 7/8/2015 20:12
biomecanoid Posted at 7/8/2015 19:12
I decompiled the dtb file to dts

http://wikisend.com/download/520154/devicetree.dts.txt

Hi, great you may try to change the rx_delay to 0x10 leaving the tx_delay as it is - see this patch: http://lists.infradead.org/piper ... January/002282.html

Regarding the MAC address I am not entirely sure your syntax will work - I do it like this:

  1. mac-address = [ 00 e0 ee 02 05 2e ];
Copy the code


Likely white spaces won't matter really, but up to you!

I do suggest that you first try to solve your LAN speed issues, then work on the MAC ADDR at a second stage once the rest of the problems are gone - just my 2 cents!
Author: biomecanoid    Time: 7/8/2015 20:35
Last edited by biomecanoid In 7/8/2015 20:53 Editor

Hi,

OK you have been right so far so i will trust you.

I will edit the file and then repack it

Now can i just flash/update ONLY the resource.img on my box without leaving everything else on my box untouched
( i have lots of program and games so it will be quite a feat to install everything again )

Since i want to try and be prepared for the worse case scenario, what will i do if i update the resource.img on my box and then it doesn't work/boot properly ?  i just flash the original resource.img ?

What would be the an acceptable speed to get from the Ethernet of the RK3288 box ?
I believe if i am reading this right that in this link:

https://bitbucket.org/T-Firefly/ ... 09b6e49325613e137ed

it says the opposite remove the 10 and replace it with a 20


Thanks

Author: return0    Time: 7/9/2015 07:23
Last edited by return0 In 7/9/2015 07:42 Editor
biomecanoid Posted at 7/8/2015 20:35
Hi,

OK you have been right so far so i will trust you.

Hi, yes you can flash only the resource.img file using the Rockchip tools - keep a backup of the original file, which as you figured will be handy in case something goes wrong (simply re-flash it).

The userdata partition is not erased unless you do it manually so your data will remain safe!

Your DTS already matches the patch you want to apply:

  1.         eth@ff290000 {
  2.                 compatible = "rockchip,rk3288-gmac";
  3.                 reg = <0xff290000 0x10000>;
  4.                 interrupts = <0x0 0x1b 0x4>;
  5.                 interrupt-names = "macirq";
  6.                 clocks = <0x67 0x79 0x0 0x79 0x1 0x79 0x2 0x79 0x3 0x7b 0x0 0x7b 0x1>;
  7.                 clock-names = "clk_mac", "mac_clk_rx", "mac_clk_tx", "clk_mac_ref", "clk_mac_refout", "aclk_mac", "pclk_mac";
  8.                 phy-mode = "rgmii";
  9.                 pinctrl-names = "default";
  10.                 pinctrl-0 = <0xe6 0xe7 0xe8 0xe9>;
  11.                 reset-gpio = <0x5 0x8 0x1>;
  12.                 clock_in_out = "input";
  13.                 tx_delay = <0x30>;
  14.                 rx_delay = <0x20>;
  15.         };
Copy the code


So if that's the fix (https://bitbucket.org/T-Firefly/ ... 09b6e49325613e137ed) then you actually don't need to do anything.

Can I ask how you came to the conclusion that your ethernet is slow? Are you 100% confident that it's not a problem in your LAN?

You mentioned:

My only problem is the very slow LAN and WiFi which is on a 10mbps level with trasfer so low as 1MB/s

LAN and WiFi are two completely differnet things in terms of hardware architecture - I struggle to believe that both have exactly the same issue unless the problem is within your network or the OS.

Also for the record, 1MB/s (megabyte, not megabit in this case) is actually not a bad speed at all if you're talking about a download from the Internet.

As you can see, WiFi has its own individual DTS node which would not be affected by whatever you change in the ethernet node:

  1.         wireless-wlan {
  2.                 compatible = "wlan-platdata";
  3.                 wifi_chip_type = "bcmwifi";
  4.                 sdio_vref = <0x708>;
  5.                 power_pmu_regulator = "act_ldo3";
  6.                 power_pmu_enable_level = <0x1>;
  7.                 vref_pmu_regulator = "act_ldo3";
  8.                 vref_pmu_enable_level = <0x1>;
  9.                 WIFI,poweren_gpio = <0x5 0x1c 0x0>;
  10.                 WIFI,host_wake_irq = <0x5 0x1e 0x0>;
  11.                 status = "okay";
  12.         };
Copy the code

What is the WiFi connection speed that you see when connected to your usual access point? What about ethernet?


Author: biomecanoid    Time: 7/9/2015 15:38

Also for the record, 1MB/s (megabyte, not megabit in this case) is actually not a bad speed at all if you're talking about a download from the Internet.

* This is Lan traffic off my NAS other computers have around 10-12 MB/s
From what i have seen the problem is in the negotiation, when i leave the bluetimes and my switch in the default settings everything is slow ( Tested several switches too ), when i force the ethernet port that the Bluetimes is connected to negotiate only @ 100mbps the speed jumps from 1MB/s to 7 MB/s.  So i am running this fix for  now

An old Acer Aspire one laptop works faster on the same cable the bluetimes is connected.

What is the WiFi connection speed that you see when connected to your usual access point? What about ethernet?

If i remember correctly the mikrotik access point states speeds of 65mbps but the actually speed on the WiFi coping a file from the NAS is 1MB/s

So if that's the fix (https://bitbucket.org/T-Firefly/ ... 09b6e49325613e137ed) then you actually don't need to do anything.



* How can we be sure what the fix is ?

Can I ask how you came to the conclusion that your ethernet is slow? Are you 100% confident that it's not a problem in your LAN?


*  The movies that stutter in the Bluetimes over wired ethernet play fine on my Smart TV over WiFi but the TV doesn't play back all the formats doesn't reproduce some movies with 5.1 surround audio, saying "File is unsupported", but what ever video is supported plays perfectly far better than in android.




Sadly yesterday i uploaded some new movies on my NAS and tried to update the XBMC library on the Bluetimes and it refused to connect to the internet, after trying several times it turned off never to turn on again, it blew its PSU ( 5v 3A ). So now i need a new psu and i hope the media player is not effected.


I suspect that the load on the PSU was too highy since i had a mouse, gamepad and 2.5 HD connected on the USB ports.





Author: biomecanoid    Time: 7/9/2015 22:37

I am thinking of buying this PSU for my android:

http://www.meanwell.com/mw_search/sd-25/sd-25-spec.pdf

SD-25A-5      5v  -  5A

What do you think ? i believe its future proof too, it will be compatible with any future android right ? all android boxes run on 5v correct ?


Author: biomecanoid    Time: 7/14/2015 20:04
??
Author: linnhhanu    Time: 7/2/2016 10:54
head soccer 2  is second generation two player game ofhead soccer    games serie! Funny sports heads soccer games are here for kids entertainment  head soccer unblocked and  soccer heads or  big head basketball  or big head soccer , big head football . Big Head Soccer championship is well known online soccer game , you can play big head basketball or Head Soccer also     Big Head Football  . Good  news for football games lovers! Another legendary football game which name is Big Head Football  with many interesting games   head soccer   and Big head soccer or big head basketball . Now choose big head basketball    . You can play free  head soccer   and Big head soccer . Big Head Football  is also good chose!





Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1