Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re860_factory
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
waterword
re860_factory
Commits
370c78c2
Commit
370c78c2
authored
Jul 13, 2025
by
lyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"refactor(factoryTest): 重构WiFi连接逻辑并新增路径获取模块"
parent
df1fb3b8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
0 deletions
+30
-0
factoryTest_plugin/factory_testWifi.js
factoryTest_plugin/factory_testWifi.js
+8
-0
factoryTest_plugin/getPath.js
factoryTest_plugin/getPath.js
+22
-0
factoryTest_plugin/shell/connectWifi.sh
factoryTest_plugin/shell/connectWifi.sh
+0
-0
No files found.
factoryTest_plugin/factory_testWifi.js
View file @
370c78c2
...
...
@@ -108,6 +108,14 @@ function onGotoWlanEnterPasswordPageEvent(value, signal) {
function
connect_wifi
(
ssid
,
psk
)
{
var
getPath
=
require
(
"
getPath.js
"
);
var
fullPath
=
getPath
.
getFactoryFullPath
();
if
(
1
){
systemCtrl
.
executeSystemCommand
(
fullPath
+
"
factoryTest_plugin/shell/connectWifi.sh
"
+
"
"
+
ssid
+
"
"
+
psk
)
return
;
}
systemCtrl
.
executeSystemCommand
(
"
killall -9 udhcpc
"
)
systemCtrl
.
executeSystemCommand
(
"
wpa_cli -p /tmp/wpa_supplicant/sockets -i wlan0 set_network 0 ssid
\
'
\"
"
+
ssid
+
"
\"\
'
"
)
systemCtrl
.
executeSystemCommand
(
"
usleep 10000
"
)
//10ms 用于缓冲
...
...
factoryTest_plugin/getPath.js
0 → 100644
View file @
370c78c2
var
_userdata
=
require
(
"
userdata.js
"
);
var
userData
=
_userdata
.
userData
;
var
env
=
0
;
//0: Ի 1: ʽ
function
getFactoryFullPath
()
{
switch
(
env
)
{
case
0
:
return
"
/tmp/app/quicknode/tests/re860_factory/
"
;
case
1
:
return
"
/mnt/app/quicknode/tests/re860_factory/
"
;
default
:
console
.
log
(
"
getFactoryFullPath: env error
"
);
return
"
/mnt/app/quicknode/tests/re860_factory/
"
;
}
}
module
.
exports
=
{
getFactoryFullPath
:
getFactoryFullPath
,
}
\ No newline at end of file
factoryTest_plugin/shell/conne
xt_w
ifi.sh
→
factoryTest_plugin/shell/conne
ctW
ifi.sh
View file @
370c78c2
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment