[Freeswitch-users] SIM7100 LTE modem with USB audio

Stanislav Sinyagin ssinyagin at gmail.com
Mon Jul 31 00:43:56 UTC 2017


Greetings,

I started slowly outlining a new module, mod_ttyusb_audio. It will do
a simple task by bridging a channel with a specified /dev/ttyUSBx PCM
flow using a specified codec (All modems that I know use the same L16
at 8kHZ, but who knows what other codecs there might be). As I didn't
yet find a sponsor for this development, it goes quite slowly.

Once it's done, the signaling could be done either within FreeSWITCH,
or in an outside ESL daemon. An external daemon would allow more
flexibility, but there's a burden of running one more process.

In regards to udev rules -- you actually don't need them. The logic of
finding the modem and matching it against IMEI and IMSI is already in
mod_gsmopen (was that Giovanni who implemented it?). It just needs a
bit of improvement in making it more vendor-independent. Also I would
do matching on IMEI OR IMSI, not the AND condition that is in the
module currently.

I actually do have a set of udev rules, they are in fact needed for
data connection:
https://github.com/ssinyagin/wwan_udev_rules
But they fail if you have more than one modem, and here's an explanation:
https://txlab.wordpress.com/2017/05/19/two-lte-modems-with-pc-engines-apu3/

cheers,
stanislav








