OpenWrt Forum Archive

Topic: Hi-Link wireless module HLK-RM04

The content of this topic has been archived between 31 Dec 2017 and 26 Apr 2018. Unfortunately there are posts – most likely complete pages – missing.

Sprite_tm wrote:

It was perfectly stable for me, but I've stripped OpenWRT down to what I really need, which isn't much... no LuCI, no uhttpd, no USB stuff, ..., everything to make it as light as possible. It unfortunately is 'stable' in a completely different way now because of a loose 12V cable which made some unfortunate connection, but I've got two new ones on their way.

Could you please share your firmware with us, I would really like to test your stripped down version. Thanks!

To those, who have replaced the sdram:

I managed to desolder 8 K4S560432A with desolder wick and fluxx from a DIMM-module without any problems. 

When I tried to desolder the sdram module from the HLK-RM04 chip, some pads from the pcb where disconnected.

It seems, that the pcb-quality from the (compaq) memory module as organ donor is much better, than the hlk-pcb.

How you removed the existing module?

I have a hot air station.  That will a good amount of flux get's the part to practically fall off after 30 seconds on both boards.

With the memory upgrade to 32 MB, I've had one of my boards up 16 days now without any issues (no memory leak or crashing).  Mind you , it's only monitoring a GPIO pin and emailing out notices.  I've removed all the USB stuff from my build to free up space.

No other solution, than a hot-air station?

gnag: You may have success by using a paint stripper gun as a cheapo replacement for an hot-air station. Watch out not to burn any other things, though.

valentt: I can see if I can share the .config somewhere so you can build your own image with my package selection, if you want? I'm not gonna share the firmware as is, there's a few daemons inthere meant for my own use, plus the kernel is non-standard.

Sprite_tm wrote:

gnag: You may have success by using a paint stripper gun as a cheapo replacement for an hot-air station. Watch out not to burn any other things, though.

valentt: I can see if I can share the .config somewhere so you can build your own image with my package selection, if you want? I'm not gonna share the firmware as is, there's a few daemons inthere meant for my own use, plus the kernel is non-standard.

.config file is just fine, I understand if you have some custom daemons for your own use, but can you explain that do you mean by "kernel is non-standard", do you have some custom patches?

(Last edited by valentt on 5 Dec 2013, 12:03)

I am very new to this. (and also to OpenWRT - but I have solid linux know how)

I have a HLK-RM04 with a ethernet devkit. (unmodified so wrong mem resistors)

I downloaded the openwert trunk + hlk patches and compiled with 16M memory commandline and target ramdisk.

I have now a "openwrt-ramips-rt305x-hlk-rm04-initramfs-factory.bin" file.

1) Did I understand correctly that I can flash this file directly from original webGUI?

2) I think it would be a good idea to install "uboot128.img" prior to that over the debug webGUI Upgrade page, just to be sure ... good idea??

3) Can I flash this file also directly via the original WebGUI?
https://github.com/JiapengLi/OpenWrt-Hi … r38025.bin

4) Can I add USB master simply by soldering a USB socket to the ethernet dev board?

Maybe somebody could answer/confirm my 4 questions.
Thanx in advance!

Hi, does anybody know type of the voltage regulators LDO1 and LDO2 (they both have marking AD3MA).
And yet another question - what is the correct command for booting kernel via tftp?

tftpboot tftpboot 0x80100000 uImage.bin
RT5350 # bootm 0x80100000
## Booting image at 80100000 ...
   Image Name:   HLK-RM02
   Created:      2014-01-14  13:54:45 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    965241 Bytes = 942.6 kB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover

I suspect that the load address in RAM is incorrect, possibly is overlapping with uncompressed image.
0x8A100000 from default uboot environment is not writable at all.

(Last edited by dimonix on 14 Jan 2014, 16:02)

gaplee wrote:

...
The dts file (the patch) is on my github https://github.com/JiapengLi/OpenWrt-HiLink-HLK-RM04.
This patch is maintained for sometime. But unfortunately, there are still several problems need to be fixed.
1. Enable uartfull.
There are two UARTs of HLK-RM04, it is its advantage. Most RT5350 routers use only one uart(the uartlite) to supply the serial console, the other UART(the uartfull) is used as GPIOs, in this station uartlite is register as /dev/ttyS0, and the /dev/ttyS0 is the serial console. But after enable uartfull, the uartlite is register as /dev/ttyS1, and uartfull is /dev/ttyS1, in this station uartfull is used as the Serial Console, which we hope uartlite can be.
I solved this by changing the order of uartlite node and uartfull node, it seems that the node in the first position first registered.
This is a dirty way.

I am fighting to enable uartf in lite mode and assign rest of the pins to gpio with no success. Some variants of HLKRM04.dts follow:
1)

        pinctrl {
                state_default: pinctrl0 {
                        gpio {
                                ralink,group = "jtag";
                                ralink,function = "gpio";
                        };
                };
                uartf_pins: uartf {
                        uartf {
                                ralink,group = "uartf";
                                ralink,function = "uartf gpio";
                        };
                };
        };

