Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mdmngr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
IOPSYS
mdmngr
Commits
79b11a57
Commit
79b11a57
authored
7 years ago
by
Jakob Olsson
Browse files
Options
Downloads
Patches
Plain Diff
some more features added to wrapper
parent
a4ca0ed7
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dongle_infrastructure.c
+4
-7
4 additions, 7 deletions
dongle_infrastructure.c
libmobile_hilink.h
+1
-1
1 addition, 1 deletion
libmobile_hilink.h
libmobile_wrapper.c
+30
-0
30 additions, 0 deletions
libmobile_wrapper.c
libmobile_wrapper.h
+4
-0
4 additions, 0 deletions
libmobile_wrapper.h
with
39 additions
and
8 deletions
dongle_infrastructure.c
+
4
−
7
View file @
79b11a57
...
@@ -303,7 +303,7 @@ int unlock_sim(struct ubus_context *ctx, struct ubus_object *obj,
...
@@ -303,7 +303,7 @@ int unlock_sim(struct ubus_context *ctx, struct ubus_object *obj,
if
(
rv
<
0
)
if
(
rv
<
0
)
goto
fail_input
;
goto
fail_input
;
printf
(
"survived puk format
\n
"
);
printf
(
"survived puk format
\n
"
);
response
=
mobile_unlock_sim
(
global_dev
->
ip
,
pin
,
puk
);
response
=
mobile_unlock_sim
(
global_dev
,
pin
,
puk
);
if
(
!
response
)
if
(
!
response
)
goto
fail_unknown
;
goto
fail_unknown
;
printf
(
"did not survive the library
\n
"
);
printf
(
"did not survive the library
\n
"
);
...
@@ -421,7 +421,7 @@ int create_apn_profile(struct ubus_context *ctx, struct ubus_object *obj,
...
@@ -421,7 +421,7 @@ int create_apn_profile(struct ubus_context *ctx, struct ubus_object *obj,
goto
fail_argument
;
goto
fail_argument
;
}
}
response
=
mobile_create_apn_profile
_zte
(
global_dev
->
ip
,
profile_name
,
wan_apn
,
pdp_type
);
response
=
mobile_create_apn_profile
(
global_dev
,
profile_name
,
wan_apn
,
pdp_type
);
if
(
!
response
)
if
(
!
response
)
goto
fail_unknown
;
goto
fail_unknown
;
...
@@ -438,7 +438,7 @@ int show_current_apn(struct ubus_context *ctx, struct ubus_object *obj,
...
@@ -438,7 +438,7 @@ int show_current_apn(struct ubus_context *ctx, struct ubus_object *obj,
{
{
struct
json_object
*
response
;
struct
json_object
*
response
;
response
=
mobile_get_current_apn
_zte
(
global_dev
->
ip
);
response
=
mobile_get_current_apn
(
global_dev
);
if
(
!
response
)
if
(
!
response
)
goto
fail_unknown
;
goto
fail_unknown
;
...
@@ -449,16 +449,13 @@ fail_unknown:
...
@@ -449,16 +449,13 @@ fail_unknown:
}
}
//dongle_network..
//dongle_network..
char
*
dongle_ip
;
int
get_signal_strength
(
struct
ubus_context
*
ctx
,
struct
ubus_object
*
obj
,
int
get_signal_strength
(
struct
ubus_context
*
ctx
,
struct
ubus_object
*
obj
,
struct
ubus_request_data
*
req
,
const
char
*
method
,
struct
ubus_request_data
*
req
,
const
char
*
method
,
struct
blob_attr
*
msg
)
struct
blob_attr
*
msg
)
{
{
struct
json_object
*
response
;
struct
json_object
*
response
;
response
=
mobile_get_rssi
_zte
(
global_dev
->
ip
);
response
=
mobile_get_rssi
(
global_dev
);
if
(
!
response
)
if
(
!
response
)
goto
fail_unknown
;
goto
fail_unknown
;
...
...
This diff is collapsed.
Click to expand it.
libmobile_hilink.h
+
1
−
1
View file @
79b11a57
...
@@ -65,7 +65,7 @@ struct json_object *mobile_get_notification_hilink();
...
@@ -65,7 +65,7 @@ struct json_object *mobile_get_notification_hilink();
struct
json_object
*
mobile_get_sms_count_hilink
();
struct
json_object
*
mobile_get_sms_count_hilink
();
struct
json_object
*
mobile_get_language_hilink
();
struct
json_object
*
mobile_get_language_hilink
();
struct
json_object
*
mobile_create_apn_profile
(
char
*
name
,
char
*
apn_name
,
char
*
username
,
char
*
password
);
struct
json_object
*
mobile_create_apn_profile
_hilink
(
char
*
name
,
char
*
apn_name
,
char
*
username
,
char
*
password
);
struct
json_object
*
mobile_set_apn_profile_default_hilink
(
char
*
name
,
char
*
apn_name
,
char
*
username
,
char
*
password
);
struct
json_object
*
mobile_set_apn_profile_default_hilink
(
char
*
name
,
char
*
apn_name
,
char
*
username
,
char
*
password
);
...
...
This diff is collapsed.
Click to expand it.
libmobile_wrapper.c
+
30
−
0
View file @
79b11a57
...
@@ -88,4 +88,34 @@ struct json_object *mobile_set_apn_profile(struct device *dev, char *name)
...
@@ -88,4 +88,34 @@ struct json_object *mobile_set_apn_profile(struct device *dev, char *name)
//return mobile_set_apn_profile_hilink(dev->ip, name);
//return mobile_set_apn_profile_hilink(dev->ip, name);
return
NULL
;
return
NULL
;
}
struct
json_object
*
mobile_create_apn_profile
(
struct
device
*
dev
,
char
*
profile_name
,
char
*
wan_apn
,
char
*
pdp_type
)
{
if
(
strcmp
(
dev
->
usb
.
if_name
,
"usb0"
)
==
0
)
return
mobile_create_apn_profile_zte
(
dev
->
ip
,
profile_name
,
wan_apn
,
pdp_type
);
else
if
(
strcmp
(
dev
->
usb
.
if_name
,
"eth5"
)
==
0
)
//return mobile_create_apn_profile_hilink(dev->ip, profile_name, wan_apn, pdp_type);
return
NULL
;
}
struct
json_object
*
mobile_get_current_apn
(
struct
device
*
dev
)
{
if
(
strcmp
(
dev
->
usb
.
if_name
,
"usb0"
)
==
0
)
return
mobile_get_current_apn_zte
(
dev
->
ip
);
else
if
(
strcmp
(
dev
->
usb
.
if_name
,
"eth5"
)
==
0
)
//return mobile_get_current_apn_hilink(dev->ip);
return
NULL
;
}
struct
json_object
*
mobile_get_rssi
(
struct
device
*
dev
)
{
if
(
strcmp
(
dev
->
usb
.
if_name
,
"usb0"
)
==
0
)
return
mobile_get_rssi_zte
(
dev
->
ip
);
else
if
(
strcmp
(
dev
->
usb
.
if_name
,
"eth5"
)
==
0
)
//return mobile_get_rssi_hilink(dev->ip);
return
NULL
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
libmobile_wrapper.h
+
4
−
0
View file @
79b11a57
...
@@ -27,7 +27,11 @@ struct json_object *mobile_disable_pin(struct device *dev, char *pin);
...
@@ -27,7 +27,11 @@ struct json_object *mobile_disable_pin(struct device *dev, char *pin);
struct
json_object
*
mobile_verify_pin
(
struct
device
*
dev
,
char
*
pin
);
struct
json_object
*
mobile_verify_pin
(
struct
device
*
dev
,
char
*
pin
);
struct
json_object
*
mobile_enable_pin
(
struct
device
*
dev
,
char
*
pin
);
struct
json_object
*
mobile_enable_pin
(
struct
device
*
dev
,
char
*
pin
);
struct
json_object
*
mobile_get_remaining_tries
(
struct
device
*
dev
);
struct
json_object
*
mobile_get_remaining_tries
(
struct
device
*
dev
);
struct
json_object
*
mobile_unlock_sim
(
struct
device
*
dev
,
char
*
pin
,
char
*
puk
);
struct
json_object
*
mobile_get_apn_profiles
(
struct
device
*
dev
);
struct
json_object
*
mobile_get_apn_profiles
(
struct
device
*
dev
);
struct
json_object
*
mobile_delete_apn_profile
(
struct
device
*
dev
,
char
*
name
);
struct
json_object
*
mobile_delete_apn_profile
(
struct
device
*
dev
,
char
*
name
);
struct
json_object
*
mobile_set_apn_profile
(
struct
device
*
dev
,
char
*
name
);
struct
json_object
*
mobile_set_apn_profile
(
struct
device
*
dev
,
char
*
name
);
struct
json_object
*
mobile_create_apn_profile
(
struct
device
*
dev
,
char
*
profile_name
,
char
*
wan_apn
,
char
*
pdp_type
);
struct
json_object
*
mobile_get_current_apn
(
struct
device
*
dev
);
struct
json_object
*
mobile_mobile_get_rssi
(
struct
device
*
dev
);
#endif
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment