After many hours messing around trying to get my el-cheapo USB dongle working with SMS Gateway, I finally managed it.
Sadly, it took me a long time of messing around only to find that it was something very simple stopping it working.
So as there is no support for this SMS-Gateway even though it's a premium plugin, I thought I'd briefly note down my findings in case it helps anyone else.
The modem is a Huawei E1752 GSM dongle and I decided to purchase it from eBay. It was cheap because, 1) it was locked to Orange Mobile, 2) there are loads of them on eBay, 3) it's a little old now and doesn't support the latest technology.
I knew I could unlock it for free, I've done a few before, so buying the locked version cost me only £4.99.
First up, I needed the latest drivers from Huawei for Windows 10. Get them here; https://huaweidrivers.com/huawei-e1752/
Once installed, you now need to get the unlock codes and software to unlock the modem.
I used the following website to produce the unlock codes > https://huaweicodecalculator.com/new-algo/index.php
and this website to download the Huawei Modem Writer > https://routerunlock.com/download-hu...-by-sagmaster/
Once the code it generated you can use the writer to unlock the dongle, it took only a few minutes to complete the whole process and now I can use any sim in it.
The dongle itself does not need any custom initialisation strings entering into the plugin configuration page, it should work just fine. However, there is one more important step before we can use the modem in SMS Gateway! We need to change the mode of the modem to serial mode.
In normal mode, the dongle has a storage area that is available to windows, just like a memory stick, which hosts the connection software installer. In this mode the modem will not respond to serial commands as we want. In order to address this, open up a terminal such as Putty, connect to the com port for the modem, and issue this command;
Note; ^ and not the usual +
If all goes well and the code is accepted, the modem will now be in serial mode. Note that you can return to the previous configuration anytime you want, and while there are quite a few options, I would advise you reset to factory mode using
.
At this point I would physically unplug and replug your modem.
Here are the issues I had while trying to get the modem working, although the first issue was specific to my system and not the modem.
Issue 1 (Not modem specific)
Simply put, my security software was blocking the SMS Gateway plugin from working. The software utilises HIPS and various other protections that sandboxed the plugin files.
This led to errors when trying to activate the plugin. I simply marked them as trusted files within the software.
Issue 2 (The main issue)
After the modem was installed and working properly, I had the modem listed in device manager like this:

After finding the com port of the modem by clicking on it in device manager, I entered this com port into the SMS Gateway plugin page and clicked enable.
The plugin activated, the modem was initialised and I thought hell yeah. So I tried creating an event to send off an SMS to my phone when I turned on the outside light, it worked perfectly. Job done... or so I thought!
The ability to send SMS to my homeseer system and trigger events is more important to me than receiving SMS, so I tried sending an SMS to the GSM Modem and watched in the log for it to be recognised. It never happened, and here lies the problem. I messed around for a few days altering the modem via AT Commands via the Putty terminal. The modem responded as expected to all commands. It should do, the modem is specified as being fully compliant with GSM blah blah. I tried changing SMS notification settings until I was blue in the face, but nothing ever got it working properly. In other words, sending SMS worked fine from Homeseer, receiving did not. The SMS's were never logged as coming in.
If I should happen to restart the plugin, the SMS memory count in the SIM was recognised i.e. 4/20 and then deleted as they should be, but SMS sent to the modem while the plugin was enabled were never recognised.
I tried turning on SMS polling in the plugin, this did not work either for some reason, though I eventually got this working by altering some proprietary Huawei modem settings via Putty. I won't go into detail about that, as I didn't want to rely on polling when I knew the modem should work without this option.
I was ready to give up on this issue, until I happen to come across some hidden device in Windows device manager, specifically, if I went to the 'View' menu in Device Manager, and selected 'View Devices by Container' I happened to find some extra components for the GSM Modem, as below;

These hidden components/modes are not usually hidden if you have the modem in normal mode and not serial mode. Further, in either mode, the components each utilise a com port.
Now, here is where it gets a little interesting. The modem component we had been accessing was technically the correct component that accepts 'all' AT Commands!
The PC UI Component or 'Mode' accepts AT Commands also, but not all of them, as can be found when using Putty, it just gives errors on some of the commands.
From what I understand, the component/mode I was originally using to access the modem was the correct one, but for some reason the SMS notifications do not work correctly when using it with SMS Gateway. As soon as I changed the com port in the plugin to use the hidden PC UI component, the modem started working perfectly including the receiving of messages.
Perhaps someone here knows why, perhaps they can offer a better explanation? Until then, maybe this post will help someone else in a similar position.
One more thing, make sure that power saving in Windows cannot sleep the USB ports, as in;

