OpenWrt Forum Archive

Topic: Openwrt support for Huawei HG655b

The content of this topic has been archived between 12 Mar 2018 and 5 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Ok, BTW I've built another firmware with gpioctl included (also with samba, and pure-ftpd). The usb modules for external storage are included, also for FAT, EXT, NTFS(read only) filesystems, I need to know if at least the usb stick is detected in the kernel log when you plug and unplug it.

openwrt-HG655x-squashfs-cfe-5.bin

Once you get the GPIOs assignments for buttons and leds, I'll made a patch with all the stuff to integrate your router in a git repository. Official support for bcm63xx it seems got stucked with the dts migration, thus it might be eventualy supported.

fratzicu wrote:

Hi,

I followed theinstructions here for GPIO:
http://wiki.openwrt.org/doc/devel/add.new.device
I think power and wifi wor well.

The results (tested until 37) are:

visible led ..... on (0,1)....no
power.............0..............22
DSL..................0...............2
LAN1................0................6
LAN2.................0...............7
LAN3.................0................8
LAN4..................0...............9
WLAN....................................don't know
WPS...................0...............27
VOIP..................0.................25
USB....................0................14

That's it.

I don't know how to test the buttons (wifi, reset, wps).

What now?

Ok, good job, about WLAN probably the led is controled by the wifi chip itself not a GPIO. I'll integrate this stuff in a new build.

For buttons you need to monitor the value (1 or 0) when pressed and released a button, either using the mentioned script or else with gpioctl.

Note that gpios need to be configured as inputs, to get the state when pressed/released a button.

Hi

I noticed that the menu services (where usually openvpn, printserver minidlna, etc were found) is missing in the new luci interface.

Well, I didn't build any dlna, or printserver stuff, and no idea about the luci options, I mostly use the Openwrt command line. Don't bother about it.

Now I need the GPIOs used by the buttons. It's important for having Openwrt failsafe mode. Also check if the usb works.

Hi,

with the new image there are some unsolved things:

1) LAN1 led stays ON even if I disconect it. LAN 2,3,4 stays OFF even if I conect the cable. No link indicator.
2) no output on kernel log when I  connect a USB device.

I'll try the buttons, butit seems its more complicated. There are 37 GPIOs

(Last edited by fratzicu on 29 Apr 2014, 20:33)

root@OpenWrt:/# gpioctl 20
gpioctl dirin|dirout|get|set|clear gpio
root@OpenWrt:/# gpioctl get 0
Using gpio pin 0.
gpio_is_requested: No such file or directory
root@OpenWrt:/# gpioctl get 1
Using gpio pin 1.
gpio_is_requested: No such file or directory
root@OpenWrt:/# gpioctl
gpioctl dirin|dirout|get|set|clear gpio
root@OpenWrt:/# gpioctl --help
gpioctl dirin|dirout|get|set|clear gpio
root@OpenWrt:/#

Ok, I built another firmware
- Added all leds, now the power led should blink when booting openwrt.
- Added detection for the second internal USB, since the first one doesn't seem to be wired to your USB
openwrt-HG655x-squashfs-cfe-6.bin
Let me know if the LAN1 led stills remains on, and if now there is some life with the USB. I assumed all leds colors are green, is this true?.

To use gpioctl, I think you should do this (not sure since I never use it)
configure a gpio0 as an input

gpioctl dirin 0

check the state

gpioctl get 0

press the button and check it again

gpioctl get 0

release the button and check it again

gpioctl get 0

does the state change?, if true you got the gpio for the button, if the state is 0 when pressed then the gpio is active low

Hi,

I used the instructions here:
https://forum.openwrt.org/viewtopic.php?id=36561

I found 2 buttons:

button WPS, close to power button .... pressed 0, relesed 1
buttonreset, next button (middle).........pressed 0, released 1

I didn'tfind button Wlan, farthest from power button.
didn't try the gpios found for Leds

All buttons are green.

Trying now v6....

Ok, but don't forget to annotate the GPIO number for each button. It would be nice to find all buttons, because in my experience when somebody adds support for a specific device, if some features are missing then they never will be fixed.