gives an error at boot time

pinmux core: rt2880-pinmux does not support function uartf gpio
...
rt2880-pinmux pinctrl.1: pin 14 is not set to gpio mux
rt2880-pinmux pinctrl.1: request() failed for pin 14
rt2880-pinmux pinctrl.1: pin-14 (pio:14) status -22

2)

        pinctrl {
                state_default: pinctrl0 {
                        gpio {
                                ralink,group = "jtag";
                                ralink,function = "gpio";
                        };
                };
                uartf_pins: uartf {
                        uartf {
                                ralink,group = "uartf";
                                ralink,function = "gpio uartf";
                        };
                };
        };

gives an error at boot time (there is no pinmux core error anymore!), but

rt2880-pinmux pinctrl.1: pin 14 is not set to gpio mux
rt2880-pinmux pinctrl.1: request() failed for pin 14
rt2880-pinmux pinctrl.1: pin-14 (pio:14) status -22

3)

        pinctrl {
                state_default: pinctrl0 {
                        gpio {
                                ralink,group = "jtag";
                                ralink,function = "gpio";
                        };
                };
                uartf_pins: uartf {
                        uartf {
                                ralink,group = "uartf";
                                ralink,function = "gpio";
                        };
                };
        };

gives no errors, but assigns ALL uartf pins to gpio 7-14.
Does anybody have any clue?

(Last edited by dimonix on 15 Jan 2014, 18:45)

lurbi wrote:

I have now a "openwrt-ramips-rt305x-hlk-rm04-initramfs-factory.bin" file.

1) Did I understand correctly that I can flash this file directly from original webGUI?

Nope ... bricked (I bought a spare RM04 module which I am using now;))
Maybe I should have used  "openwrt-ramips-rt305x-hlk-rm04-initramfs-uImage.bin"

I have installed the modified UBoot previously.

So I hope that I can recover it.
Can I flash "openwrt-ramips-rt305x-mpr-a2-squashfs-sysupgrade.bin" from UBoot? And how?

But first I need to check why I get no output on TTYS0.
There are pads for TTYS0 on the Ethernet kit board.
But when I connect this with 57600 8N1 I seem to get no output from UBoot.
I will try it again ... I guess I am doing something wrong ;)

I have been using this USB <-> serial adapter:
http://dx.com/p/usb-to-uart-5-pin-cp210 … rter-81872

Hi All.

I have a few questions about building openwrt for the RM04 from the latest trunk.

Is there anything special to get the -factory image compiled?. I've tried a few times, with only ramdisk or ramdisk and squashfs checked but it doesn't produce any image with *factory* in the name. I do get an image with initramfs-Uimage in the name. Has this image been updated to use this name? (I tried to flash that through the web UI and it failed).

Also with flashing via webUI, does that update uboot?. Or is the only way with the uimage128.bin file?.

Does uboot output on the serial during startup?. At what settings?. I aim to have a device attached there so I guess im concerned if it outputs boot info and the device wigs out.


My aim for one of these would be to compile a C program that i could run using the serial port on the breakout board, so I can transmit it via a different protocol elsewhere. I'm tempted to use the RM04 as is, and accessing it from a different server to do the translation, but it would be another device in the chain, and seems less cool and hacky then running a small OS to do the job smile.

dimonix wrote:

I am fighting to enable uartf in lite mode and assign rest of the pins to gpio with no success.

I answer myself: uartf+gpio works fine in mixed configuration "gpio uarft" since revision 39610.

mr fix it wrote:

Hi All.

I have a few questions about building openwrt for the RM04 from the latest trunk.

Is there anything special to get the -factory image compiled?. I've tried a few times, with only ramdisk or ramdisk and squashfs checked but it doesn't produce any image with *factory* in the name. I do get an image with initramfs-Uimage in the name. Has this image been updated to use this name? (I tried to flash that through the web UI and it failed).

Also with flashing via webUI, does that update uboot?. Or is the only way with the uimage128.bin file?.

Does uboot output on the serial during startup?. At what settings?. I aim to have a device attached there so I guess im concerned if it outputs boot info and the device wigs out.


My aim for one of these would be to compile a C program that i could run using the serial port on the breakout board, so I can transmit it via a different protocol elsewhere. I'm tempted to use the RM04 as is, and accessing it from a different server to do the translation, but it would be another device in the chain, and seems less cool and hacky then running a small OS to do the job smile.

Right, so after examining the github repo with the initial supports patches, I've noticed trunk comments out the lines that builds the factory image. So I uncommented them and successfully built it smile Yay. Upload worked.

Unfortunately for me, these images don't seem to work in 16MB of ram?. At least the latest trunk.