On Sun, Jul 30, 2017 at 6:08 PM, Tihomir Culjaga <tculjaga at gmail.com> wrote:
> Hi Stanislav, I like the idea!
>
> i'd prefer to have a separate module (not some perl daemon)  tho.
>
> you can instruct udev to run an external program to name devices ( a simple
> rpc to stdout would to great ) . This way you can specify dongles (vendorID,
> productID, interfaceNumber, dongleSerial...) in your module config and let
> your module name the ttys accordingly.
>
> The module should have AT command mappings for preInit, Init, postInit,
> dongle_events ( incoming call, ring,...), basic commands ( answer,
> hangup...) exposed all in config...
>
> This is where it gets ugly (and a bit less secure), but to keep the module
> code sane, its better to expose AT mappings in config.
>
> Once the "signaling" is done, the module should notify mod_portaudio ( a
> fork of ) what audio tty it should sit on for the given call
>
>
> well in theory :=)
> i see a lot of work ahead..
>
>
>
> On 27 July 2017 at 00:41, Stanislav Sinyagin <ssinyagin at gmail.com> wrote:
>>
>> I looked inside gsmopen_protocol.cpp and my eyes hurt. It has so many
>> hardcoded vendor-specific commands, and it does not know the actual
>> vendor that it speaks to. I really don't like adding more bad code
>> here.
>>
>> I'm inclining to have a Perl daemon working the AT commands via the
>> control UART ports, and telling FreeSWITCH take the audio channel from
>> the audio UART port when it's ready. I think mod_portaudio should do
>> the job after minor modifications.
>>
>> Then the AT command handler can be written in a modern and modular
>> fashion, with independent modules for different hardware.
>>
>> Also this way we would open the door for new hardware solutions which
>> are able to send/receive PCM via ttyUSB ports. Then, for example, one
>> may build a hardware phone with it :)
>>
>>
>>
>>
>>
>> On Wed, Jul 26, 2017 at 1:54 AM, Stanislav Sinyagin <ssinyagin at gmail.com>
>> wrote:
>> > I assembled the lab, and will start digging the code tomorrow.
>> >
>> > The modem sends PCM audio via an UART USB device, just like Huawei
>> > dongles
>> > do. So, it looks like only a matter of accommodating to vendor and
>> > product
>> > codes and initialization strings.
>> >
>> >
>> >
>> > On 25 Jul 2017 15:10, "Giovanni Maruzzelli" <gmaruzz at gmail.com> wrote:
>> >>
>> >>
>> >>
>> >> On 23 July 2017 at 10:17, Stanislav Sinyagin <ssinyagin at gmail.com>
>> >> wrote:
>> >>>
>> >>> Hi Giovanni, I only had time to configure it for Internet access:
>> >>>
>> >>> https://txlab.wordpress.com/2017/07/23/simcom-sim7100e-lte-modem/
>> >>>
>> >>> The benefit is mPCIe interface, so it can be placed inside and
>> >>> enclosure.
>> >>> No silly dongles any more :)
>> >>>
>> >>> I'll tinker with voice some time later. I can also provide you SSH
>> >>> access
>> >>> if you wish to work on gsmopen update.
>> >>
>> >>
>> >> Please, let me know if any progress or so.
>> >>
>> >> Will not be so easy to interface audio to it via USB, will need to
>> >> create
>> >> a kernel driver, or use a userspace USB lib and create a user space
>> >> driver.
>> >>
>> >> Happy hacking!
>> >>
>> >> -giovanni
>> >>
>> >>
>> >>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> On 21 Jul 2017 18:36, "Giovanni Maruzzelli" <gmaruzz at gmail.com> wrote:
>> >>>>
>> >>>> Hello Stanislav,
>> >>>>
>> >>>> have you had time to tinker with it?
>> >>>>
>> >>>> How it goes?
>> >>>>
>> >>>> Also, why you would prefer this one instead of the already supported
>> >>>> ones?
>> >>>>
>> >>>> -giovanni
>> >>>>
>> >>>>
>> >>>> On 8 July 2017 at 21:28, Stanislav Sinyagin <ssinyagin at gmail.com>
>> >>>> wrote:
>> >>>>>
>> >>>>> Simcom has recently released a new 4G/LTE modem, and it has USB
>> >>>>> audio
>> >>>>> support.
>> >>>>> You can find sim7100_usb_audio_application_note_v0.01.pdf   with
>> >>>>> details at the vendor site, or at techship.com  after registration.
>> >>>>>
>> >>>>> It transmits 8kHZ, 16-bit PCM audio via a USB UART simulation.
>> >>>>>
>> >>>>> So, in theory, gsmopen module may be adapted to it (or maybe a new
>> >>>>> module is worth starting).
>> >>>>>
>> >>>>> I ordered a sample, will check it out soon.
>> >>>>>
>> >>>>> cheers,
>> >>>>> stanislav
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> _________________________________________________________________________
>> >>>>> Professional FreeSWITCH Consulting Services:
>> >>>>> consulting at freeswitch.org
>> >>>>> http://www.freeswitchsolutions.com
>> >>>>>
>> >>>>> Official FreeSWITCH Sites
>> >>>>> http://www.freeswitch.org
>> >>>>> http://confluence.freeswitch.org
>> >>>>> http://www.cluecon.com
>> >>>>>
>> >>>>> FreeSWITCH-users mailing list
>> >>>>> FreeSWITCH-users at lists.freeswitch.org
>> >>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> >>>>>
>> >>>>>
>> >>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> >>>>> http://www.freeswitch.org
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> --
>> >>>>
>> >>>> Sincerely,
>> >>>>
>> >>>> Giovanni Maruzzelli
>> >>>> OpenTelecom.IT
>> >>>> cell: +39 347 266 56 18
>> >>>>
>> >>>>
>> >>>>
>> >>>> _________________________________________________________________________
>> >>>> Professional FreeSWITCH Consulting Services:
>> >>>> consulting at freeswitch.org
>> >>>> http://www.freeswitchsolutions.com
>> >>>>
>> >>>> Official FreeSWITCH Sites
>> >>>> http://www.freeswitch.org
>> >>>> http://confluence.freeswitch.org
>> >>>> http://www.cluecon.com
>> >>>>
>> >>>> FreeSWITCH-users mailing list
>> >>>> FreeSWITCH-users at lists.freeswitch.org
>> >>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> >>>>
>> >>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> >>>> http://www.freeswitch.org
>> >>>
>> >>>
>> >>>
>> >>> _________________________________________________________________________
>> >>> Professional FreeSWITCH Consulting Services:
>> >>> consulting at freeswitch.org
>> >>> http://www.freeswitchsolutions.com
>> >>>
>> >>> Official FreeSWITCH Sites
>> >>> http://www.freeswitch.org
>> >>> http://confluence.freeswitch.org
>> >>> http://www.cluecon.com
>> >>>
>> >>> FreeSWITCH-users mailing list
>> >>> FreeSWITCH-users at lists.freeswitch.org
>> >>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> >>>
>> >>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> >>> http://www.freeswitch.org
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >>
>> >> Sincerely,
>> >>
>> >> Giovanni Maruzzelli
>> >> OpenTelecom.IT
>> >> cell: +39 347 266 56 18
>> >>
>> >>
>> >> _________________________________________________________________________
>> >> Professional FreeSWITCH Consulting Services:
>> >> consulting at freeswitch.org
>> >> http://www.freeswitchsolutions.com
>> >>
>> >> Official FreeSWITCH Sites
>> >> http://www.freeswitch.org
>> >> http://confluence.freeswitch.org
>> >> http://www.cluecon.com
>> >>
>> >> FreeSWITCH-users mailing list
>> >> FreeSWITCH-users at lists.freeswitch.org
>> >> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> >>
>> >> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> >> http://www.freeswitch.org
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org



More information about the FreeSWITCH-users mailing list