You can use HTTP (remote services) for communication and use an event script with object that has 255 byte string data type to pass the whole message. To make requests from SMS side you can install LuaSocket package.
I mean you need to install Lua and LuaSocket on SMS handler side.
Basically, you need to send an internal KNX telegram on LM from SMS handler side. You can do this by using remote services and calling a simple HTTP request: http://openrb.com/docs/remote.htm
Ah, I thought way to far! So I send http requests from the SMS-Linux Box. Sounds very logical.
I first thought that the Raspberry simply does the raw processing, i.e. sending and receiving messages. All scripting within the LM3 environment in order to have all scripts in one place, i.e. when editing group addresses in ETS4 I would just need to adapt things in the LM3 and its scripts without having to edit scripts on the Raspberry Pi as well. But at last it is probably better to have the SMS handling completely on the Raspberry and therefore it's own environment.
Thanks a lot for your support, will try to get this all running as soon as all hardware has arrived!
21.05.2016, 18:58 (This post was last modified: 21.05.2016, 19:11 by zoltan.)
It's an old thread, but the question belongs here.
Using the scripts from previous page I made a configuration with Huawei modem, and it works on the test system.
Now, the modem, powered USB hub and it's power supply are moved to the remote site, with the only difference in SIM card. And it won't work!
The setup is exactly the same, same HW/SW, known working modem and USB hub+cables. The SIM card is brand new, activated+PIN disabled, tested working/can send SMS from phone and make calls. The modem is unlocked, and the SIM is the same carrier as the modem (was before unlocking).
Yes, I've used the description and files from post #3 in this thread.
I did some additional testing today (I have restricted access to the site, by navigating a non-technical person by phone), and it looks like the USB hub may be the source of the problem. The Raspberry Pi community have a long list of problematic USB hubs, some of them dropping ports when high power device is attached.
I have this installed, and from description it could be problematic. Anyway, I have to wait until tomorrow to test it further.
22.05.2016, 18:19 (This post was last modified: 22.05.2016, 18:38 by zoltan.)
Problem solved (part)!
After changing to another USB hub the modem is working reliably for now, without errors. The working model is HAMA 78472 USB 2.0 HUB 1:4.
Code:
May 22 19:30:26 homeLYnk user.notice usb-modeswitch: 1-1.4:1.5: Manufacturer=HUAWEI Product=HUAWEI_Mobile Serial=?
May 22 19:30:25 homeLYnk user.notice usb-modeswitch: 1-1.4:1.4: Manufacturer=HUAWEI Product=HUAWEI_Mobile Serial=?
May 22 19:30:25 homeLYnk user.notice usb-modeswitch: 1-1.4:1.3: Manufacturer=HUAWEI Product=HUAWEI_Mobile Serial=?
May 22 19:30:25 homeLYnk user.notice usb-modeswitch: 1-1.4:1.2: Manufacturer=HUAWEI Product=HUAWEI_Mobile Serial=?
May 22 19:30:24 homeLYnk user.notice usb-modeswitch: 1-1.4:1.1: Manufacturer=HUAWEI Product=HUAWEI_Mobile Serial=?
May 22 19:30:24 homeLYnk user.notice usb-modeswitch: 1-1.4:1.0: Manufacturer=HUAWEI Product=HUAWEI_Mobile Serial=?
May 22 19:30:24 homeLYnk user.notice usb-modeswitch: 1-1:1.0: Manufacturer=? Product=USB_2.0_Hub Serial=?
May 22 19:30:23 homeLYnk kern.notice kernel: [ 861.445516] sd 13:0:0:0: [sda] Attached SCSI removable disk
May 22 19:30:23 homeLYnk kern.notice kernel: [ 861.431609] scsi 13:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
May 22 19:30:23 homeLYnk kern.notice kernel: [ 861.425653] scsi 12:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.424813] scsi13 : usb-storage 1-1.4:1.5
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.424229] usb-storage 1-1.4:1.5: USB Mass Storage device detected
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.419922] scsi12 : usb-storage 1-1.4:1.4
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.419368] usb-storage 1-1.4:1.4: USB Mass Storage device detected
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.418014] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB2
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.415026] option 1-1.4:1.3: GSM modem (1-port) converter detected
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.413376] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB1
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.410076] option 1-1.4:1.2: GSM modem (1-port) converter detected
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.406802] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB0
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.403886] option 1-1.4:1.0: GSM modem (1-port) converter detected
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.397314] usb 1-1.4: Manufacturer: HUAWEI
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.397283] usb 1-1.4: Product: HUAWEI Mobile
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.397243] usb 1-1.4: New USB device strings: Mfr=3, Product=2, SerialNumber=0
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.397173] usb 1-1.4: New USB device found, idVendor=12d1, idProduct=1506
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.392167] usb 1-1.4: not running at top speed; connect to a high speed hub
May 22 19:30:22 homeLYnk kern.info kernel: [ 860.287213] usb 1-1.4: new full-speed USB device number 17 using ci_hdrc
May 22 19:30:22 homeLYnk kern.info kernel: [ 859.992616] hub 1-1:1.0: 4 ports detected
May 22 19:30:22 homeLYnk kern.info kernel: [ 859.990046] hub 1-1:1.0: USB hub found
May 22 19:30:22 homeLYnk kern.info kernel: [ 859.987330] usb 1-1: Product: USB 2.0 Hub
May 22 19:30:22 homeLYnk kern.info kernel: [ 859.987289] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
May 22 19:30:22 homeLYnk kern.info kernel: [ 859.987220] usb 1-1: New USB device found, idVendor=1a40, idProduct=0101
May 22 19:30:22 homeLYnk kern.info kernel: [ 859.983180] usb 1-1: not running at top speed; connect to a high speed hub
May 22 19:30:22 homeLYnk kern.info kernel: [ 859.850658] usb 1-1: new full-speed USB device number 16 using ci_hdrc
The other thing I found is that the modem will refuse to send a message if it contains some localized characters (čćšđž). Doesn't matter if it is only one character in the message or up to 70, if a single special character is in it won't send it. Edit: that's how it is configured at the beginning of the user.sms.lua script.
I'm actively searching for a solution, but at least it works now.
(26.06.2016, 16:22)ferrim Wrote: I have verified that using an external USB power injector the LM3 Re:actor takes power through the USB port and this does not seem a good practice.
(27.06.2016, 14:52)admin Wrote: Additional capacitors for 5V supply might work. But are you actually having any disconnects? These measures are optional and are not needed usually.
With Huawei USB sticks I've never seen a disconnect while with the cheap ones sometimes is happened during SMS receiving or transmitting.
From a few hours I'm trying the USB-CAP Olimex adapter and seems to work well...
Regards,
Marcello
(27.06.2016, 14:52)quản trị Wrote: Additional capacitors for 5V supply might work. But are you actually having any disconnects? These measures are optional and are not needed usually.
With Huawei USB sticks I've never seen a disconnect while with the cheap ones sometimes is happened during SMS receiving or transmitting.
From a few hours I'm trying the USB-CAP Olimex adapter and seems to work well...
Regards,
Marcello
Hi every one.
I'm using LM3 reactor are using sim 3g modem to send SMS but I encountered this phenomenon hope everyone help.
When using the LM message " SMS handler lost connection" according to attachments .
When converting " comport = ' ttyUSB0 ' " to " comport = ' ttyUSB2 ' " or " comport = ' ttyUSB1 " then turn off again " Script " the normal message .
I connected my modem to LM5 USB port. SMS sending is working, but I cannot start working SMS receiving with command from my phone. What to check? In script I found "allowed numbers". I tried different formats - just phone number, phone number and country prefix and also +371 and number, it doesn''t help.
May be I should add something else to my scripts??
Maybe you have to use another serial port (comport = 'ttyUSBX' line where X is port number). Some modems have several of them for AT commands but only one works for receiving.
Hello, is there a Possibility to send an sms Notification with this script without a GSM Modem and us a API SMS Platform instead? And which Platform is working good?