Widget for Huawei HiLink 3G/LTE Dongles

Search This thread

dnfm

Senior Member
Nov 24, 2009
89
18
As the owner of a few of these CSN2/MTCD Android head units, I am also the owner of a Huawei HiLink dongle for Internet access on said devices (the kind that appears as an Ethernet device to the Android deck).

I got annoyed with the fact that using my HiLink device I had Internet access, but I had no idea the status of said Internet connection (signal quality, roaming, whether I was online or not, etc.)

So I wrote a simple Android widget that does exactly that. You can download it on the Play Store here:

https://play.google.com/store/apps/details?id=com.datademons.hilinkstatuswidget

While I have been a professional programmer for many many years, this is the first time I've written anything for Android, so I'm still dealing with the learning curve, so be patient with me. :D

Feel free to comment here, or email me at the address on the app listing on the Play Store for bug reports/feature requests. I find it super useful, but I wrote it for me originally; that's to be expected. I hope it can help someone else.

l9Xn8EG.png
 
  • Like
Reactions: whocarez_pt

azcv

Senior Member
Feb 14, 2011
77
16
Sofia
Will it work with HiLink wifi modems?

Изпратено от моят LYA-L29 с помощта на Tapatalk
 

azcv

Senior Member
Feb 14, 2011
77
16
Sofia
I *think* it will, but I don't own one, so I can't test.



Give it a try and let me know how it goes.
Tested with:

1. Huawei E5573. The result is: found null. There is a small exclamation mark in the bottom right corner of the widget. Clicking on the widget is opening the app screen and after less than a second the activity is crashing.
2. Huawei E5330. There is only exclamation mark on the entire widget. The app creen can be opened but the info can't be fetched.
I suspect that this is because that this devices are password protected like a regular routers.
Also there is a strange bug. There is an icon of the widget in the huawei launcher. Actually it is only text without icon. When I click on the missing icon it opens the android app details page.


Изпратено от моят LYA-L29 с помощта на Tapatalk
 

dnfm

Senior Member
Nov 24, 2009
89
18
Tested with:

1. Huawei E5573. The result is: found null. There is a small exclamation mark in the bottom right corner of the widget. Clicking on the widget is opening the app screen and after less than a second the activity is crashing.
2. Huawei E5330. There is only exclamation mark on the entire widget. The app creen can be opened but the info can't be fetched.
I suspect that this is because that this devices are password protected like a regular routers.
Also there is a strange bug. There is an icon of the widget in the huawei launcher. Actually it is only text without icon. When I click on the missing icon it opens the android app details page.


Изпратено от моят LYA-L29 с помощта на Tapatalk

Interesting. Would you be willing to provide me some data so I can modify it to work with your devices?
 

azcv

Senior Member
Feb 14, 2011
77
16
Sofia
What kind of data?

Изпратено от моят LYA-L29 с помощта на Tapatalk
 

dnfm

Senior Member
Nov 24, 2009
89
18
What kind of data?

Изпратено от моят LYA-L29 с помощта на Tapatalk

I'll give more specifics when I'm in front of a computer, but the output of some URLs from the device (and you can censor any sensitive data you want from the results...)
 

dnfm

Senior Member
Nov 24, 2009
89
18
OK, in a browser, first, just go to the device homepage (usually /html/index.html) so you have a cookie, then go to the following pages:

/api/device/information
/api/monitoring/status
/api/device/signal
/api/net/current-plmn
/api/monitoring/traffic-statistics
/api/monitoring/month_statistics

They should all return XML. View the source of those pages, and send me what the source says... feel free to replace anything sensitive (phone number, imei, etc) with XXXXXXX, also feel free to PM them to me if you like.

If the device gives an error code, try logging in, and then going to those pages again. If it requires logging in, let me know, and send me the HTML source of the login page itself and I'll see what I can do.
 

azcv

Senior Member
Feb 14, 2011
77
16
Sofia
Hi,

