Commit Graph

5 Commits

Author SHA1 Message Date
Aleksander Morgado
e956bac47b log: common logging method definition for all testers and helpers 2020-04-08 17:53:42 +02:00
Aleksander Morgado
9bcadea172 log: new object logging support
So that we can provide the specific object id in every log associated
to a given object.
2020-04-08 16:35:08 +02:00
Ben Chan
31655bb5a5 glib: remove invocations of g_type_init()
g_type_init() has been deprecated (and also marked with the attribute
'deprecated') since glib 2.36 as the type system is automatically
initialized. Since the minimum version of glib required by ModemManager
is 2.36, calling g_type_init() isn't necessarily in the ModemManager
code.
2017-02-03 10:05:14 +01:00
Aleksander Morgado
ffde429843 core: use G_SOURCE_REMOVE and G_SOURCE_CONTINUE in GSourceFuncs 2015-12-02 17:07:39 +01:00
Aleksander Morgado
f4ec32e633 test: new 'mmtty' utility
The new tester allows to play with the AT-capable TTY using the same code as
ModemManager itself.

    $ sudo ./test/mmtty -d /dev/ttyHS0 --verbose
    opening serial port '/dev/ttyHS0'...
    (ttyHS0) opening serial port...
    (ttyHS0): port attributes not fully set
    (ttyHS0) device open count is 1 (open)
    flashing serial port '/dev/ttyHS0'...
    ready
    > AT+GCAP
    (ttyHS0): --> 'AT+GCAP<LF><CR>'
    (ttyHS0): <-- '<CR><LF>+GCAP: +CGSM,+DS,+ES<CR><LF><CR><LF>OK<CR><LF>'
    +GCAP: +CGSM,+DS,+ES
    > AT+GMI
    (ttyHS0): --> 'AT+GMI<LF><CR>'
    (ttyHS0): <-- '<CR><LF>Option N.V.<CR><LF><CR><LF>OK<CR><LF>'
    Option N.V.
    > ^C

    cancelling the main loop...

    (ttyHS0) device open count is 0 (close)
    (ttyHS0) closing serial port...
    (ttyHS0) serial port closed
    (ttyHS0) forced to close port
2015-02-11 19:58:12 +01:00