summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/mobile/vty_interface.c
AgeCommit message (Collapse)AuthorFilesLines
2021-03-25mobile/vty: add a command to trigger LURfixeria/researchVadim Yanitskiy1-0/+23
Change-Id: I98ff3fb2611785a897723ea1edca8d8b4b3b5ec2
2021-03-25mobile/vty: add Key Sequence number change commandVadim Yanitskiy1-0/+24
Change-Id: I2400a80c9804159dfe1faa26b84e33776d30a79f
2021-03-25mobile/vty: add IMSI/TMSI clone commandVadim Yanitskiy1-0/+52
Change-Id: I03ff86995199746d86904505b5e78ad4055e607b
2020-05-05mobile: add audio config, with unused audio loopback settingNeels Hofmeyr1-0/+56
The aim is to add configurable audio loopback to mobile. An existing patch on a branch from fixeria [1] adds the audio config section. Add a reduced version of this audio config to be compatible with the future merge. Add the audio loopback setting, so far without functionality. Subsequent patch adds the actual loopback. [1] osmocom-bb branch fixeria/audio, patch "mobile/vty_interface.c: add new 'audio' section" Change-id I62cd5ef22ca2290fcafe65c78537ddbcb39fb8c6 Change-Id: Ie03e4a6c6f81ea3925266dd22e87506d722a6e1a
2019-10-17Fix common misspellings and typosMartin Hauke1-5/+5
Change-Id: I962b42871693f33b1054d43d195817e9cd84bb64
2018-12-26host/layer23: rename GSM_SIM_TYPE_READER to GSM_SIM_TYPE_L1PHYVadim Yanitskiy1-2/+2
Since we have two ways to interact with a physical SIM: - using built-in SIM reader of the L1 PHY (via L1CTL), - using remote reader via (BT)SAP protocol, name 'GSM_SIM_TYPE_READER' looks quite confusing. Let's rename it in order to explicitly indicate the role of L1 PHY. Change-Id: I0f83f365ed50cfd658fdd3a9d6866ed76c8c4009
2018-11-16mobile: add header for MS' MNCC functionsMax1-7/+1
This simplifies adding new functions and re-using them from other parts of the code. Change-Id: Ibad400a99afe052f011f54fc706836b6bf89f4b9
2018-08-11layer23: Replace all instances of strncpy() by osmo_strlcpyHarald Welte1-7/+5
This gives us working/safe zero termination without overflowing the destination string size. Change-Id: Ica6098ceba2bd01ce3b216085442cc5eed0ca507
2018-08-11layer23: Use osmo_strlcpy() to avoid non-terminated stringsHarald Welte1-1/+1
settings.c:191:2: warning: ‘strncpy’ output may be truncated copying 15 bytes from a string of length 15 -Wstringop-truncation] strncpy(set->imeisv, set->imei, 15); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CC subscriber.o CC support.o CC transaction.o CC vty_interface.o CC voice.o CC mncc_sock.o CC primitives.o mncc_sock.c: In function ‘osmo_unixsock_listen’: mncc_sock.c:318:2: warning: ‘strncpy’ specified bound 108 equals destination size [-Wstringop-truncation] strncpy(local.sun_path, path, sizeof(local.sun_path)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CC script_lua.o vty_interface.c: In function ‘cfg_gps_device’: vty_interface.c:1144:2: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation] strncpy(g.device, argv[0], sizeof(g.device)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AR libmobile.a Change-Id: Id52978f3bf7a8abea62237d7c32f8f87e1bb34a1
2018-06-04mobile/sms: Make it optional to store the SMS on diskHolger Hans Peter Freyther1-0/+22
Disable storing the SMS on disk. This is useful when scripting mobile. Keep the default of attempting to store it to disk. Change-Id: I6353447343d98ebaa5e12ab63f995750f81c8500
2018-06-01mobile: Make time spent in c7 configurableHolger Hans Peter Freyther1-0/+18
When no cell was found during the PLMN search the camp on any cell state will be entered. LUs are prevented in this state and it will be left after the start_any_timer has timedout. Even if camping on the home network the state will not be left before the expiry of the timer. For systematic tests this is producing a too high upper bound. Make it configurable so we can succeed with a UL more quickly. Change-Id: I25bc985cd4360d5e37d05a7b16b39eefb75ce20f
2017-12-13mobile/vty_interface.c: fix 'channel-capability' descriptionVadim Yanitskiy1-3/+6
Change-Id: I0c08e071ffaac9b8e7c4af6a7be2bd8125145842
2017-12-03mobile: Add initial support for scripting supportHolger Hans Peter Freyther1-0/+28
Right now the script will be executed once it is loaded. Make sure to write it into the config file last. Expose various log commands for logging. Jump through some hoops and get the filename and line number from lua. Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6
2017-12-03mobile: Move starting/stopping a MS into a separate functionHolger Hans Peter Freyther1-34/+19
Move the check if within the mobile app there is no other active MS using the same L1 socket. This way we can call this function from the primitive code as well. Change-Id: Ib4aa5ff212fa6bead8f620abaecc6a0b51a99fec
2017-11-30mobile: Use enum and not magic value in the VTYHolger Hans Peter Freyther1-1/+1
Change-Id: I8a1d975997e592344327e6b0783bd0c5d2534b02
2017-11-27mobile: Avoid msg_ref going out of syncHolger Hans Peter Freyther1-1/+1
It seemed like msg_ref could go out of sync. In some places we are using sms->msg_ref in other cases we pass it as parameter (e.g. when sending the SMS) or we get it out of the gsm411_rp_hdr. Instead of hardcoding 42 for all messages make it configurable and pass the parameter from the caller. Change-Id: I4bac5f06921b5fd85a98d97770d42d4858ca1c42
2017-11-27mobile: Instead of putting semantic in a comment, use an enumHolger Hans Peter Freyther1-11/+11
The enum was created to understand the different states during the shutdown and find places where it is used. The normal transitions are like. Idle -> Imsi Detach -> L1 Reset -> Done Idle -> L1 Reset -> Done The shutdown can get stuck in case: * Out of memory situation while handling IMSI detach (timeout) * Never receiving l1 reset acknnowledgment. The code could benefit from the move to osmo fsm to deal with proper timeouts. Change-Id: Iee1140e4848923c7270495c381bf87b7e3fddee1
2017-11-24mobile/vty_interface.c: fix Kc / Ki confusionVadim Yanitskiy1-2/+2
Change-Id: Ibbd1d080896b5cadc3d4281fe8f839a103a35088
2017-11-14layer23 vty: fix prompts: insert space after '#'Neels Hofmeyr1-3/+3
"All" our VTY prompts have a space after the prompt. Also do that for '(ms)', '(test-sim)' and '(support)' prompts. Change OsmocomBB(ms)#exit to OsmocomBB(ms)# exit Change-Id: Id437279e0fa9845630a306958b404efa3b94b492
2017-11-09vty: skip installing cmds now always installed by defaultNeels Hofmeyr1-3/+0
vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I300a4b34a2031fd09d110ef18375d140a6dca7ba
2017-11-08host/mobile: use osmocom_ms as talloc contextVadim Yanitskiy1-3/+1
As we use talloc, it's absurdly not to use the main feature of the library - hierarchical memory management. This change sets talloc context of all sub-allocated objects to related osmocom_ms instance. So, as soon as osmocom_ms instance is destroyed, all sub-allocated chunks are getting destroyed too. Change-Id: I6e3467ff739f3e6dc8dd60cc6d1fcd3f8e490ce9
2017-11-05mobile/vty_interface.c: fix incompatible pointer type warningVadim Yanitskiy1-1/+1
According to the vty_app_info struct definition, the go_parent_cb() should return an integer, but not enum. So, this change fixes the following compiler warning: > warning: initialization from incompatible pointer type > .go_parent_cb = ms_vty_go_parent, Change-Id: Ib55e43eaaebdd9fe0d74a030b1057ae82804a77e
2017-11-02mobile/vty_interface.c: add missing 'vty/misc.h' headerVadim Yanitskiy1-0/+1
This header contains declaration of the osmo_talloc_vty_add_cmds(). Change-Id: Icdafb22758897cfb67e249f37991f4af4213a5fa
2017-10-29mobile: register the talloc context introspection commandVadim Yanitskiy1-0/+3
This change registers the command, which is now implemented in libosmocore since the 463deef8c209dd7eb023ac70bf41fa9893ad35ed and allows to introspect mobile application's talloc context directly from the VTY interface. Change-Id: I979d64ae63d385f4fd082a4e3f981cbf5ab28338
2017-10-23mobile/vty_interface.c: do not write 'exit' to configVadim Yanitskiy1-3/+0
Since we use indenting as means to implicitly exit child nodes, no need to write 'exit' at the end of each child node. Change-Id: I73b0f3926d766d21ca68c8e01b7fc70b2b4636c9
2017-10-23mobile/vty_interface.c: do not install default commandsVadim Yanitskiy1-50/+0
Since in recent version of libosmocore default commands (such as 'exit' and 'end') are being installed by default, no need to install them twice. This will crash the program. Change-Id: I82c8d04ccc7dc3f19589a79b859a2c993bd1d39c
2017-07-27vty_interface.c: use RPLMN from settings if presetVadim Yanitskiy1-0/+15
Previously, when testcard was attached via VTY interface, the initial values were used for MCC / MNC, LAC and TMSI, even if correct RPLMN settings were set. Change-Id: Ic70889cdb6be95f06d0c2df710524b4128b5f72b
2017-05-25host/mobile: use talloc for ms->name allocationVadim Yanitskiy1-1/+1
The approach of talloc memory management reduces memory usage, and prevents some buffer overflows, which were possible before. Change-Id: Icd6706117fdd7f1b3481b0e3817bbb3b31f12f60
2017-01-15mobile.c: Don't register 'end' command to CONFIG_NODEHarald Welte1-1/+0
The CONFIG_NODE already has an 'end' command, and recent versions of libosmocore actualyl check for conflicting/duplicate command registrations and make the application crash in this case.
2016-01-18host/mobile: Improved SAP interface integrationЯницкий Ва дим1-3/+37
1) Now the SAP interface is selectable as SIM source using the 'sim sap' command in VTY. 2) SAP connection starts only if it is configured as SIM source. 3) Fixed sap_socket_path configuration r/w errors. Written-by: Яницкий Ва дим <axilirator@gmail.com> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2016-01-18mobile: Fix for "Added runtime selection of gps device"Яницкий Ва дим1-5/+4
The 'gps host HOST:PORT' line in the config file now is generated correctly. So that it is parsed correctly when loading the config on next startup. Also the gpsd port now is parsed as it should without a colon. Written-by: Яницкий Ва дим <axilirator@gmail.com> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-06-15mobile: Use osmocom auth API instead of direct callsMax1-4/+5
Submitted-by: Max <max.suraev@fairwaves.co> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-01-07mobile: Allow test card to be maked as already attachedAndreas Eversberg1-12/+62
This way it is possible to use test card without making attachment to the network, if the LAI matches. It can be used to do faster testing.
2013-01-07mobile: Improved exit of mobile process, reset phoneAndreas Eversberg1-2/+2
If mobile phone has started, it is reset after shutdown. This ensures that the phone is not transmitting anymore, especially while shutting down in dedicated mode. Using CTRL+c: The first signal causes initiating of shutdown with detach procedure. The second signal causes initiating of shutdown without detach procedure. The third signal will exit process immidiately. (in case it hangs) Using CTRL+z: The first signal causes initiating of shutdown without detach procedure. A subsequent CTRL+c would exit process immidiately.
2012-11-22Rename various "rxlev" variable to "rxlev_dbm" and correct their signessAndreas Eversberg1-3/+3
All levels in range of 0..63 are now uint8_t and use "rxlev" as variable name. All levels in range of -110..-47 are now int8_t and use "rxlev_dbm" as variable name.
2012-02-14mobile: Add vty option to force rekeying for every new channelTim Ehlers1-0/+27
Written-by: Tim Ehlers <osmocom@ehlers.info> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13host/mobile: Adding (partly implemented) supplementary service supportAndreas Eversberg1-0/+31
Use VTY to request your extension number form OpenBSC: en service 1 *100# Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13host/mobile: Mobile will use SMS Service Center Address from SIMAndreas Eversberg1-5/+10
In case the SMS Service Center Address is not set in the config, the Address from the SIM card is used. The mobile checks if either one is defined, otherwise it will refuse sending SMS. Since records of SIM are read, this patch includes fixes to talk correctly with the SIM client. Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13host/mobile/sms: Adding SMS support for osmocomBB/mobileAndreas Eversberg1-0/+85
Both MO and MT SMS are supported. Transmission an reception can be controlled via VTY: en sms 1 <destination> <text> All received SMS are stored in "~/.osmocom/bb/sms.txt". SMS transmission is performed on SAPI 3 datalink, using DCCH or ACCH. Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-08-11mobile/vty: Add missing 's' for 'skip-max-per-band' configuration parameterSteve Markgraf1-1/+1
Thanks to Sylvain for pointing this out. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-07-17[layer23] Added special return value for invalid MCC/MNC inputAndreas Eversberg1-12/+12
This way an MNC of 000 can be entered.
2011-07-17[layer23] Correctly report to restart mobile instance after band changeAndreas Eversberg1-11/+11
Mobile instance must be restarted (shutdown / no shutdown) in order to apply changes to the available ARFCNs.
2011-07-17[layer23/mobile] Improvement and fixes of idle mode processAndreas Eversberg1-51/+218
This patch introduces cell re-relection. When camping on a cell, it scanns neighbour cells. If a 'better' cell is found, the cell is selected. If the cell is in a different location area, a location upating is performed under certain conditions. The 'better' cell depends on various informations that are broadcasted on the BCCH of a neihbour cell and of course the RX level. Most operators don't set these informations, so the 'better' cell depend on a better RX level for the same location area, or a much better RX level (6 dBm) at a different location area. There were many issues at the idle mode process that has been fixed. Expecially when moving, the state machines got stuck, so no more cell search was possible, or no further calls / location updating was possible. In order to see the process of cell selection, enter the VTY interface and enable the network monitor: enable monitor network 1 (where '1' is the instance of the MS) In order to see the current state of the processes, enter: show ms
2011-07-17[mobile] Corrected output value of PCS power classAndreas Eversberg1-1/+1
2011-07-17[mobile] Adding option to hide most default values in configAndreas Eversberg1-46/+105
In order to shrink config output, a new config option "[no] hide-default" is added. The config is now easier to read, but does not show all available options, if they are set to default. Newcommers may want to see all available options in config. Therefore all options are show by default. To hide default options, enter: configure terminal hide-default end
2011-05-29[layer23] Adding Quadband support and GSM 4x0 supportAndreas.Eversberg1-20/+135
This makes it possible to use GSM 850 and PCS 1900 bands, as used in the US. The support relies on the phone hardware. Each band (900, DCS, 850, PCS, 480 and 450) can be enabled and disabled individually for each setting.
2011-05-15src: use namespace prefix osmo_* for utilsPablo Neira Ayuso1-2/+2
Summary of changes: s/bcd2char/osmo_bcd2char/g s/char2bcd/osmo_char2bcd/g s/hexparse/osmo_hexparse/g s/hexdump/osmo_hexdump/g s/hexdump_nospc/osmo_hexdump_nospc/g s/ubit_dump/osmo_ubit_dump/g s/static_assert/osmo_static_assert/g
2011-05-15src: use namespace prefix osmo_signal*Pablo Neira Ayuso1-1/+1
Summary of changes: s/signal_cbfn/osmo_signal_cbfn/g s/register_signal_handler/osmo_signal_register_handler/g s/unregister_signal_handler/osmo_signal_unregister_handler/g s/dispatch_signal/osmo_signal_dispatch/g
2011-04-26src: use new libosmogsm and include/osmocom/[gsm|core] path to headersPablo Neira Ayuso1-4/+4
This patch changes include paths to get osmocom-bb working with the current libosmocore tree. Among all these renames, you can notice several tweaks that I added on purpose, and that require some explanation, they are: * hexdump() in osmocon.c and osmoload.c has been renamed to avoid clashing with hexdump() defined in libosmocore. * gsmmap now depends on libosmogsm. Actually I had to cleanup Makefile.am because I was experiencing weird linking problems, probably due to a bug in the autotools. With the change included in this patch, I got it compiled and linked here correctly. This patch has been tested with the phone Motorola C123 and the following images files: * firmware/board/compal_e88/hello_world.compalram.bin * firmware/board/compal_e88/layer1.compalram.bin Using the osmocon, bcch_scan and mobile tools. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-09[PATCH] Added runtime selection of gps device.Dario Lombardo1-37/+35