View Single Post
Old 08-07-2019, 10:10 AM   #7
Mavireck
Connoisseur
Mavireck might easily be mistaken for a TexanMavireck might easily be mistaken for a TexanMavireck might easily be mistaken for a TexanMavireck might easily be mistaken for a TexanMavireck might easily be mistaken for a TexanMavireck might easily be mistaken for a TexanMavireck might easily be mistaken for a TexanMavireck might easily be mistaken for a TexanMavireck might easily be mistaken for a TexanMavireck might easily be mistaken for a TexanMavireck might easily be mistaken for a Texan
 
Posts: 63
Karma: 18290
Join Date: Jul 2016
Location: France
Device: Kobo H2O (broken), Kobo H2O Edition 2 v1 (stolen), Kobo Clara 2E
Quote:
Originally Posted by sherman View Post
Spoiler:

enable-wifi.sh doesn't include the required Nickel environment variables. You want to look at lines 93-94 from koreader.sh. They are the lines that read:
Code:
eval "$(xargs -n 1 -0 <"/proc/$(pidof nickel)/environ" | grep -e DBUS_SESSION_BUS_ADDRESS -e NICKEL_HOME -e WIFI_MODULE -e LANG -e WIFI_MODULE_PATH -e INTERFACE 2>/dev/null)"
    export DBUS_SESSION_BUS_ADDRESS NICKEL_HOME WIFI_MODULE LANG WIFI_MODULE_PATH INTERFACE
You may like to also look at the shell scripts from my Kobo UNCaGED, project, more specifically scripts/nickel-usbms.sh, lines 69-71.

Note, the Wifi stuff in that file may look a little familiar. I took a lot of "inspiration" from koreader for the Wifi stuff.
Thank you so much ! My problem is solved !
I did absolutely not know of the details of exported variables within bash scripts. My initialization script did not export all the variables required (it did not export WIFI_MODULE_PATH for instance).
I still had some issues, until I found that the $PLATFORM variable was not defined. For now I hardcoded the path to the wifi driver:
Code:
lsmod | grep -q sdio_wifi_pwr || insmod "/drivers/mx50-ntx/wifi/sdio_wifi_pwr.ko"
instead of :
Code:
lsmod | grep -q sdio_wifi_pwr || insmod "/drivers/${PLATFORM}/wifi/sdio_wifi_pwr.ko"
That is enough to make it work on my device ! I will further investigate about that platform variable issue, but that is already a great step forward!
Mavireck is offline   Reply With Quote