It's a bit **** that there is zero help on a premium plugin! Perhaps Homeseer should consider having a better Developer > Customer policy, whereby if no support is available, the plugin becomes free!
Sadly, it took me a long time of messing around only to find that it was something very simple stopping it working.
So as there is no support for this SMS-Gateway even though it's a premium plugin, I thought I'd briefly note down my findings in case it helps anyone else.
The modem is a Huawei E1752 GSM dongle and I decided to purchase it from eBay. It was cheap because, 1) it was locked to Orange Mobile, 2) there are loads of them on eBay, 3) it's a little old now and doesn't support the latest technology.
I knew I could unlock it for free, I've done a few before, so buying the locked version cost me only £4.99.
First up, I needed the latest drivers from Huawei for Windows 10. Get them here; https://huaweidrivers.com/huawei-e1752/
Once installed, you now need to get the unlock codes and software to unlock the modem.
I used the following website to produce the unlock codes > https://huaweicodecalculator.com/new-algo/index.php
and this website to download the Huawei Modem Writer > https://routerunlock.com/download-hu...-by-sagmaster/
Once the code it generated you can use the writer to unlock the dongle, it took only a few minutes to complete the whole process and now I can use any sim in it.
The dongle itself does not need any custom initialisation strings entering into the plugin configuration page, it should work just fine. However, there is one more important step before we can use the modem in SMS Gateway! We need to change the mode of the modem to serial mode.
In normal mode, the dongle has a storage area that is available to windows, just like a memory stick, which hosts the connection software installer. In this mode the modem will not respond to serial commands as we want. In order to address this, open up a terminal such as Putty, connect to the com port for the modem, and issue this command;
Code:
AT^U2DIAG=0
If all goes well and the code is accepted, the modem will now be in serial mode. Note that you can return to the previous configuration anytime you want, and while there are quite a few options, I would advise you reset to factory mode using
Code:
AT^U2DIAG=276
At this point I would physically unplug and replug your modem.
Here are the issues I had while trying to get the modem working, although the first issue was specific to my system and not the modem.
Issue 1 (Not modem specific)
Simply put, my security software was blocking the SMS Gateway plugin from working. The software utilises HIPS and various other protections that sandboxed the plugin files.
This led to errors when trying to activate the plugin. I simply marked them as trusted files within the software.
Issue 2 (The main issue)
After the modem was installed and working properly, I had the modem listed in device manager like this:
After finding the com port of the modem by clicking on it in device manager, I entered this com port into the SMS Gateway plugin page and clicked enable.
The plugin activated, the modem was initialised and I thought hell yeah. So I tried creating an event to send off an SMS to my phone when I turned on the outside light, it worked perfectly. Job done... or so I thought!
The ability to send SMS to my homeseer system and trigger events is more important to me than receiving SMS, so I tried sending an SMS to the GSM Modem and watched in the log for it to be recognised. It never happened, and here lies the problem. I messed around for a few days altering the modem via AT Commands via the Putty terminal. The modem responded as expected to all commands. It should do, the modem is specified as being fully compliant with GSM blah blah. I tried changing SMS notification settings until I was blue in the face, but nothing ever got it working properly. In other words, sending SMS worked fine from Homeseer, receiving did not. The SMS's were never logged as coming in.
If I should happen to restart the plugin, the SMS memory count in the SIM was recognised i.e. 4/20 and then deleted as they should be, but SMS sent to the modem while the plugin was enabled were never recognised.
I tried turning on SMS polling in the plugin, this did not work either for some reason, though I eventually got this working by altering some proprietary Huawei modem settings via Putty. I won't go into detail about that, as I didn't want to rely on polling when I knew the modem should work without this option.
I was ready to give up on this issue, until I happen to come across some hidden device in Windows device manager, specifically, if I went to the 'View' menu in Device Manager, and selected 'View Devices by Container' I happened to find some extra components for the GSM Modem, as below;
These hidden components/modes are not usually hidden if you have the modem in normal mode and not serial mode. Further, in either mode, the components each utilise a com port.
Now, here is where it gets a little interesting. The modem component we had been accessing was technically the correct component that accepts 'all' AT Commands!
The PC UI Component or 'Mode' accepts AT Commands also, but not all of them, as can be found when using Putty, it just gives errors on some of the commands.
From what I understand, the component/mode I was originally using to access the modem was the correct one, but for some reason the SMS notifications do not work correctly when using it with SMS Gateway. As soon as I changed the com port in the plugin to use the hidden PC UI component, the modem started working perfectly including the receiving of messages.
Perhaps someone here knows why, perhaps they can offer a better explanation? Until then, maybe this post will help someone else in a similar position.
One more thing, make sure that power saving in Windows cannot sleep the USB ports, as in;
It's a bit **** that there is zero help on a premium plugin! Perhaps Homeseer should consider having a better Developer > Customer policy, whereby if no support is available, the plugin becomes free!
Comment