Wifi problem – Patch wpa_supplicant

Several users have reported to me a WiFi connection problem with the firmware GPL. I had not noticed the problem because I do not use WiFi.
The problem occurs when the association to Wifi. if you already associate with your Wifi official firmware, you have certainly not seen any problem since the parameters have been preserved.

After some research, we can see that the JTAG returns the following log:
command: /usr/local/sbin/wpa_supplicant -P /tmp/wpa_supplicant.pid -D wext -B -i wlan0 -c /tmp/wpa_supplicant.conf
/usr/local/sbin/wpa_supplicant command not found

This is due to an error in the file src/libs/make/wpa_supplicant.mk

The following lines :
wpa_supplicant-install:
-mkdir -p $(TOP_INSTALL_ROOTFS_DIR)/usr/bin
-mkdir -p $(TOP_INSTALL_ROOTFS_DIR)/usr/local/sbin
cp $(WPA_SUPPLICANT_SOURCE)/wpa_supplicant $(TOP_INSTALL_ROOTFS_DIR)/usr/bin
cp $(WPA_SUPPLICANT_SOURCE)/wpa_cli $(TOP_INSTALL_ROOTFS_DIR)/usr/bin
cp $(WPA_SUPPLICANT_0_8_SOURCE)/wpa_supplicant $(TOP_INSTALL_ROOTFS_DIR)/usr/local/bin
cp $(WPA_SUPPLICANT_0_8_SOURCE)/wpa_cli $(TOP_INSTALL_ROOTFS_DIR)/usr/local/bin
cp $(HOSTAPD_0_8_SOURCE)/hostapd $(TOP_INSTALL_ROOTFS_DIR)/usr/local/bin
cp $(HOSTAPD_0_8_SOURCE)/hostapd_cli $(TOP_INSTALL_ROOTFS_DIR)/usr/local/bin

must be modified as follows :
wpa_supplicant-install:
-mkdir -p $(TOP_INSTALL_ROOTFS_DIR)/usr/bin
-mkdir -p $(TOP_INSTALL_ROOTFS_DIR)/usr/local/bin
-mkdir -p $(TOP_INSTALL_ROOTFS_DIR)/usr/local/sbin
cp $(WPA_SUPPLICANT_SOURCE)/wpa_supplicant $(TOP_INSTALL_ROOTFS_DIR)/usr/bin
cp $(WPA_SUPPLICANT_SOURCE)/wpa_cli $(TOP_INSTALL_ROOTFS_DIR)/usr/bin
cp $(WPA_SUPPLICANT_0_8_SOURCE)/wpa_supplicant $(TOP_INSTALL_ROOTFS_DIR)/usr/local/bin
cp $(WPA_SUPPLICANT_0_8_SOURCE)/wpa_cli $(TOP_INSTALL_ROOTFS_DIR)/usr/local/bin
cp $(HOSTAPD_0_8_SOURCE)/hostapd $(TOP_INSTALL_ROOTFS_DIR)/usr/local/bin
cp $(HOSTAPD_0_8_SOURCE)/hostapd_cli $(TOP_INSTALL_ROOTFS_DIR)/usr/local/bin
ln -s ../bin/hostpad $(TOP_INSTALL_ROOTFS_DIR)/usr/local/sbin/hostpad
ln -s ../bin/hostpad_cli $(TOP_INSTALL_ROOTFS_DIR)/usr/local/sbin/hostpad_cli
ln -s ../bin/wpa_supplicant $(TOP_INSTALL_ROOTFS_DIR)/usr/local/sbin/wpa_supplicant
ln -s ../bin/wpa_cli $(TOP_INSTALL_ROOTFS_DIR)/usr/local/sbin/wpa_cli
ln -s ../bin/wpa_supplicant $(TOP_INSTALL_ROOTFS_DIR)/usr/local/bin/wpa_supplicant.realtek
ln -s ../bin/wpa_cli $(TOP_INSTALL_ROOTFS_DIR)/usr/local/bin/wpa_cli.realtek

This patch can be download here

The commands make install and make firmware sufficient to fully integrate this hotfix. A complete compilation is not necessary.

This patch gives rise to a new firmware version 1.05.18 and the version 1.08.17.
Links wpa_supplicant.realtek and wpa_cli.realtek are needed for version 1.09 and higher.

2 réflexions au sujet de « Wifi problem – Patch wpa_supplicant »

  1. Hi,
    I’ve read your posts and still have some questions. I want to use my WDTV as a downloading device. I want to run a PHP script (like wget4web) to add file links from web. And to server download it with wget in my external HDD.
    1. If I use your compiled firmware, can I then config apache, ddclient, …? or copy/add files later? (your compiled firmware has phpshell, right?)
    2. I used some of PHP/Ajax/… web shells before, but I didn’t understand “commands requesting a confirmation”. would you tell an example?

    Thanks

    • Hello

      1. You may not edit binary files. If you want to add functionality to the Web server, you must recompile from source and add your php files in the folder /build/root/webserver before running make build.
      2. For example, if you type the command “ssh myserver” to phpShell, you will not see the demand for key validation and application password and PHPShell will be freezed.
      Another developper send me modifications to enable telnet and sshd but I have not had time to create a firmware with this. I will also write two detailed tutorials. The first about using my firmware to connect sshfs. And another to tips and methods developpement. But all this takes time.

Leave a Reply