Hi, with v6

The power led blinks at boot.
The wifi led is on when activating wifi and off when deactivating it (ok)
the LAN 1-4 are OFF always (no matter if connected or not)
the usb now works, butthe USB led is off

[  231.440000] usb 1-2: new high-speed USB device number 6 using ehci-platform
[  231.580000] usb-storage 1-2:1.0: USB Mass Storage device detected
[  231.588000] scsi2 : usb-storage 1-2:1.0
[  232.596000] scsi 2:0:0:0: Direct-Access     CHIPSBNK v3.3.8.8         5.00 PQ: 0 ANSI: 2
[  232.608000] sd 2:0:0:0: [sda] 2049024 512-byte logical blocks: (1.04 GB/1000 MiB)
[  232.616000] sd 2:0:0:0: [sda] Write Protect is off
[  232.624000] sd 2:0:0:0: [sda] No Caching mode page found
[  232.628000] sd 2:0:0:0: [sda] Assuming drive cache: write through
[  232.640000] sd 2:0:0:0: [sda] No Caching mode page found
[  232.644000] sd 2:0:0:0: [sda] Assuming drive cache: write through
[  232.652000]  sda: sda1
[  232.656000] sda: p1 size 2049024 extends beyond EOD, enabling native capacity
[  232.664000] sd 2:0:0:0: [sda] No Caching mode page found
[  232.672000] sd 2:0:0:0: [sda] Assuming drive cache: write through
[  232.680000]  sda: sda1
[  232.680000] sda: p1 size 2049024 extends beyond EOD, truncated
[  232.696000] sd 2:0:0:0: [sda] No Caching mode page found
[  232.700000] sd 2:0:0:0: [sda] Assuming drive cache: write through
[  232.708000] sd 2:0:0:0: [sda] Attached SCSI removable disk
[  259.388000] bcm63xx_enetsw bcm63xx_enetsw.0: link DOWN on port1



