Git question - finding a commit in the history
I've been building for a few months on a particular git commit (3e15dc15efd118a2e7af8f60727afc7fbb7db3a3). I'm planning to try out the latest Master - hopefully in readiness of a tagged release occurring soon. In case I encounter 'brokenness' on my system, and need to track through logs, is there an easy way to find this commit? (I should have added a comment into my config file at the time!) Thanks ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Equipment info without SIM installed
I'd like to be able to get the h/w info without a SIM installed, but this seems to cause modem_load_current_capabilities() to fail (because "AT_CPIN?" errors). Hence the initialization overall fails. I haven't yet sussed out exactly which piece of code is catching the error (when other commands in 'capabilities' also error), but I'm wondering initially whether/why there's a need for "CPIN?" at this stage? ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
SMS get_data() with binary PDU
This may be a python question rather than MM (!) but if a PDU SMS message contains the data DEADBEEF then I see 'get_data()[1]' give a value of 4. But how to extract the data bytes? ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Received SMS with python
I came across an old example (get-sms.py) using dbus, but are there any examples via gi/Glib for reading and deleting received SMSs (and any events that can be hooked for catching the reception)? I'm guessing the ModemMessaging class is the starting point? Then, in the Sms class, when would be the times to use the 'dup_' functions instead of 'get_'? Thanks ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Watching for registration with python
I've been having a look at the modem-watcher-python example, and would like to do something similar - namely wait until the modem has registered on the network and then grab the MCC/MNC. Is there some sort of event I can hook for this (similar to what the example does with ' object-added'), or do I just need to poll? Thanks ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Received SMS and where they'll be stored
I'm re-exploring what happens through MM with received SMS - and could do with some clarification on how it all interacts (modem vs. MM). # mmcli -m 0 --messaging-status /org/freedesktop/ModemManager1/Modem/0 Messaging | supported storages: 'me, sm' |default storage: 'me' I'm currently in a situation where I have (as shown by mmcli --messaging-list-sms) four messages in ME storage - this is the max number the modem's ME can hold. (I also, from some playing about in the past, have a few messages in SM). When I send it a new message, it doesn't seem to be getting delivered. I haven't dug into any info available from delivery reports etc, but basically there's no +CMTI occurring. Because, I assume, ME is full. Then I delete one of the msgs in ME, and a while later the new msg arrives - again going into ME. So I'm wondering how to avoid (or at least give time to cater for) the ME storage filling up. Presumably (?) the SIM is going to be capable of storing more than 4 msgs, so it would seem wise to select SM storage for received msgs instead of ME. Is this something that can be controlled through MM, or is it more a case of having to set it 'manually' in the modem itself and MM then just gets what it gets? ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Longer BEARER_CONNECTION_MONITOR_TIMEOUT?
I've been finding today that I'm getting failed connection attempts - it looks like MM is checking the PDP ("+CGDACT?") whilst ppp/modem are still in the process of getting themselves together. So MM is getting back an 'inactive' response and, I think ditching the attempt. I've increased BEARER_CONNECTION_MONITOR_TIMEOUT and that seems to address it. Not sure if the time taken is down to the Operator or to signal quality (which isn't great here), but wondered if it was a situation other people encounter? ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Passing Operator to NetworkManager
I'm hooking together ModemManager and NetworkManager (without systemd) and would like to grab the Operator determined by MM when it enables the modem and use it to set the apn setting in the NM connection. Basically - the NM setting needs to get configured automatically based on the SIM that's present. Is it possible to get a point in the interractions between the two where this can be done, or has, e.g. NM already parsed the connection settings by the time the modem registers? (To cater for the case of the registration failing, I guess I could pull the info from the SIM instead). And is there some sort of pre/post 'hook' which could be used to fire off a script? ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
PPP modem differences
I know this might not be an issue with MM, but as there's also a lot of modem-savvy people here.. :) I've got the same system trying to make a ppp connection via MM. I'm using the same SIM card, and running mmcli -m 0 --simple-connect="apn=mobile.o2.co.uk" pppd nodetach call provider On one modem, it works fine. But on the other, it doesn't [though it has done, with some permutation of versions, in the recent past] The MM logs seem sensible and equivalent, but there are strange differences in the ppp logs: sent [LCP ConfReq id=0x1] rcvd [LCP ConfReq id=0x1] sent [LCP ConfAck id=0x1] rcvd [LCP ConfAck id=0x1] kernel does not support PPP filtering sent [CCP ConfReq id=0x1] sent [IPCP ConfReq id=0x1 ] rcvd [LCP ProtRej id=0x2 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15] Protocol-Reject for 'Compression Control Protocol' (0x80fd) received sent [IPCP ConfReq id=0x1 ] rcvd [IPCP ConfReq id=0x1] sent [IPCP ConfNak id=0x1 ] rcvd [IPCP ConfNak id=0x1 ] sent [IPCP ConfReq id=0x2 ] rcvd [IPCP ConfReq id=0x2 ] sent [IPCP ConfAck id=0x2 ] rcvd [IPCP ConfAck id=0x2 ] not replacing default route to eth0 [192.168.100.1] local IP address 10.232.128.88 remote IP address 10.232.128.88 primary DNS address 10.203.128.1 secondary DNS address 10.203.128.1 sent [LCP ConfReq id=0x1] rcvd [LCP ConfNak id=0x1 ] sent [LCP ConfReq id=0x2 ] rcvd [LCP ConfAck id=0x2 ] rcvd [LCP ConfReq id=0x3 ] No auth is possible sent [LCP ConfRej id=0x3 ] rcvd [LCP ConfReq id=0x5 ] No auth is possible sent [LCP ConfRej id=0x5 ] rcvd [LCP ConfReq id=0x7] sent [LCP ConfAck id=0x7] kernel does not support PPP filtering sent [CCP ConfReq id=0x1 ] sent [IPCP ConfReq id=0x1 ] rcvd [LCP ProtRej id=0x8 80 fd 01 01 00 0f 1a 04] Protocol-Reject for 'Compression Control Protocol' (0x80fd) received rcvd [LCP TermReq id=0x9] LCP terminated by peer sent [LCP TermAck id=0x9] rcvd [LCP TermReq id=0x9] sent [LCP TermAck id=0x9] Connection terminated. Modem hangup I'm puzzled why, with the same software and SIM/provider/APN, the non-working modem is a) receiving a "LCP ConfNak id=0x1 ]", when the working one gets an Ack to the same Req b) receiving a "LCP ConfReq id=0x3 " - or indeed why it's *receiving* a ConfReq at all. Are there characteristics in the modem which could alter how MM behaves? (Or what the local and remote ppp's are sending/negotiating) Any expertise welcome! ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Integration into NetworkManager
So I've got a [reasonably?] sorted MM setup now - a mux driver providing two virtual ports: ttyMux0 (PPP) and ttyMux1 (Primary). I'm now wanting to hook the former into NetworkManager. >From a fresh rootfs/boot-up, 'nmcli dev status' lists DEVICE TYPE STATE CONNECTION eth0 ethernet connected Wired connection 1 ttyMux1 gsm disconnected -- lo loopback unmanaged -- I'm not sure why/where it's picking up ttyMux1, and in any case I need it to be using ttyMux0 instead. Where's this hooking in from? (Also struggling to create an NM connection - via nmcli - that it'll want to play with on that device... tips gratefully received..!) ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Unexpected COPS format
I'm reviewing the info fetched on my modems, and one of them is giving an unusual format for "AT+COPS=3,2;+COPS?" : +COPS: 0,2,"00320033003400310035",0 This seems to be some sort of 'wide char' hex representation of "23415" [which is what I'd expect]. The modem's AT spec doesn't say anything about it coming back in the form, but I just wondered if it was a format anyone had encountered elsewhere? ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Own number
Is there anything in MM which attempts to fetch the modem's own phone number? I see a line for it in 'mmcli -m 0', but unsure where it could/would/might obtain this (seems to be somewhere in the 'libmm' stuff?). ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Cinterion 'simstatus'
The Cinterion plugin, when initialising a modem, does 20 tries of AT^SIND="simstatus" (after_sim_unlock_context_step). This isn't supported by my modems - but there may well be an alternative command which could be used. However I'm not sure what it's *actually* trying to check for? ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Parsing Cinterion RadioBand
I'm using the Cinterion plugin on an EHS5. This does include 'Radio Band' in its response to 'AT^SCFG=?', but in a format that mm_cinterion_parse_scfg_test () may not be able to parse? ^SCFG: "Radio/Band",("1"-"147") (Which I take to probably mean any bitmask from 1 to 128+16+2+1) ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
glib-mkenums error for ublox plugin
On latest master I'm getting a build error for the glib-mkenums step for the ublox plugin: make[2]: Entering directory `/home/colin/100051 /fsl-community-bsp/build_sysv/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueab i/modemmanager/1.8-r0/build/plugins' glib-mkenums \ --fhead "#include \"mm-modem-helpers-ublox.h\"\n#ifndef __MM_UBLOX_ENUMS_TYPES_H__\n#define __MM_UBLOX_ENUMS_TYPES_H__\n" \ --template /home/colin/100051/fsl-community-bsp/build_sysv/tmp/work/cortexa9hf-vfp-neon -poky-linux-gnueabi/modemmanager/1.8-r0/git/build-aux/mm-enums-template.h \ --ftail "#endif /* __MM_UBLOX_ENUMS_TYPES_H__ */\n" \ /home/colin/100051/fsl-community-bsp/build_sysv/tmp/work/cortexa9hf-vfp-neon -poky-linux-gnueabi/modemmanager/1.8-r0/git/plugins/ublox/mm-modem-helpers-u blox.h > ublox/mm-ublox-enums-types.h -bash: ublox/mm-ublox-enums-types.h: No such file or directory I guess this is probably because yocto/bitbake is doing an out-of-tree build - i.e. the problem seems to be that the ublox sub-directory doesn't (yet) exist in the build directory. If I manually create it then I can re-do the build without further errors. It does look though like other glib-mkenums have succeeded - but perhaps because earlier build steps have created the relevant directory e.g. build/src. ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
ABOUT-NLS missing?
Just updated my env setup to the latest master (git://anongit.freedesktop.org/ModemManager/ModemManager), but configure is giving an error: configure.ac:86: error: required file './ABOUT-NLS' not found Am I missing a bootstrap/configure step or option? (I'm building within Yocto, btw, but the same recipe was ok from a 1.6.4 tarball - the file seems to be in the tarball but isn't now being git-fetched) ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
RE: Handling received SMS
All I'm seeing in the logs is "+CIEV: message,1". Checking back through the logs for unsolicited event setups, I also see [src/mm-broadband-modem.c:5888] set_messaging_unsolicited_events_handlers(): (ttyMux0) Setting messaging unsolicited events handlers [src/mm-port-serial.c:1347] _close_internal(): (ttyMux0) device open count is 1 (close) [src/mm-iface-modem-messaging.c:867] enable_unsolicited_events_ready(): Couldn't enable unsolicited events: 'SMS settings don't accept [2,1] ' That inner error message seems to originate in the Cinterion plugin's messaging_enable_unsolicited_events (). From what I can make out, that function is looking for a supported mode in the response to "AT+CNMI=?". Doing this from the command line gives the response " +CNMI: (0-3),(0,1),(0,2,3),(0,2),(1) ". Furthermore a "AT+CNMI=2" also from the command line - which I think the plugin would have otherwise tried to do if it had found the mode - does give an OK response. But I think I need to switch back to the Generic plugin, for simplicity, and see how that behaves. I have though already seen some incompatibilities which I'll need to address - and these may be related to this problem. E.g. a parameter used for 'AT+CMER=3,0,0,1 ; and also param value problems with 'AT+CNMI=2,1,2,1,0'. In the case of the latter, the code looks like it is written to have 3 forms of this command to try - cnmi_sequence[] - but although my modem fails the first " +CMS ERROR: 500 ", the other two aren't then tried instead? -Original Message- From: ModemManager-devel [mailto:modemmanager-devel-boun...@lists.freedesktop.org] On Behalf Of Aleksander Morgado Sent: 10 February 2017 17:49 To: colin.helliw...@ln-systems.com Cc: ModemManager (development)Subject: Re: Handling received SMS On Fri, Feb 10, 2017 at 3:40 PM, wrote: > I’m digging into SMS reception, and trying understand how MM deals with it. > > I can see that it/mmcli reads the messages when the modem is enabled. > When a new SMS is then received, I can see the modem sending a “+CIEV: > message,1” > [but only the first time, if the first message isn’t then read?]. > > I kind of expected/hoped MM would then fetch the message out and > update its internal list, but it doesn’t seem to. Nor does mmcli have > an option to re-read SMS’s from the modem? > > Is there this facility in the library, if not in mmcli, and/or am I > missing something? MM should be updating its internal list on every received SMS; if it's not doing that please grab debug logs while reproducing the issue and we'll try to see why. -- Aleksander https://aleksander.es ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Cinterion plugin (in)compatibilities
For simplicity, I'd begun my exploration of MM using the Generic plugin. My design has a choice of two Cinterion modems (BGS2 and EHS5), though they don't have much of the functionality supported by the Cinterion plugin such as GPS. But because of one command incompatibility (CMER) with the Generic, I decided to try the Cinterion plugin. This addresses the CMER issue, but throws up more incompatibilities due to differing versions of Cinterion commands sets. If Generic turns out to be the closest fit then I could just patch it as needed. But I also wondered if there's a key Maintainer of the Cinterion plugin who might like to discuss what I've found with a view to incorporating the variations somehow? Or I could patch the plugin. Or I could generate *another* Cinterion plugin.. ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Handling received SMS
I'm digging into SMS reception, and trying understand how MM deals with it. I can see that it/mmcli reads the messages when the modem is enabled. When a new SMS is then received, I can see the modem sending a "+CIEV: message,1" [but only the first time, if the first message isn't then read?]. I kind of expected/hoped MM would then fetch the message out and update its internal list, but it doesn't seem to. Nor does mmcli have an option to re-read SMS's from the modem? Is there this facility in the library, if not in mmcli, and/or am I missing something? ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Modem creation/startup order
I've got two ports whitelisted for use by MM. What determines which one of them will be 'Modem/0' ? Is there a way to get MM to create/initialise 0 first, then 1 - as opposed to doing both in *parallel*? I'm getting MM to use the Cinterion plugin for my modem, by adding ENV{ID_MM_PLATFORM_DRIVER_PROBE}="1", ENV{ID_VENDOR_ID}="0x1e2d", ENV{ID_MODEL_ID}="0x0001" to the udev rule (the port is a tty); together with mods to the plugin code, to set its MM_PLUGIN_ALLOWED_DRIVERS to the modem's driver name. However it's also deciding to also try 3 other plugins (as well as Generic) - Via, Iridium, Nokia. It's not a major problem because it does try Cinterion first, and decide it's the best one. But why the other candidates? ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Top-level (ppp) connection management over MM
One thing I've picked up whilst reading about MM is that although it can set the modem into data mode, it doesn't take care of any of the PPP side of things - this is the responsibility of 'elsewhere'? I'm trying to figure out whether there's anything off-the-shelf that can be used for this role? Presumably something that has the ability to control & monitor pppd, and also able to control and monitor the modem via MM. Should I be looking to use MM with something like NetworkManager, or other [write my own]? (I did look at Connman but that appears to need oFono, which I've found to be near-unusably undocumented - I suspect Intel open source the code, but not their docs..) This is a headless system (is NetworkManager 'usable' like this?); the 3G ppp link is needed to be brought up/down depending on other system criteria e.g. if the Ethernet's broadband router, or even the ISP, falls over. I'd like something as light n simple as possible, albeit the system has udev, DBus and probably systemd. Any recommendations.? Ta! ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
RE: Fetching signal quality during data connection?
Oh - scratch that. it found it after a reboot. Must've not reloaded rules properly.. -Original Message- From: Colin Helliwell (colin.helliw...@ln-systems.com) [mailto:colin.helliw...@ln-systems.com] Sent: 03 February 2017 13:36 To: 'ModemManager (development)'Subject: RE: Fetching signal quality during data connection? So I'll try removing that and talking direct to the real serial port. Trouble is. I can't get the udev rules right to get it 'whitlisted'... Can someone walk me through this please? udev is showing ttymxc2's DEVPATH as /devices/soc0/soc/210.aips-bus/21ec000.serial/tty/ttymxc2 ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
RE: Fetching signal quality during data connection?
Aside from the questions over disconnect and/or powering off the hardware in my mux driver, I want to step back a bit and dig into what's happening when the modem is timing out of Data Mode but MM is apparently not realising. I want to try to see the NO CARRIER that I see when playing with a terminal app. After all, unless I can't get things to behave right in a failure condition then there's no point in [for a robust solution] fixing the 'good' condition! I've not yet been able to establish how the modem really behaves, but it may be a complication of the mux driver that I'm using MM on. So I'll try removing that and talking direct to the real serial port. Trouble is. I can't get the udev rules right to get it 'whitlisted'... Can someone walk me through this please? udev is showing ttymxc2's DEVPATH as /devices/soc0/soc/210.aips-bus/21ec000.serial/tty/ttymxc2 In the rules I have KERNEL=="ttymxc2", ENV{SYSTEMD_WANTS}="ModemManager.service" ENV{ID_MM_CANDIDATE}="1" ACTION=="add" KERNEL=="21ec000.serial", ENV{SYSTEMD_WANTS}="ModemManager.service" ENV{ID_MM_CANDIDATE}="1" ENV{ID_MM_PLATFORM_DRIVER_PROBE}="1" I've reloaded the rules, and restart MM, but no joy with it being seen as whitelisted. -Original Message- From: ModemManager-devel [mailto:modemmanager-devel-boun...@lists.freedesktop.org] On Behalf Of Aleksander Morgado Sent: 26 January 2017 13:54 To: colin.helliw...@ln-systems.com Cc: ModemManager (development)Subject: Re: Fetching signal quality during data connection? > Regarding the failing PPP: > Your enhancement probably to prevent a race is still a good idea in general. > However I've now experimented manually (with a terminal app), and I don't > think it is the Sig Quality which is breaking PPP. What I was actually doing > was waiting so long before starting PPP that the *modem* is timing out - > after the ATD it sends back 'hex' messages (presumably some sort of LCP > request) a number of times, and then eventually times out and sends 'NO > CARRIER'. This timeout also happens to be 30secs. > I haven't found any 'ETSI' spec which defines a timeout from data mode, and > nor is one mentioned in my modem's docs. However I did find a uBlox manual > which states different negotiation/timeout sequences for their different > modems > (https://www.u-blox.com/sites/default/files/u-blox-ATCommands_Manual_(UBX-13002752).pdf > , para 18.2). So maybe this behaviour is always manufacturer-specific. > It would though be better if MM caught the 'NO CARRIER' and set the state > back to disconnected? MM should already be catching the NO CARRIER errors; could you gather debug logs while reproducing this to see why it didn't catch it? -- Aleksander https://aleksander.es ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
RE: Fetching signal quality during data connection?
Odd though that the signal quality doesn't work again until I '--disconnect'. Testing from a terminal app it seemed to re-respond to this as soon as the timeout/'NO CARRIER' occurs. It may be that MM is sending some other config commands that I hadn't done in my simple experiment? (Another thing I've noticed: the '--disconnect' appears to close the tty before re-opening and carrying on. I expected that only a '--disable' would do this. I can detect this because my mux driver, when no ports are open anymore, powers down the modem. Hence any volatile config MM thinks it has done might actually have been lost? Not sure whether this might cause other problems later...) -Original Message- From: ModemManager-devel [mailto:modemmanager-devel-boun...@lists.freedesktop.org] On Behalf Of colin.helliw...@ln-systems.com Sent: 26 January 2017 15:22 To: 'Aleksander Morgado'Cc: 'ModemManager (development)' Subject: RE: Fetching signal quality during data connection? Log as follows (--debug --log-level=DEBUG). '--connect' done many minutes after the '--enable' and '--create-bearer' ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
RE: Fetching signal quality during data connection?
Log as follows (--debug --log-level=DEBUG). '--connect' done many minutes after the '--enable' and '--create-bearer' I can rebuild, if you'd like me to add in any further debug messages. Jan 26 15:15:54 wg2xx-tx6s daemon.info ModemManager[867]: [1485443754.457980] [src/mm-broadband-modem.c:2003] modem_load_signal_quality(): loading signal quality... Jan 26 15:15:54 wg2xx-tx6s daemon.info ModemManager[867]: [1485443754.458270] [src/mm-port-serial.c:1290] mm_port_serial_open(): (ttyMux0) device open count is 2 (open) Jan 26 15:15:54 wg2xx-tx6s daemon.info ModemManager[867]: [1485443754.458657] [src/mm-port-serial-at.c:459] debug_log(): (ttyMux0): --> 'AT+CIND?' Jan 26 15:15:54 wg2xx-tx6s daemon.info ModemManager[867]: [1485443754.532816] [src/mm-port-serial-at.c:459] debug_log(): (ttyMux0): <-- '+CIND: 5,99,1,0,0,0,0,0,2OK' Jan 26 15:15:54 wg2xx-tx6s daemon.info ModemManager[867]: [1485443754.533657] [src/mm-port-serial.c:1290] mm_port_serial_open(): (ttyMux0) device open count is 3 (open) Jan 26 15:15:54 wg2xx-tx6s daemon.info ModemManager[867]: [1485443754.534053] [src/mm-port-serial.c:1347] _close_internal(): (ttyMux0) device open count is 2 (close) Jan 26 15:15:54 wg2xx-tx6s daemon.info ModemManager[867]: [1485443754.534426] [src/mm-port-serial-at.c:459] debug_log(): (ttyMux0): --> 'AT+CSQ' Jan 26 15:15:54 wg2xx-tx6s daemon.info ModemManager[867]: [1485443754.577412] [src/mm-port-serial-at.c:459] debug_log(): (ttyMux0): <-- '+CSQ: 12,99OK' Jan 26 15:15:54 wg2xx-tx6s daemon.info ModemManager[867]: [1485443754.578057] [src/mm-port-serial.c:1347] _close_internal(): (ttyMux0) device open count is 1 (close) Jan 26 15:15:54 wg2xx-tx6s daemon.info ModemManager[867]: [1485443754.578763] [src/mm-iface-modem.c:1204] update_signal_quality(): Modem /org/freedesktop/ModemManager1/Modem/0: signal quality updated (38) Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.658971] [src/mm-base-bearer.c:703] mm_base_bearer_connect(): Connecting bearer '/org/freedesktop/ModemManager1/Bearer/0' Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.659290] [src/mm-iface-modem.c:1431] __iface_modem_update_state_internal(): Modem /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> connecting) Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.661237] [src/mm-broadband-bearer.c:1254] connect(): Launching 3GPP connection attempt with APN 'mobile.o2.co.uk' Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.661470] [src/mm-broadband-bearer.c:177] detailed_connect_context_new(): No specific IP family requested, defaulting to ipv4 Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.661577] [src/mm-broadband-bearer.c:1044] connect_3gpp(): Looking for best CID... Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.661740] [src/mm-port-serial.c:1290] mm_port_serial_open(): (ttyMux0) device open count is 2 (open) Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.662078] [src/mm-port-serial-at.c:459] debug_log(): (ttyMux0): --> 'AT+CGDCONT?' Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.719807] [src/mm-port-serial-at.c:459] debug_log(): (ttyMux0): <-- '+CGDCONT: 1,"IP","mobile.o2.co.uk","",0,0OK' Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.720687] [src/mm-broadband-bearer.c:961] parse_pdp_list(): Found '1' PDP contexts Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.720945] [src/mm-broadband-bearer.c:970] parse_pdp_list(): PDP context [cid=1] [type='ipv4'] [apn='mobile.o2.co.uk'] Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.721169] [src/mm-broadband-bearer.c:994] parse_pdp_list(): Found PDP context with CID 1 and PDP type ipv4 for APN 'mobile.o2.co.uk' Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.721445] [src/mm-port-serial.c:1290] mm_port_serial_open(): (ttyMux0) device open count is 3 (open) Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.721664] [src/mm-broadband-bearer.c:214] common_get_at_data_port(): Connection through a plain serial AT port (ttyMux0) Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.721961] [src/mm-port-serial.c:1290] mm_port_serial_open(): (ttyMux0) device open count is 4 (open) Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.722308] [src/mm-port-serial.c:1347] _close_internal(): (ttyMux0) device open count is 3 (close) Jan 26 15:16:00 wg2xx-tx6s daemon.info ModemManager[867]: [1485443760.722678] [src/mm-port-serial-at.c:459] debug_log(): (ttyMux0): --> 'ATD*99***1#' Jan 26 15:16:02 wg2xx-tx6s daemon.info ModemManager[867]: [1485443762.240256] [src/mm-port-serial-at.c:459] debug_log(): (ttyMux0): <-- 'CONNECT~\255}#\192!}!}#} }9}"}&} }*} } }'}"}(}"}%}&\169\152\237.}#}%\194#}%}4\209~' Jan 26 15:16:02
RE: Fetching signal quality during data connection?
Thanks Aleksander. Suppressing the failed signal quality message would be 'nicer'. It would also be helpful (on my system, at least!) to have an api to disable these periodic checks - as I said, my 'device' is actually a 3-channel mux driver, and I plan to use one tty for ppp and one or two of the others for SMS/status etc. So really, I only need signal quality to be fetched from one of them. Regarding the failing PPP: Your enhancement probably to prevent a race is still a good idea in general. However I've now experimented manually (with a terminal app), and I don't think it is the Sig Quality which is breaking PPP. What I was actually doing was waiting so long before starting PPP that the *modem* is timing out - after the ATD it sends back 'hex' messages (presumably some sort of LCP request) a number of times, and then eventually times out and sends 'NO CARRIER'. This timeout also happens to be 30secs. I haven't found any 'ETSI' spec which defines a timeout from data mode, and nor is one mentioned in my modem's docs. However I did find a uBlox manual which states different negotiation/timeout sequences for their different modems (https://www.u-blox.com/sites/default/files/u-blox-ATCommands_Manual_(UBX-13002752).pdf , para 18.2). So maybe this behaviour is always manufacturer-specific. It would though be better if MM caught the 'NO CARRIER' and set the state back to disconnected? -Original Message- From: ModemManager-devel [mailto:modemmanager-devel-boun...@lists.freedesktop.org] On Behalf Of Aleksander Morgado Sent: 25 January 2017 19:40 To: colin.helliw...@ln-systems.com Cc: ModemManager (development)Subject: Re: Fetching signal quality during data connection? On Wed, Jan 25, 2017 at 5:22 PM, wrote: > I have MM essentially running on my hardware, but I’m puzzled by a > part of its behaviour: > > I can enable the modem with mmcli --enable, and in the debug output I > see the signal quality being periodically refreshed. I can also, more > or less, make a connection to the APN with –connect, and then bring up ppp. > > However: > > Once the ‘--connect' has been done, MM can no longer get the signal > quality – “signal_quality_check_ready(): Couldn't refresh signal > quality: 'No AT port available to run command'” > Yes, we don't support to run AT commands on a port flagged as 'connected'. We should just silence that warning if there's a single TTY and the TTY is connected. E.g. reloading signal quality would still work if we have some other control channel to use while being connected. > A more serious problem is that if MM tries to fetch the signal quality > after ‘--connect', but before ppp is started, then the ppp negotiation > subsequently fails (“LCP: timeout sending Config-Requests”). I *can* get > ppp connected as long as I start it before MM next tries to get signal > quality. > > > > In case it’s relevant, the modem is a Cinterion. I’m actually using it > via their ‘linmux’ multiplexor – just on a single virtual port though. > > > > I’m puzzled as to why MM keeps trying to get signal quality after the > data connection – my understanding was that you can’t use [most] AT > commands after this. I may be wrong there, but the info on my modem > says (for > ‘ATD*99#’) – “The V.250 'D' (Dial) command causes the MT to enter the > V.250 online data state and, with the TE, to start the specified layer 2 > protocol. > No further commands may follow on the AT command line” > > > > Can anyone advise? Thanks You say that if the signal quality reload happens before PPP is established, the PPP session fails, that looks like a race condition we can avoid. As soon as we run ATD we should be flagging the port as 'connected'. Looking at the code, it seems that the flagging is done a bit late; we run connect_3gpp() and that async operation runs ATD, but the operation finishes in an idle, which is when we then set the port as connected (looking at mm-broadband-bearer.c:connect_succeeded). This means that there may be a case where an AT command is scheduled to be run before the idle where the flagging is done. So, one thing we should do is to flag the port as connected exactly after ATD is run, being ATD the last command allowed before going into data mode. Opened a new bug to track this issue: https://bugs.freedesktop.org/show_bug.cgi?id=99541 -- Aleksander https://aleksander.es ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Fetching signal quality during data connection?
I have MM essentially running on my hardware, but I'm puzzled by a part of its behaviour: I can enable the modem with mmcli --enable, and in the debug output I see the signal quality being periodically refreshed. I can also, more or less, make a connection to the APN with -connect, and then bring up ppp. However: Once the '--connect' has been done, MM can no longer get the signal quality - "signal_quality_check_ready(): Couldn't refresh signal quality: 'No AT port available to run command'" A more serious problem is that if MM tries to fetch the signal quality after '--connect', but before ppp is started, then the ppp negotiation subsequently fails ("LCP: timeout sending Config-Requests"). I *can* get ppp connected as long as I start it before MM next tries to get signal quality. In case it's relevant, the modem is a Cinterion. I'm actually using it via their 'linmux' multiplexor - just on a single virtual port though. I'm puzzled as to why MM keeps trying to get signal quality after the data connection - my understanding was that you can't use [most] AT commands after this. I may be wrong there, but the info on my modem says (for 'ATD*99#') - "The V.250 'D' (Dial) command causes the MT to enter the V.250 online data state and, with the TE, to start the specified layer 2 protocol. No further commands may follow on the AT command line" Can anyone advise? Thanks ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel