05.01.2017, 09:45
Hi everybody,
What is library to make a CALL via USB GSM???
I use Huawei E173 modem
I found a library for messaging sms in comfuncion:
This library to make SMS over GSM USB
Thank all,
"
---Function SMS --------
AT = {
-- 7-bit alphabet
alphabet = {
64, 163, 36, 165, 232, 233, 249, 236, 242, 199, 10, 216, 248,
13, 197, 229, 10, 95, 10, 10, 10, 10, 10, 10, 10, 10, 10, 38,
198, 230, 223, 201, 32, 33, 34, 35, 164, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
57, 58, 59, 60, 61, 62, 63, 161, 65, 66, 67, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
87, 88, 89, 90, 196, 214, 209, 220, 167, 191, 97, 98, 99, 100,
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 228, 246,
241, 252, 224
},
parsepdu = function(pdu)
local data, len, msg, data, sender, offset, ntype, timestamp
msg = {}
-- offset from service center number
offset = tonumber(pduub(1, 2), 16) * 2
-- sender number length
len = tonumber(pduub(offset + 5, offset + 6), 16)
len = math.ceil(len / 2) * 2
-- sender number type
ntype = tonumber(pduub(offset + 7, offset + 8), 16)
ntype = bit.band(bit.rshift(ntype, 4), 0x07)
-- raw sender number
sender = pduub(offset + 9, offset + len + 8)
-- decode sender number
msg.sender = AT.decodesender(sender, ntype)
-- timestamp
offset = offset + len + 13
timestamp = pduub(offset, offset + 13)
timestamp = AT.decodeswapped(timestamp)
msg.timestamp = AT.decodetime(timestamp)
-- message
len = tonumber(pduub(offset + 14, offset + 15), 16)
data = pduub(offset + 16)
msg.data = AT.decode7bit(data, len)
...................................
"""""
What is library to make a CALL via USB GSM???
I use Huawei E173 modem
I found a library for messaging sms in comfuncion:
This library to make SMS over GSM USB
Thank all,
"
---Function SMS --------
AT = {
-- 7-bit alphabet
alphabet = {
64, 163, 36, 165, 232, 233, 249, 236, 242, 199, 10, 216, 248,
13, 197, 229, 10, 95, 10, 10, 10, 10, 10, 10, 10, 10, 10, 38,
198, 230, 223, 201, 32, 33, 34, 35, 164, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
57, 58, 59, 60, 61, 62, 63, 161, 65, 66, 67, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
87, 88, 89, 90, 196, 214, 209, 220, 167, 191, 97, 98, 99, 100,
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 228, 246,
241, 252, 224
},
parsepdu = function(pdu)
local data, len, msg, data, sender, offset, ntype, timestamp
msg = {}
-- offset from service center number
offset = tonumber(pduub(1, 2), 16) * 2
-- sender number length
len = tonumber(pduub(offset + 5, offset + 6), 16)
len = math.ceil(len / 2) * 2
-- sender number type
ntype = tonumber(pduub(offset + 7, offset + 8), 16)
ntype = bit.band(bit.rshift(ntype, 4), 0x07)
-- raw sender number
sender = pduub(offset + 9, offset + len + 8)
-- decode sender number
msg.sender = AT.decodesender(sender, ntype)
-- timestamp
offset = offset + len + 13
timestamp = pduub(offset, offset + 13)
timestamp = AT.decodeswapped(timestamp)
msg.timestamp = AT.decodetime(timestamp)
-- message
len = tonumber(pduub(offset + 14, offset + 15), 16)
data = pduub(offset + 16)
msg.data = AT.decode7bit(data, len)
...................................
"""""