How to enable WiFi on i.MX8ULP using init scripts to avoid configuring WiFi on each boot?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to enable WiFi on i.MX8ULP using init scripts to avoid configuring WiFi on each boot?

ソリューションへジャンプ
2,162件の閲覧回数
Namitha_zcs
Contributor I

I have enbaled wifi on IMX8ULP to connect to an AP in station mode uisng the following commands from  the IMX linux reference manual .
modprobe moal mod_para=nxp/wifi_mod_para.conf
head -n 4 /etc/wpa_supplicant.conf > /etc/wpa_supplicant.conf.tmp
wpa_passphrase ssid password >> /etc/wpa_supplicant.conf.tmp
mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.bak
mv /etc/wpa_supplicant.conf.tmp /etc/wpa_supplicant.conf
wpa_supplicant -B -i mlan0 -c /etc/wpa_supplicant.conf -D nl80211
However,the configuration resets in every boot .How can I  enable WiFi uisng init scripts so that it starts automatically in boot? .

0 件の賞賛
返信
1 解決策
2,132件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

HI @Namitha_zcs!

Thank you for contacting NXP Support!

 

The definitive solution is create a custom startup script as a service:


Step 1: Go to etc/systemd/system

cd /etc/systemd/system


Step 2: In this directory create a new file with the name of your preference but the
extension must be .service.

The file must contain:

[Unit]
Description=”Wifi Start”
[Service]
ExecStart=sudo modprobe moal mod_para=nxp/wifi_mod_para.conf
[Install]
WantedBy=multi-user.target


Now save the file, in my case the name was wifi_start.service.


Step 3: Now we need to enable the script in the startup/boot sequence following the
command:

sudo systemctl enable wifi_start.service

 

Finally, each time you boot your board, the WIFI module will initialize automatically.

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,925件の閲覧回数
atbkoad
Contributor I

This help me a lot on my recent project with iMX8ULP. I will apply it to my device later for testing.

0 件の賞賛
返信
2,133件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

HI @Namitha_zcs!

Thank you for contacting NXP Support!

 

The definitive solution is create a custom startup script as a service:


Step 1: Go to etc/systemd/system

cd /etc/systemd/system


Step 2: In this directory create a new file with the name of your preference but the
extension must be .service.

The file must contain:

[Unit]
Description=”Wifi Start”
[Service]
ExecStart=sudo modprobe moal mod_para=nxp/wifi_mod_para.conf
[Install]
WantedBy=multi-user.target


Now save the file, in my case the name was wifi_start.service.


Step 3: Now we need to enable the script in the startup/boot sequence following the
command:

sudo systemctl enable wifi_start.service

 

Finally, each time you boot your board, the WIFI module will initialize automatically.

0 件の賞賛
返信
2,111件の閲覧回数
Namitha_zcs
Contributor I
Thankyou for your response.
0 件の賞賛
返信
2,153件の閲覧回数
Joel742Bushong
Contributor I

Hello!

To enable WiFi on your IMX8ULP automatically at boot, create a custom startup script as a service. Create a file in /etc/systemd/system (e.g., wifi_start.service) with the necessary configuration, and then run sudo systemctl enable wifi_start.service to add it to the startup sequence. This will ensure the WiFi module initializes each time you boot.

0 件の賞賛
返信