Logic Machine Forum
What is library to make a CALL via USB GSM??? - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: What is library to make a CALL via USB GSM??? (/showthread.php?tid=540)



What is library to make a CALL via USB GSM??? - Hoang189 - 05.01.2017

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(pduConfusedub(1, 2), 16) * 2
    -- sender number length
    len = tonumber(pduConfusedub(offset + 5, offset + 6), 16)
    len = math.ceil(len / 2) * 2
    -- sender number type
    ntype = tonumber(pduConfusedub(offset + 7, offset + 8), 16)
    ntype = bit.band(bit.rshift(ntype, 4), 0x07)
    -- raw sender number
    sender = pduConfusedub(offset + 9, offset + len + 8)
    -- decode sender number
    msg.sender = AT.decodesender(sender, ntype)
    -- timestamp
    offset = offset + len + 13
    timestamp = pduConfusedub(offset, offset + 13)
    timestamp = AT.decodeswapped(timestamp)
    msg.timestamp = AT.decodetime(timestamp)

    -- message
    len = tonumber(pduConfusedub(offset + 14, offset + 15), 16)
    data = pduConfusedub(offset + 16)
    msg.data = AT.decode7bit(data, len)


  
...................................


"""""