BusyBox v1.19.4 (2014-04-20 18:24:56 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 ----------©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©HII%IBREAKER (Barrier Breaker, r40396)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------
root@OpenWrt:/# PuTTYls
bin      etc      mnt      proc     root     sys      usr      www
dev      lib      overlay  rom      sbin     tmp      var
root@OpenWrt:/# cd /mnt
root@OpenWrt:/mnt# ls
root@OpenWrt:/mnt# cat /proc/part
root@OpenWrt:/mnt# cat /proc/partitions 
major minor  #blocks  name

  31        0        128 mtdblock0
  31        1       1087 mtdblock1
  31        2       6720 mtdblock2
  31        3       3392 mtdblock3
  31        4         64 mtdblock4
  31        5         64 mtdblock5
  31        6       7808 mtdblock6
   8        0    1024512 sda
   8        1    1024480 sda1
root@OpenWrt:/mnt# mkdir /mnt/usb
root@OpenWrt:/mnt# mount /dev/sda1 /mnt/usb
root@OpenWrt:/mnt# cd /mnt/usb
root@OpenWrt:/mnt/usb# ls
EFI                            isolinux
README.diskdefines             license.txt
Uni-USB-Installer-Copying.txt  md5sum.txt
Uni-USB-Installer-Readme.txt   pics
autorun.inf                    pool
boot                           preseed
casper                         uui
dists                          wubi.exe
install
root@OpenWrt:/mnt/usb# cp wubi.exe wubi2.exe
root@OpenWrt:/mnt/usb# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                    3.3M    280.0K      3.0M   8% /
/dev/root                 3.3M      3.3M         0 100% /rom
tmpfs                    30.0M    688.0K     29.4M   2% /tmp
tmpfs                    30.0M     48.0K     30.0M   0% /tmp/root
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock3            3.3M    280.0K      3.0M   8% /overlay
overlayfs:/overlay        3.3M    280.0K      3.0M   8% /
/dev/sda1               996.6M    884.8M    111.8M  89% /mnt/usb
danitool wrote:

Ok, but don't forget to annotate the GPIO number for each button. It would be nice to find all buttons, because in my experience when somebody adds support for a specific device, if some features are missing then they never will be fixed.

I'll try again

The USB works, great. Looks like huawei for some unknown reason decided to use the second usb integrated port instead the first one, might be there is a place at the board for another usb port, who knows..

About the LAN leds and others, it's normal they are off, because they aren't configured. They should be configured by the user. It can be done with luci. But sadly the LAN ports don't have proper led triggers for full functionallity. BTW the goal is just to have them correctly defined at the kernel.

Hi,
still no luck with the wlan button. I tried two times all 38 GPIOS.
I don't mind this since I never use it.

OK, what to do now?

Could you compile a more complex firmware with buttons functionality? Also, is there support in openwrt for the modem?

Ok, but you still didn't say which are the GPIO numbers for reset an wps buttons.

About the ADSL part, there aren't drivers and no plan for adding it to the kernel. This part is Broadcom propietary with no FLOSS sourcecode, and it seems it uses it's own API. The developers don't want to waste time with reverse engineering this stuff.

So let me know the gpio numbers for the found buttons. About the wlan button, we can live without it smile

fratzicu wrote:

Hi,

I used the instructions here:
https://forum.openwrt.org/viewtopic.php?id=36561

I found 2 buttons:

button WPS, close to power button .... pressed 0, relesed 1
buttonreset, next button (middle).........pressed 0, released 1

I didn'tfind button Wlan, farthest from power button.

WPS ... gpio 12
Reset....gpio 34

What means phy0assoc, phy0rx, phy0tx, phy0radio? what could be suitable for USB?

And, of course, maybe you could compile into this firmware also:
minidlna,
openvpn
transmission (not really necessary)

Or maybe you could share the repository.

Thanks, great work until now. I am on vacation so I'll do my best to finish this. Sttill  I can only work only some few hours a day.

Good night

(Last edited by fratzicu on 29 Apr 2014, 23:27)

Ok, new firmware
openwrt-HG655x-squashfs-cfe-7.zip

- with openvpn-easy-rsa, without the luci app (broken)
- with minidlna, and transmission on another firmware
- and with buttons added to the kernel

I'll prepare some patches for a git repo, may be better if anyone need custom builds. I cannot test this stuff and no idea the software included in my firmwares will work.

Regards.

Hi, again,

I'll try the minilna firmware. I wonder if it can have ntfs write support

What  does the reset button?

Regards

(Last edited by fratzicu on 30 Apr 2014, 07:51)

Hi,

I flashed the firmware, it seems to work. Making more tests later.

Later:
USB led and lan1 tested and work with programabble settings.
USB port working butnot recognising all partitions on all usb flash disks. It reccognised allright my A-DATA USB external Hdd NTFS formatted 650 Gb.

WPS button not generating kernel log when pressed
Reset button short pressed generated a reboot.The reboot was ok, but the LAN did not work. I mean the IP was acquired by dhcp fprmy PC, ping worked, showed connected to internet, but was not communicating to internet in browser. Also, could not connect to luci. It was needed a power off/on to work.

I can not create a user. This is necessary to create a samba user.
Minidlna works and I could see the  USB led blink.

At some poit I'll play with network configuring because I would like to use it as a network extender (wired or preferably wireless) and as a media storage (USB NAS). So I will try to configure it as a repeater bridge.
Is therea luci interface for pure-ftpd?

(Last edited by fratzicu on 30 Apr 2014, 10:30)

I bult another firmware with ntfs-3g support (read write)

I checked the wps button, and it was already correctly defined, GPIO12 isn't it?
I also added smarter code for autodetecting the CFE size.
And no, there isn't any luci interface for maging ftp stuff.

openwrt-HG655x-squashfs-cfe-8.bin

Hi,

hope this is theone with minidlna. Ok, I'll test it later.

Thank you and good work.

There was an interestin this dvicesome time ago, I expect  a lot of users entering in this thread.

I was reviewing the leds of your router. Weren't you able to detect the "INTERNET" led?,  I have no gpio for this led.

Yes, i seem to have missed it. I'll give it to you when I get home. I have it