Watching via serial it starts running out of memory and dying hard.

Ocassionally I can get a working console.

 PID USER       VSZ STAT COMMAND
    1 root      1348 S    /sbin/procd
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [ksoftirqd/0]
    5 root         0 SW<  [kworker/0:0H]
    6 root         0 SW   [kworker/u2:0]
    7 root         0 SW<  [khelper]
    8 root         0 SW   [kworker/u2:1]
   64 root         0 SW<  [writeback]
   66 root         0 SW<  [bioset]
   68 root         0 SW<  [kblockd]
   91 root         0 SW   [kworker/0:1]
   97 root         0 SW   [kswapd0]
  142 root         0 SW   [fsnotify_mark]
  169 root         0 SW   [spi32766]
  205 root         0 SW<  [deferwq]
  215 root         0 SW   [khubd]
  493 root         0 SW<  [cfg80211]
  494 root         0 SW   [kworker/0:2]
 1797 root      1476 S    /bin/ash --login
 1811 root      1476 R    ps

meminfo gives

 cat /proc/meminfo
MemTotal:          13332 kB
MemFree:            1220 kB
Buffers:               0 kB
Cached:             7024 kB
SwapCached:            0 kB
Active:              492 kB
Inactive:              8 kB
Active(anon):        492 kB
Inactive(anon):        8 kB
Active(file):          0 kB
Inactive(file):        0 kB
Unevictable:        7004 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:           496 kB
Mapped:              684 kB
Shmem:                20 kB
Slab:               2212 kB
SReclaimable:        600 kB
SUnreclaim:         1612 kB
KernelStack:         184 kB
PageTables:           68 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:        6664 kB
Committed_AS:       1400 kB
VmallocTotal:    1048372 kB
VmallocUsed:         336 kB
VmallocChunk:    1044560 kB

So fun times. I'm not great at reading memory stuff here, and i've noticed I can't actually persist any changes at all. (such as manually disabling some services and then rebooting). /overlay is always empty, and /rom contains a file called note, which I'm thinking is incorrect.

My assumption as this point is that its failing on initial boot, because of lack of ram. So then everything is now sitting on some ramdisk(?) which is ironic as I can't appear to umount the /tmp directory in an effort to reclaim room. Either that or the kernel requires 10mb?, though slab is roughly 2mb?

Icing on the cake is that I used the factory image because I didn't want to change uboot, so I'm not sure if I can tftp boot from that, and without ram I can't transfer a new image across. Insult to injury is open wrt locks down writing to mtd0. So I can't even write a version of uboot that will let me tftp!. Arg!

Well thats a learning experience for me. Which makes me feel derpy. The -factory image is generated from the ramdisk selection. So in hindsight its obvious that this attempts to run openwrt entirely in ram. I had to put the squashfs image on to make it work! haha.

Now to do this from my hosed install, I saw that someone at the beginning forced the inbuilt uboot to look for tftp servers by holding down the WPS button. This works!

From my tests roughly 10 seconds then release (longer wont work). It will look for 10.10.10.3 for tim_uImage file. So i renamed the squashfs image to this, it grabbed it and flashed it!.

I actually have a working openwrt image on the board. Still using the factory uboot.

If a nooby stumbles upon this.

1) Build from trunk (I did put the kernel memory config line in)
2) On startup hold WPS for 10 seconds (I ran wireshark so I could see the tftp request fire)
3) serve the tim_uImage *file* (compiled squash fs bin file).

Openwrt will fire up smile

>Openwrt will fire up

Nice find.  For completeness, 90 posts in, which kernel memory config line?

(Last edited by lizby on 22 Feb 2014, 14:39)

lizby wrote:

>Openwrt will fire up

Nice find.  For completeness, 90 posts in, which kernel memory config line?

On the wiki page and from here it talks about the memory resistors being incorrect.

I've been changing the kernel string to

rootfstype=squashfs,jffs2 mem=16M

out of paranoia.

I'm pretty sure this is unnecessary. (I should test and confirm this). I think the build process takes this into account, or my board (which I only purchased last week), may be a newer batch with this fixed? (though I doubt this).