Please see the attached pictures. I made test with and without sim card.
It seems that the widget is working very well.
There are only few things that may need a fix.
1. The first thing is that there is an launcher icon (text only, see the picture) which is not needed because the widget is a widget...
2. There is an error 1 line at the beginning and at the end of the advanced info. It does not affect the functionality.
3. Updating of the widget is a little bit slow. Maybe you need to add a refresh button which will refresh only the info that is on the widget (connectivity status and type). Clicking on the rest of the widget will open the advanced info and will pull the full info.
4. Maybe you can consider to add also the battery level on the widget for devices which are battery powered.
5. You can see on the screenshots that th 4G device is not showing the signal strenght. When I call the API it is not showing this info either. So it is firmware related bug.
Thank you for taking time to add suport for this devices. I think that it will work for most of the huawei devices.
Screenshot_20200730_195841_com.huawei.android.launcher.jpgScreenshot_20200730_195510_com.huawei.android.launcher.jpgScreenshot_20200730_195126_com.huawei.android.launcher.jpgScreenshot_20200730_195849_com.datademons.hilinkstatuswidget.jpgScreenshot_20200730_195453_com.datademons.hilinkstatuswidget.jpgScreenshot_20200730_195208_com.datademons.hilinkstatuswidget.jpg

Изпратено от моят LYA-L29 с помощта на Tapatalk
 
  • Like
Reactions: whocarez_pt

dnfm

Senior Member
Nov 24, 2009
89
18
Hi,

Please see the attached pictures. I made test with and without sim card.
It seems that the widget is working very well.
There are only few things that may need a fix.
1. The first thing is that there is an launcher icon (text only, see the picture) which is not needed because the widget is a widget...
2. There is an error 1 line at the beginning and at the end of the advanced info. It does not affect the functionality.
3. Updating of the widget is a little bit slow. Maybe you need to add a refresh button which will refresh only the info that is on the widget (connectivity status and type). Clicking on the rest of the widget will open the advanced info and will pull the full info.
4. Maybe you can consider to add also the battery level on the widget for devices which are battery powered.
5. You can see on the screenshots that th 4G device is not showing the signal strenght. When I call the API it is not showing this info either. So it is firmware related bug.
Thank you for taking time to add suport for this devices. I think that it will work for most of the huawei devices.
View attachment 5071195View attachment 5071197View attachment 5071199View attachment 5071201View attachment 5071203View attachment 5071205

Изпратено от моят LYA-L29 с помощта на Tapatalk
#1: There is no launcher icon -- I'm not sure why you launcher is showing it. I think that's a bug in your launcher.
#2: Do the errors only show up when the SIM is removed, or do they show up all the time?
#3: I've told it to update every 10 seconds, but I'm using the 'inexactrepeating' timer type, which means Android may delay it for a while to run all of the widget updates together -- this is to save battery power for people who may be using a device that's on batteries. I could force an update when you tap to the info screen, but I'm not sure how else I could sanely make that update manually.
#4: That's a good suggestion -- I'll have to see where on the icon that might make sense.
#5: Yea, if it doesn't report signal, the widget might not be useful since there wouldn't be much to report.

Thank you for your help, though -- I see some stuff in your screenshots that will help me with the next version.
 

dnfm

Senior Member
Nov 24, 2009
89
18
I just released a new version to the play store (1.5). Once google reviews it, give it a shot.. it now includes reporting the battery of the device, and should hopefully handle the weird 'error' data.
 
  • Like
Reactions: whocarez_pt

azcv

Senior Member
Feb 14, 2011
77
16
Sofia
I just released a new version to the play store (1.5). Once google reviews it, give it a shot.. it now includes reporting the battery of the device, and should hopefully handle the weird 'error' data.
Great. I will chet it out tomorrow.

Yes, it is stupid that the 4G device does not show the signal level but it is an operator's firmware and there will never be any updates.
Regarding the widget updating: there is a widget called CLW (conky like widget) in the play store. It is open source and you may check the code. It is updating immideately on click, on a predefined time and on connectivity change and power connect/disconnect.

Изпратено от моят LYA-L29 с помощта на Tapatalk
 

dnfm

Senior Member
Nov 24, 2009
89
18
The issue isn't that I don't know how, it's that it currently loads the info page on click, so I don't know how I'd make the UI sensibly update and support bringing up the info dialogue as well.

For now, I made it force update after you load the info page so when you close it, the widget is updated.
 

azcv