Currently I'm actually trying to figure out if the kernel string is even honoured. I've been trying to point the kernels default console to /dev/ttyS0 instead of S1, but it appears to always come up on S1, regardless of what the kernel string says (or its ignoring my string cause i've borked it somehow).

Also just to add. I'm not sure how feasible it is to use openwrt on these. Yesterday when I tried to turn on wifi (just via ifconfig wlan0 up), I had a really bad time. It went from super responsive to quite laggy. Eventually I think it hung.. then restarted.. then came up without wifi. Then was usable

I'm a tad worried that I had usable system without wifi, horrible system with wifi. Without wifi I think I would be better off with a raspberry pi sad

mr fix it wrote:

Also just to add. I'm not sure how feasible it is to use openwrt on these. Yesterday when I tried to turn on wifi (just via ifconfig wlan0 up), I had a really bad time. It went from super responsive to quite laggy. Eventually I think it hung.. then restarted.. then came up without wifi. Then was usable

I'm a tad worried that I had usable system without wifi, horrible system with wifi. Without wifi I think I would be better off with a raspberry pi sad

Yea, 16MB isn't really enough to run these boards under OpenWRT.  If you get an opportunity to upgrade them to 32M, it's a world of difference.

I have bought this module and I am unable to use it the way I am thinking.
I want this module to receive the commands using Wi-Fi and then convert it to serial. The commands are sent through LABVIEW software using TCP communication protocol. Whether I have to write a program for this module or its starts receiving data as I send through the Labview appliation. How the communication is going to start? In which mode I have to use RM-04? What commands I have to send so that i start communication?

How to dump the rom content
(And recover the old firmware...)

Some part will change based on the revision of the firmware.

Update uboot here with the version that allow to burn a firmware at boot time.
http://192.168.16.254/adm/hlk_update_ww … ch_com.asp

Enable telnet access using the hack provided in the forums.

# On your device
# Make some space, mount a ram device on the web server, dump mtd0
killall -9 syslogd; killall -9 udhcpd; killall -9 klogd; killall -9 getty; killall -9 udhcpc;
killall -9 wscd; killall -9 ser2net;
killall -9 nvram_daemon; killall -9 dnsmasq;
mount -t ramfs -o size=4G ramfs /etc_ro/web/graphics
cat /dev/mtd0 > /etc_ro/web/graphics/mtd0.jpg

# Locally, on your linux / windows.
wget --user=admin --password='admin' http://192.168.16.254/graphics/mtd0.jpg
mv mtd0.jpg mtd0
The idea is to download the file you have just created.

And you are done. You have a backup of the original firmware.
You can do the same with mtd1, mtd2, etc..

mtd0: 00400000 00010000 "ALL"
mtd1: 00030000 00010000 "Bootloader"
mtd2: 00010000 00010000 "Config"
mtd3: 00010000 00010000 "Factory"
mtd4: 000c1295 00010000 "Kernel"
mtd5: 002eed6b 00010000 "RootFS"
mtd6: 003b0000 00010000 "Kernel_RootFS"

When you start uBoot, upgrade the firmware using tftp. Use this firmware to go back to a stock HiLink.

can someone help me out, while using the RM-04 Kit

I've successfully installed OpenWrt on this device with webif interface (luci is too big). It is stable. I will create C application for my idea (monitoring security system). This device works stable now without out of memory errors although it can be slow in some cases (specially when I save configuration) but this is not a case since it is not main functionality for this device to save configuration.

deeper information:

root@OpenWrt:~# free
             total         used         free       shared      buffers
Mem:         13332        12076         1256            0          420
-/+ buffers:              11656         1676
Swap:            0            0            0

Running apps:

root@OpenWrt:~# ps
  PID USER       VSZ STAT COMMAND
    1 root      1372 S    /sbin/procd
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [ksoftirqd/0]
    4 root         0 SW   [kworker/0:0]
    5 root         0 SW<  [kworker/0:0H]
    6 root         0 RW   [kworker/u2:0]
    7 root         0 SW<  [khelper]
   64 root         0 SW<  [writeback]
   66 root         0 SW<  [bioset]
   68 root         0 SW<  [kblockd]
   97 root         0 SW   [kswapd0]
  142 root         0 SW   [fsnotify_mark]
  168 root         0 SW   [spi32766]
  208 root         0 SW<  [deferwq]
  218 root         0 SW   [khubd]
  283 root         0 SWN  [jffs2_gcd_mtd5]
  329 root       880 S <  ubusd
  330 root       768 S    /sbin/askfirst ttyS0 /bin/ash --login
  401 root         0 SW<  [cfg80211]
  402 root         0 SW   [kworker/0:2]
  426 root         0 SW   [kworker/u2:2]
  466 root      1492 S    /sbin/netifd
  519 root      1500 S    /usr/sbin/crond -f -c /etc/crontabs -l 5
  524 root      1496 S    udhcpc -p /var/run/udhcpc-eth0.2.pid -s /lib/netifd/dhcp.script -f -t 0 -i eth0.2 -C
  548 root      1156 S    /usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p 22
  603 root      1160 S    /usr/sbin/uhttpd -f -h /www -r OpenWrt -x /cgi-bin -t 60 -T 30 -k 20 -A 1 -n 3 -N 100 -R -p 0.0.0.0 80
  702 root         0 SW<  [kworker/0:1H]
  746 root      1496 S    /usr/sbin/ntpd -n -p 0.openwrt.pool.ntp.org -p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.ntp.org -p 3.openwrt.pool.ntp.org
  756 root      1584 S    wpa_supplicant -B -P /var/run/wifi-wlan0.pid -D nl80211 -i wlan0 -c /var/run/wpa_supplicant-wlan0.conf
  779 root      1500 S    udhcpc -p /var/run/udhcpc-wlan0.pid -s /lib/netifd/dhcp.script -f -t 0 -i wlan0 -C
 7634 root      1224 S    /usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p 22
 7671 root      1500 S    -ash
 8196 root      1492 R    ps

Space:

root@OpenWrt:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                    1344       796       548  59% /
/dev/root                 1536      1536         0 100% /rom
tmpfs                     6664        64      6600   1% /tmp
/dev/mtdblock5            1344       796       548  59% /overlay
overlayfs:/overlay        1344       796       548  59% /
tmpfs                      512         0       512   0% /dev

Installed packages:

root@OpenWrt:~# opkg list
base-files - 146-r38333
busybox - 1.19.4-7
dropbear - 2012.55-2
haserl - 0.9.29-1
ip6tables - 1.4.20-1
iptables - 1.4.20-1
iw - 3.10-1
jshn - 2013-08-01-04f194aa8a04926fe7f2e42bbf9ba6c62d49339e
kernel - 3.10.13-1-b3155ad37636146de93b9df35c3940c0
kmod-button-hotplug - 3.10.13-3
kmod-cfg80211 - 3.10.13+2013-06-27-1
kmod-crypto-aes - 3.10.13-1
kmod-crypto-arc4 - 3.10.13-1
kmod-crypto-core - 3.10.13-1
kmod-crypto-hash - 3.10.13-1
kmod-crypto-manager - 3.10.13-1
kmod-crypto-pcompress - 3.10.13-1
kmod-eeprom-93cx6 - 3.10.13-1
kmod-input-core - 3.10.13-1
kmod-input-gpio-keys-polled - 3.10.13-1
kmod-input-polldev - 3.10.13-1
kmod-ip6tables - 3.10.13-1
kmod-ipt-conntrack - 3.10.13-1
kmod-ipt-core - 3.10.13-1
kmod-ipv6 - 3.10.13-1
kmod-leds-gpio - 3.10.13-1
kmod-ledtrig-usbdev - 3.10.13-1
kmod-lib-crc-ccitt - 3.10.13-1
kmod-lib-crc-itu-t - 3.10.13-1
kmod-mac80211 - 3.10.13+2013-06-27-1
kmod-nls-base - 3.10.13-1
kmod-ppp - 3.10.13-1
kmod-pppoe - 3.10.13-1
kmod-pppox - 3.10.13-1
kmod-rt2800-lib - 3.10.13+2013-06-27-1
kmod-rt2800-pci - 3.10.13+2013-06-27-1
kmod-rt2x00-lib - 3.10.13+2013-06-27-1
kmod-rt2x00-mmio - 3.10.13+2013-06-27-1
kmod-rt2x00-soc - 3.10.13+2013-06-27-1
kmod-slhc - 3.10.13-1
kmod-usb-core - 3.10.13-1
kmod-usb-rt305x-dwc_otg - 3.10.13-1
libblobmsg-json - 2013-08-01-04f194aa8a04926fe7f2e42bbf9ba6c62d49339e
libc - 0.9.33.2-1
libgcc - 4.6-linaro-1
libip4tc - 1.4.20-1
libip6tc - 1.4.20-1
libjson-c - 0.11-2
libjson-script - 2013-08-01-04f194aa8a04926fe7f2e42bbf9ba6c62d49339e
libnl-tiny - 0.1-3
libubox - 2013-08-01-04f194aa8a04926fe7f2e42bbf9ba6c62d49339e
libubus - 2013-09-29-6ae17d0298a8f1c24f16a68c8d1884091fb5c39f
libuci - 2013-09-29.1-1
libxtables - 1.4.20-1
mtd - 20
netifd - 2013-10-03-5dd87fd8ad3a42c71d90a8fecc893af973e552bf
opkg - 618-5
procd - 2013-10-01-eba428f6672068d819d6296db3f635e6ac5a8be7-1
satel-int-klcd-rs232 - 1
swconfig - 10   
ubox - 2013-09-29-887256e92838ef94eeea8d7ba06ff078c7e05296
ubus - 2013-09-29-6ae17d0298a8f1c24f16a68c8d1884091fb5c39f
ubusd - 2013-09-29-6ae17d0298a8f1c24f16a68c8d1884091fb5c39f
uci - 2013-09-29.1-1
uhttpd - 2013-09-13-8eb20e0aad7412468975b2c9ce7e374ea3084e42
webif - 0.3-4986
wpa-supplicant-mini - 20130807-1
wpad-mini - 20130807-1

Hello.

Just build the software from the trunk following instructions on https://github.com/JiapengLi/OpenWrt-HiLink-HLK-RM04. I didn't change any of the steps (and apply a software 16MB kernel mod)

I have a problem with wi-fi and don't know how to toggle GPIO. I've tried to follow wiki on http://wiki.openwrt.org/doc/hardware/port.gpio but from the dir structure this wiki seams out of date.

root@OpenWrt:/# echo "29" > /sys/class/gpio/export
ash: write error: Device or resource busy
root@OpenWrt:/# echo "0" > /sys/class/gpio/export
ash: write error: Device or resource busy
root@OpenWrt:/# echo "1" > /sys/class/gpio/export
ash: write error: Device or resource busy
root@OpenWrt:/# echo "14" > /sys/class/gpio/export
ash: write error: Device or resource busy
root@OpenWrt:/# ls -la /sys/class/gpio/
export       gpiochip0/   gpiochip24/  gpiochip40/  unexport
root@OpenWrt:/# ls -la /sys/class/gpio/
export       gpiochip0/   gpiochip24/  gpiochip40/  unexport
root@OpenWrt:/# ls -la /sys/class/gpio/
drwxr-xr-x    2 root     root             0 Jan  1  1970 .
drwxr-xr-x   16 root     root             0 Jan  1  1970 ..
--w-------    1 root     root          4096 Apr 11 12:13 export
lrwxrwxrwx    1 root     root             0 Jan  1  1970 gpiochip0 -> ../../devices/virtual/gpio/gpiochip0
lrwxrwxrwx    1 root     root             0 Jan  1  1970 gpiochip24 -> ../../devices/virtual/gpio/gpiochip24
lrwxrwxrwx    1 root     root             0 Jan  1  1970 gpiochip40 -> ../../devices/virtual/gpio/gpiochip40
--w-------    1 root     root          4096 Jan  1  1970 unexport
root@OpenWrt:/# ls -la /sys/class/gpio/
export       gpiochip0/   gpiochip24/  gpiochip40/  unexport
root@OpenWrt:/# ls -la /sys/class/gpio/gpiochip
gpiochip0/   gpiochip24/  gpiochip40/
root@OpenWrt:/# ls -la /sys/class/gpio/gpiochip
gpiochip0/   gpiochip24/  gpiochip40/
root@OpenWrt:/# ls -la /sys/class/gpio/gpiochip
gpiochip0/   gpiochip24/  gpiochip40/
root@OpenWrt:/# ls -la /sys/class/gpio/gpiochip0/
base        label       ngpio       subsystem/  uevent
root@OpenWrt:/# ls -la /sys/class/gpio/gpiochip0/
drwxr-xr-x    2 root     root             0 Jan  1  1970 .
drwxr-xr-x    5 root     root             0 Jan  1  1970 ..
-r--r--r--    1 root     root          4096 Apr 11 11:55 base
-r--r--r--    1 root     root          4096 Apr 11 11:55 label
-r--r--r--    1 root     root          4096 Apr 11 11:55 ngpio
lrwxrwxrwx    1 root     root             0 Apr 11 11:55 subsystem -> ../../../../class/gpio
-rw-r--r--    1 root     root          4096 Jan  1  1970 uevent
root@OpenWrt:/tmp# dmesg
[    0.000000] Linux version 3.7.5 (lich@lich-pc) (gcc version 4.6.4 20121210 (prerelease) (Linaro GCC 4.6-2012.12) ) #1 Sat May 11 23:14:39 CST 2013
[    0.000000] prom: fw_arg0=00000003, fw_arg1=80f52fb0, fw_arg2=80f533e0, fw_arg3=00000000
[    0.000000] env=  (null) is not in RAM, skipping
[    0.000000] env=  (null) is not in RAM, skipping
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] Ralink RT5350 id:1 rev:3 running at 360.00 MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 01000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x00ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x00ffffff]
[    0.000000] On node 0 totalpages: 4096
[    0.000000] free_area_init_node: node 0, pgdat 80255c70, node_mem_map 802bb000
[    0.000000]   Normal zone: 32 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 4064 pages, LIFO batch:0
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
[    0.000000] Kernel command line:  board=HLK-RM04 console=ttyS1,57600 mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,896k(kernel),2880k(rootfs),3776k@0x50000(firmware) rootfstype=squashfs,jffs2 mem=16M
[    0.000000] PID hash table entries: 64 (order: -4, 256 bytes)
[    0.000000] Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] __ex_table already sorted, skipping sort
[    0.000000] Writing ErrCtl register=000432f0
[    0.000000] Readback ErrCtl register=000432f0
[    0.000000] Memory: 13388k/16384k available (1969k kernel code, 2996k reserved, 473k data, 180k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:48
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.010000] Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.100000] MIPS: machine is HILINK HLK-RM04
[    0.130000] bio: create slab <bio-0> at 0
[    0.140000] Switching to clocksource MIPS
[    0.150000] NET: Registered protocol family 2
[    0.160000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.180000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.190000] TCP: Hash tables configured (established 512 bind 512)
[    0.200000] TCP: reno registered
[    0.210000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.220000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.230000] NET: Registered protocol family 1
[    0.280000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.290000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.310000] msgmni has been set to 26
[    0.320000] io scheduler noop registered
[    0.330000] io scheduler deadline registered (default)
[    0.340000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.350000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[    0.370000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    0.390000] ramips-spi ramips-spi.0: master is unqueued, this is deprecated
[    0.400000] m25p80 spi0.0: found w25q32, expected pm25lq032
[    0.420000] m25p80 spi0.0: w25q32 (4096 Kbytes)
[    0.420000] 6 cmdlinepart partitions found on MTD device spi0.0
[    0.440000] Creating 6 MTD partitions on "spi0.0":
[    0.450000] 0x000000000000-0x000000030000 : "u-boot"
[    0.460000] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.470000] 0x000000040000-0x000000050000 : "factory"
[    0.490000] 0x000000050000-0x000000130000 : "kernel"
[    0.500000] 0x000000130000-0x000000400000 : "rootfs"
[    0.520000] mtd: partition "rootfs" set to be root filesystem
[    0.530000] mtd: partition "rootfs_data" created automatically, ofs=380000, len=80000
[    0.540000] 0x000000380000-0x000000400000 : "rootfs_data"
[    0.560000] 0x000000050000-0x000000400000 : "firmware"
[    0.580000] ramips-wdt ramips-wdt: timeout value must be 0 < timeout <= 35, using 35
[    0.600000] TCP: cubic registered
[    0.610000] NET: Registered protocol family 17
[    0.610000] 8021q: 802.1Q VLAN Support v1.8
[    0.650000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.660000] Freeing unused kernel memory: 180k freed
[    5.020000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/input0
[    5.120000] Button Hotplug driver version 0.4.1
[    8.720000] jffs2: notice: (350) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 28 of xref (0 dead, 2 orphan) found.
[   13.070000] rt2800lib: Unknown symbol ieee80211_start_tx_ba_cb_irqsafe (err 0)
[   13.080000] rt2800lib: Unknown symbol ieee80211_stop_tx_ba_cb_irqsafe (err 0)
[   13.100000] rt2800lib: Unknown symbol rt2x00lib_txdone (err 0)
[   13.110000] rt2800lib: Unknown symbol rt2x00mac_conf_tx (err 0)
[   13.120000] rt2800lib: Unknown symbol rt2x00lib_get_bssidx (err 0)
[   13.150000] rt2800pci: Unknown symbol rt2x00mac_sw_scan_complete (err 0)
[   13.160000] rt2800pci: Unknown symbol rt2800_config_shared_key (err 0)
[   13.180000] rt2800pci: Unknown symbol rt2x00mac_add_interface (err 0)
[   13.190000] rt2800pci: Unknown symbol rt2800_enable_radio (err 0)
[   13.200000] rt2800pci: Unknown symbol rt2800_reset_tuner (err 0)
[   13.220000] rt2800pci: Unknown symbol rt2x00mac_get_stats (err 0)
[   13.230000] rt2800pci: Unknown symbol rt2x00mac_sta_remove (err 0)
[   13.240000] rt2800pci: Unknown symbol rt2x00pci_flush_queue (err 0)
[   13.250000] rt2800pci: Unknown symbol rt2800_link_stats (err 0)
[   13.260000] rt2800pci: Unknown symbol rt2800_rfkill_poll (err 0)
[   13.280000] rt2800pci: Unknown symbol rt2800_txdone_entry (err 0)
[   13.290000] rt2800pci: Unknown symbol rt2x00pci_initialize (err 0)
[   13.300000] rt2800pci: Unknown symbol rt2x00mac_set_key (err 0)
[   13.310000] rt2800pci: Unknown symbol rt2800_config_filter (err 0)
[   13.330000] rt2800pci: Unknown symbol rt2800_conf_tx (err 0)
[   13.340000] rt2800pci: Unknown symbol rt2x00mac_sw_scan_start (err 0)
[   13.350000] rt2800pci: Unknown symbol rt2x00mac_tx_frames_pending (err 0)
[   13.360000] rt2800pci: Unknown symbol rt2800_check_firmware (err 0)
[   13.380000] rt2800pci: Unknown symbol rt2800_mcu_request (err 0)
[   13.390000] rt2800pci: Unknown symbol rt2800_config_pairwise_key (err 0)
[   13.400000] rt2800pci: Unknown symbol compat_dependency_symbol (err 0)
[   13.410000] rt2800pci: Unknown symbol rt2x00pci_uninitialize (err 0)
[   13.430000] rt2800pci: Unknown symbol rt2x00queue_get_entry (err 0)
[   13.440000] rt2800pci: Unknown symbol rt2800_probe_hw (err 0)
[   13.450000] rt2800pci: Unknown symbol rt2800_clear_beacon (err 0)
[   13.460000] rt2800pci: Unknown symbol rt2800_get_tsf (err 0)
[   13.470000] rt2800pci: Unknown symbol rt2x00mac_remove_interface (err 0)
[   13.490000] rt2800pci: Unknown symbol rt2800_load_firmware (err 0)
[   13.500000] rt2800pci: Unknown symbol rt2x00mac_config (err 0)
[   13.510000] rt2800pci: Unknown symbol rt2x00soc_probe (err 0)
[   13.520000] rt2800pci: Unknown symbol rt2x00mac_start (err 0)
[   13.540000] rt2800pci: Unknown symbol rt2x00mac_rfkill_poll (err 0)
[   13.550000] rt2800pci: Unknown symbol rt2800_process_rxwi (err 0)
[   13.560000] rt2800pci: Unknown symbol rt2x00mac_stop (err 0)
[   13.570000] rt2800pci: Unknown symbol rt2800_link_tuner (err 0)
[   13.580000] rt2800pci: Unknown symbol rt2x00pci_regbusy_read (err 0)
[   13.600000] rt2800pci: Unknown symbol rt2800_config_intf (err 0)
[   13.610000] rt2800pci: Unknown symbol rt2800_set_rts_threshold (err 0)
[   13.620000] rt2800pci: Unknown symbol rt2800_wait_wpdma_ready (err 0)
[   13.630000] rt2800pci: Unknown symbol rt2x00soc_remove (err 0)
[   13.650000] rt2800pci: Unknown symbol rt2x00mac_configure_filter (err 0)
[   13.660000] rt2800pci: Unknown symbol rt2800_sta_remove (err 0)
[   13.670000] rt2800pci: Unknown symbol rt2x00mac_flush (err 0)
[   13.680000] rt2800pci: Unknown symbol rt2x00lib_pretbtt (err 0)
[   13.690000] rt2800pci: Unknown symbol rt2800_get_tkip_seq (err 0)
[   13.710000] rt2800pci: Unknown symbol rt2800_write_tx_data (err 0)
[   13.720000] rt2800pci: Unknown symbol rt2800_disable_radio (err 0)
[   13.730000] rt2800pci: Unknown symbol rt2800_ampdu_action (err 0)
[   13.740000] rt2800pci: Unknown symbol rt2800_config_ant (err 0)
[   13.760000] rt2800pci: Unknown symbol rt2x00mac_tx (err 0)
[   13.770000] rt2800pci: Unknown symbol rt2800_sta_add (err 0)
[   13.780000] rt2800pci: Unknown symbol rt2x00mac_sta_add (err 0)
[   13.790000] rt2800pci: Unknown symbol rt2800_config (err 0)
[   13.800000] rt2800pci: Unknown symbol rt2800_write_beacon (err 0)
[   13.810000] rt2800pci: Unknown symbol rt2800_gain_calibration (err 0)
[   13.830000] rt2800pci: Unknown symbol rt2800_vco_calibration (err 0)
[   13.840000] rt2800pci: Unknown symbol rt2800_get_survey (err 0)
[   13.850000] rt2800pci: Unknown symbol rt2x00pci_rxdone (err 0)
[   13.860000] rt2800pci: Unknown symbol rt2x00lib_beacondone (err 0)
[   13.870000] rt2800pci: Unknown symbol rt2800_config_erp (err 0)
[   13.890000] rt2800pci: Unknown symbol rt2x00mac_get_ringparam (err 0)
[   13.900000] rt2800pci: Unknown symbol rt2x00mac_bss_info_changed (err 0)
[   13.910000] rt2800pci: Unknown symbol rt2800_disable_wpdma (err 0)
[   13.980000] PPP generic driver version 2.4.2
[   14.280000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   14.560000] NET: Registered protocol family 24
[   14.590000] nf_conntrack version 0.5.0 (212 buckets, 848 max)
[   19.470000] ramips-wdt: timeout value 60 must be 0 < timeout <= 35, using 35
[   20.420000] device eth0.1 entered promiscuous mode
[   20.430000] device eth0 entered promiscuous mode
[   20.450000] br-lan: port 1(eth0.1) entered forwarding state
[   20.460000] br-lan: port 1(eth0.1) entered forwarding state
[   22.460000] br-lan: port 1(eth0.1) entered forwarding state

I would appreciate any help.

And another question about the RAM, I have 64MB chip (as far as i know will be only able to use 32MB but thats ok) HY5DU121622CTP. Will this be suitable for RAM mod?

Take care

hot-dog wrote:

And another question about the RAM, I have 64MB chip (as far as i know will be only able to use 32MB but thats ok) HY5DU121622CTP. Will this be suitable for RAM mod?

Take care

HY5DU121622CTP is a DDR SDRAM. HLK-RM04 modules use SDRAM memory type only.
It's different type, different package...