Senior Member
Feb 14, 2011
77
16
Sofia
The issue isn't that I don't know how, it's that it currently loads the info page on click, so I don't know how I'd make the UI sensibly update and support bringing up the info dialogue as well.

For now, I made it force update after you load the info page so when you close it, the widget is updated.
The new version is working great. There are no more error messages. But there are some graphical glitches. The new version is usable only when is 2x2 size. When it is smaller the elements are overlapping (see the attached pictures).
Also the battery icon does not reflect the battery level. And there is no icon for charger connected.

Regarding the auto refresh: It seems ok now. I don't know if there are any changes.
Regarding the manual refresh: My proposal is to split the widget on two tap zones. For example the left one will refresh only the battery level and the network mode and level. The right one will open the advanced info and will refresh everything.
Actually the widget is good enough because the most important info is already available. Everything else can be seen via hilink, web browser and the android network settings.
Screenshot_20200731_193856_com.datademons.hilinkstatuswidget.jpgView attachment 5071751Screenshot_20200731_193509_com.huawei.android.launcher.jpgScreenshot_20200731_193502_com.huawei.android.launcher.jpg

Изпратено от моят LYA-L29 с помощта на Tapatalk
 

dnfm

Senior Member
Nov 24, 2009
89
18
I had no intention to make the battery icon coincide with the battery level, nor show charging; it was simply an icon to show that it was the battery percentage.

The graphic sizing is a bit strange though; I'll look into that for the next release.

With this release, if you click on the icon, you'll get the info page, but it'll also force refresh the widget.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    As the owner of a few of these CSN2/MTCD Android head units, I am also the owner of a Huawei HiLink dongle for Internet access on said devices (the kind that appears as an Ethernet device to the Android deck).

    I got annoyed with the fact that using my HiLink device I had Internet access, but I had no idea the status of said Internet connection (signal quality, roaming, whether I was online or not, etc.)

    So I wrote a simple Android widget that does exactly that. You can download it on the Play Store here:

    https://play.google.com/store/apps/details?id=com.datademons.hilinkstatuswidget

    While I have been a professional programmer for many many years, this is the first time I've written anything for Android, so I'm still dealing with the learning curve, so be patient with me. :D

    Feel free to comment here, or email me at the address on the app listing on the Play Store for bug reports/feature requests. I find it super useful, but I wrote it for me originally; that's to be expected. I hope it can help someone else.

    l9Xn8EG.png
    1
    Pm sent!

    Изпратено от моят LYA-L29 с помощта на Tapatalk

    I just released 1.4 to the Play Store, so hopefully they'll review it relatively quickly and you can give it a shot. Let me know how it goes please.
    1
    Hi,

    Please see the attached pictures. I made test with and without sim card.
    It seems that the widget is working very well.
    There are only few things that may need a fix.
    1. The first thing is that there is an launcher icon (text only, see the picture) which is not needed because the widget is a widget...
    2. There is an error 1 line at the beginning and at the end of the advanced info. It does not affect the functionality.
    3. Updating of the widget is a little bit slow. Maybe you need to add a refresh button which will refresh only the info that is on the widget (connectivity status and type). Clicking on the rest of the widget will open the advanced info and will pull the full info.
    4. Maybe you can consider to add also the battery level on the widget for devices which are battery powered.
    5. You can see on the screenshots that th 4G device is not showing the signal strenght. When I call the API it is not showing this info either. So it is firmware related bug.
    Thank you for taking time to add suport for this devices. I think that it will work for most of the huawei devices.
    Screenshot_20200730_195841_com.huawei.android.launcher.jpgScreenshot_20200730_195510_com.huawei.android.launcher.jpgScreenshot_20200730_195126_com.huawei.android.launcher.jpgScreenshot_20200730_195849_com.datademons.hilinkstatuswidget.jpgScreenshot_20200730_195453_com.datademons.hilinkstatuswidget.jpgScreenshot_20200730_195208_com.datademons.hilinkstatuswidget.jpg

    Изпратено от моят LYA-L29 с помощта на Tapatalk
    1
    I just released a new version to the play store (1.5). Once google reviews it, give it a shot.. it now includes reporting the battery of the device, and should hopefully handle the weird 'error' data.