AgeCommit message (Collapse)AuthorFilesLines
2021-03-25mobile/vty: add a command to trigger LURfixeria/researchVadim Yanitskiy2-2/+25
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
2021-03-14trx_toolkit/ cosmetic: setblocking() takes boolVadim Yanitskiy1-1/+1
Change-Id: I9c4fa8cb7c237f3b9e34ba236b6507da5c668aee
2021-03-01trx_toolkit/ use uppercase for KNOWN_VERSIONSVadim Yanitskiy4-8/+8
Change-Id: Ie4dcc8e91115c514ace243a95a9b44a17cd976b4 Related: OS#4006, SYS#4895
2021-03-01trx_toolkit/ use tuple for DATAMSG.known_versionsVadim Yanitskiy1-1/+1
Change-Id: I79de5fe478297e1850d9582426888411a0189d3f Related: OS#4006, SYS#4895
2021-03-01trx_toolkit/ decorate abstract methods as suchVadim Yanitskiy1-6/+7
Change-Id: I27fdcfdabc2b5318ab3e958d2e5446e670fe9035 Related: OS#4006, SYS#4895
2021-03-01trx_toolkit/ convert comments into docstringsVadim Yanitskiy1-47/+75
Change-Id: I856b54fd1baca4ae0edd2aa59be6a76372cef667 Related: OS#4006, SYS#4895
2021-03-01trx_toolkit/ do not instantiate abstract class DATAMSGVadim Yanitskiy1-5/+5
Change-Id: I811f67ae030ccd93e1c6a421097cec36ca01cbf9 Related: OS#4006, SYS#4895
2021-02-19tests: Replace deprecated API log_set_print_filenamePau Espin Pedrol1-1/+2
Change-Id: I9d24365d2be528477f1c190c698a81bfc7f2d2df
2021-01-13contrib/jenkins: don't build osmo-gsm-manualsOliver Smith1-1/+0
Related: OS#4912 Change-Id: If8f88bde0614547bb5c4f4f6e97fc20fcecd8a2c # ---
2020-12-25trx_toolkit/ fix: Thread.isAlive() was removedVadim Yanitskiy1-1/+1
As it turns out, in Python < 3.9 class Thread defines 'is_alive' and 'isAlive = is_alive'. In Python 3.9 the later has been removed, so crashes on receipt of 'POWEROFF': File "/home/wmn/wmn/osmocom/bb/src/target/trx_toolkit/", line 63, in running return self._thread.isAlive() AttributeError: 'Thread' object has no attribute 'isAlive' See for more details. Change-Id: Id441d76dddb659958803d507e0fb028fb06422a7
2020-12-01firmware/layer1: invalidate hard-coded Measurement resultsVadim Yanitskiy1-2/+2
This is what the L1 sends to the network before the first SACCH block is received from the higher layers. The indicated values are of course invalid because they're hard-coded. According to 3GPP TS 44.018, table 0 The measurement results are valid 1 The measurement results are not valid Change-Id: I136307baef3fa2ddd1d5cec2a7f8c9e6d4602499 Related: I7da767e146aec7cef1de71e4d735d6a02b6c5642 Related: SYS#4918
2020-12-01firmware/layer1: clarify the content of Measurement resultsVadim Yanitskiy1-3/+15
Change-Id: I3203790c529f93d0084c82136645683a26faf986 Related: I26546dcbc853166e351d00260936b1b9d584ae03
2020-11-30trxcon/scheduler: invalidate hard-coded Measurement resultsVadim Yanitskiy1-2/+2
This is what trxcon sends to the network before the first SACCH block is received from the higher layers. The indicated values are of course invalid because they're hard-coded. According to 3GPP TS 44.018, table 0 The measurement results are valid 1 The measurement results are not valid Change-Id: I7da767e146aec7cef1de71e4d735d6a02b6c5642 Related: SYS#4918
2020-11-30trxcon/scheduler: clarify the content of Measurement resultsVadim Yanitskiy1-2/+15
Change-Id: I26546dcbc853166e351d00260936b1b9d584ae03
2020-11-30trxcon/scheduler: clarify Measurement results paddingVadim Yanitskiy1-2/+2
Table "Measurement Results Contents" in 3GPP TS 44.018 is clear on what should be used as padding - '0**', i.e. zeroes. Change-Id: I4db6845c98aded10291134f416da98fd0f4f58e3
2020-11-25mobile: generate coredump and exit upon SIGABRT receivedPau Espin Pedrol1-2/+9
Previous code relied on abort() switching sigaction to SIG_FDL + retriggering SIGABRT in case the signal handler returns, which would then generate the coredump + terminate the process. However, if a SIGABRT is received from somewhere else (kill -SIGABRT), then the process would print the talloc report and continue running, which is not desired. Change-Id: Ied0f47378a5d348b857424adb5c874c1c093b485 Fixes: OS#4865
2020-11-25trxcon: generate coredump and exit upon SIGABRT receivedPau Espin Pedrol1-3/+13
Previous code relied on abort() switching sigaction to SIG_FDL + retriggering SIGABRT in case the signal handler returns, which would then generate the coredump + terminate the process. However, if a SIGABRT is received from somewhere else (kill -SIGABRT), then the process would print the talloc report and continue running, which is not desired. Change-Id: I6d80f3f2742d397e47f4f2970c951f2cf6d58172 Fixes: OS#4865
2020-11-25trxcon: Handle signal SIGABRTPau Espin Pedrol1-0/+1
The signal handler was coded as if it was handling SIGABRT, but the signal handler was not overwritten so it is actually used. Change-Id: I5c597f3410fc97be138db6f3976df59f393819b6
2020-11-11Use osmo_fd_*_{disable,enable}Harald Welte1-6/+6
Change-Id: If4c7f946852d153bd472e5c704f8d517d26ca22e Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d
2020-11-11Use osmo_fd_*_{disable,enable}Harald Welte1-14/+14
Change-Id: I65d37821873767e61a7eca029f9b30938a299683 Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d
2020-11-05trxcon/l1ctl_link: use osmo_store16be() in l1ctl_link_send()Vadim Yanitskiy1-3/+3
Change-Id: I96ca1c581d028a1f3c89c83a575fd8dbc9751962
2020-10-25osmocon: More decoding of tpu_debug (on compal/rffe_dualband)Harald Welte1-1/+61
Let's give a more human-readable decode of the TPU instructions, naming the TSPACT pin names as well as the device_id/strobe. Change-Id: Iac1ac74ac3e41cff9d3d347a167b43af58cc6e59
2020-10-25tpu: Fix TPU_DEBUG: keep local cache of instructionsHarald Welte1-35/+35
TPU_DEBUG used to read from TPU RAM, which unfortunately seems rather slow, so copying it over from there broke overall timing leading to infamous "DSP Error 24" when TPU_DEBUG is enabled. Change-Id: Idde061df8c129aa51b2e4540c8ef2e4116468c9c
2020-10-24tpu: Fix msgb-write-beyond-tailroom in TPU_DEBUGHarald Welte1-1/+1
We need to make sure to allocte sufficient space to include the 32bit frame number at the start of the TPU_DEBUG msgb. Change-Id: Ifb3ce6f91131fc361b20c3b3fe5ebc7079633ac3
2020-10-23gsm48_rr: Don't swap ber with snr in "MON:" log lineHarald Welte1-1/+1
I was quite confused why I constantly see a bit error rate reported by gsm48_rr, while at the same time the actual L1CTL_DATA_IND did all state num_biterr == 0. So the log statement was broken ... Change-Id: I09bb6c606a8437b213bb444949c78a7c8a10542c
2020-10-21mobile: Use osmo_fd_setup() in script_lua.cHarald Welte1-4/+3
Change-Id: Ib6f97b9b8f3af63b81b92071b7fdb1fd55da89a5
2020-10-19trxcon/l1ctl: fix: send confirmation for TCH mode requestVadim Yanitskiy1-2/+5
Both REQ and CNF share the same message structure, so we can cheat a bit by changing the message type and sending it back. Change-Id: I6f403ed0506b4b1872361d9976d3186bfe514b52 Related: OS#4799
2020-10-18Use osmo_fd_setup() whenever applicable.Harald Welte6-46/+22
Change-Id: If9b636c295fc6b5349a54c70662f09efa616ee63
2020-10-18Use OSMO_FD_* instead of deprecated BSC_FD_*Harald Welte8-37/+37
Change-Id: Ibf64b18288b9109927035f650d6ef7ad9f15d688
2020-10-16fix trx_if_tx_burst(): do not drop Uplink bursts in TRX_STATE_RSP_WAITVadim Yanitskiy1-0/+2
Some commands, such as SETTA or SETPOWER, are expected to be sent when the transceiver is powered on. We should not drop Uplink bursts while waiting TRXC response. For now it's easier to comment out the state check completely, because the existing TRXC state machine is quite messy. Change-Id: Iefe6030200b11b29a5790d1f4aa4070ed1d9a493
2020-10-13layer23/cbch-sniff: fix: use Osmocom specific RSL channel numberVadim Yanitskiy1-2/+13
This way the layer1 can activate proper CBCH task and send us CBCH block with proper RSL channel number, so they do not end up being routed to LAPDm and rejected there. Change-Id: Ib1d5c99587202a9d94aeb7b63de7ae8c4fb15af0
2020-10-13layer23/cbch-sniff: fix: do not blindly assume presence of CBCHVadim Yanitskiy1-1/+1
We cannot blindly assume that CBCH is present on TS0/SDCCH4 before decoding CBCH Channel Description in System Information Type 4. Change-Id: Ie8ce572df292d0b03c0f743bcf26184619176321
2020-10-01firmware: gtm900b: fix flash-based hardware variant autodetectionMychaela Falconia2-33/+72
The original code used simplified logic whereby it assumed that Spansion flash means MG01GSMT and Samsung flash means MGCxGSMT. However, there exist MGC2GSMT hw variants with Spansion S71PL032J flash in them, thus it is necessary to check the complete device ID rather than just the flash manufacturer ID to distinguish between MG01GSMT with 8 MiB flash (S71PL064J) and MGCxGSMT with 4 MiB flash (S71PL032J, K5A3281CTM or K5L3316CAM). Distinguishing between 4 MiB and 8 MiB flash chip types is also necessary in order to configure TIFFS reader for the correct FFS location matching that used by the original firmware, which is in turn necessary in order to read factory RF calibration values. Closes: OS#4769 Change-Id: Iaa5bd295e9cbf6b525fa385f9d6cd7fcd7f8a4dd
2020-10-01firmware: gtm900b: fix MEMIF configurationMychaela Falconia1-3/+19
* Switch Calypso output CS4/ADD22 to ADD22 function as needed in order to access the upper half of the flash on GTM900 hw variant MG01GSMT. * Set WS=4 for safety - please refer to this technical article for the underlying theory: Related: OS#4769 Change-Id: I1923243937d7251f6bcfe71a0b1cc0e206a81cfa
2020-10-01firmware: gtm900b: fix GPIO configurationMychaela Falconia1-6/+4
This change fixes one bug and one uncertainty: Bug: Huawei defined Calypso GPIO 3 to be DTR input on this modem, following TI's precedent from C-Sample and D-Sample platforms. (Huawei's documentation calls the corresponding FPC interface pin UART_DTR without even mentioning that it is actually wired to Calypso GPIO 3 in the hardware.) The previous code (erroneously copied from gta0x target which is different in this regard) configured this GPIO to be an output, creating a driver conflict. Uncertainty: GPIOs 4, 6, 10, 11 and 12 power up as inputs, and Huawei's official fw leaves them as such. But in the absence of someone reverse-engineering a sacrificial GTM900 module by slicing its PCB and imaging its copper layers and vias, we don't know if these Calypso pins are simply unconnected like they are on Openmoko devices (in which case they are floating inputs and should be switched to driving dummy outputs), or if they are tied off in the hardware in one way or another, in which case leaving them as inputs is correct. On the reasoning that floating inputs are a lesser evil than driver conflicts or shorted outputs, leave these GPIOs as inputs until we gain better knowledge of this aspect of the hardware. Related: OS#4769 Change-Id: Ia41f8bc19fb1775b0587fe1ceaa8acd066710aa5
2020-10-01firmware: calibration: proper support for gtm900b targetMychaela Falconia3-596/+49
GTM900-B can share almost all calibration tables with GTA0x and FCDEV3B, only the VCXO is significantly different. Related: OS#3582 Change-Id: I52b63b1d086452139b1efd308d47a4183eace745
2020-10-01firmware: calibration: split afcparams.c from rf_tables.c for gta0xMychaela Falconia3-29/+55
We have new hardware targets that have appeared since the original OS#3582 patch was created, namely Huawei GTM900-B and the upcoming FreeCalypso Caramel2 board. These new targets need the same APC offset as gta0x and fcdev3b (TI's original Leonardo value), they have proper calibration records in their FFS (meaning that all compiled-in numbers become no-effect placeholders), and their PA tracts are similar enough to Openmoko/FCDEV3B to where even in the absence of calibration OM/FC numbers are close enough. Thus most of the tables in board/gta0x/rf_tables.c should be reusable by these new targets. However, these new targets have quite different VCXOs from Openmoko and FCDEV3B, thus they need different AFC parameters. Thus we split board/gta0x/afcparams.c from board/gta0x/rf_tables.c, making the latter more reusable. Related: OS#3582 Change-Id: I92e245843253f279dd6d61bd5098766694c5215f
2020-10-01firmware: implement reading of factory RF calibration valuesMychaela Falconia29-351/+4023
Since If6e212baeb10953129fb0d5253d263567f5e12d6, we can read the TIFFS file-system, thus we can read and use the factory RF calibration values. * Implement parsing of factory RF calibration values for Motorola C1xx, Openmoko GTA0x, Pirelli DP-L10, and upcoming FCDEV3B targets. * Remove the old Tx power level control code and tables, and replace them with new logic that exactly matches what the official chipset firmware (TI/FreeCalypso) does, using tables in TI/FreeCalypso format. Compiled-in tables serve as a fallback and match each target's respective original firmware. * Use individual AFC slope values for different targets. The original value was/is only correct for the Mot C1xx family, whereas GTA0x/FCDEV3B and Pirelli DP-L10 need different values because Openmoko's VCXO (copied on the FCDEV3B) and Pirelli's VCTCXO are different from what Motorola used. * Take the initial AFC DAC value for the FB search from factory calibration records on those targets on which it has been calibrated per unit at the factory. * Use individual APC offset for different targets instead of the hard-coded value. The Mot/Compal's and Pirelli's firmwares (both heavily modified relative to TI) use different APC offset settings: 32 for Compal and 0 for Pirelli, while Openmoko and FreeCalypso devices use 48. Change-Id: Icf2693b751d86ec1d2563412d606c13d4c91a806 Related: OS#3582
2020-09-30Menu App to select highram images from phone's flash memoryAndreas Eversberg2-1/+339
Change-Id: Ibbdb0093d8f502dcd57ea92b53e7e56b09ee9e5f
2020-09-27fix compilation with arm-none-eabi 8.3.1 20190703 on Debian unstableHarald Welte1-1/+1
To make the situation about stdint.h even more complicated, this toolchain doesn't anymore #define __int8_t_defined, which means we again run into conflicting definitions :/ Let's try to use INT8_MAX as a key. Change-Id: I1a74cdcd03366390e88b2d5bddf01329410b9f1c
2020-08-26fake_trx: Implement RFMUTE TRXC cmdpespin/mutePau Espin Pedrol4-2/+20
Change-Id: I67d16858cd70cb0527c1da77bd3787d5e53100b4
2020-08-06firmware/makefile: Add GIT_SHORTHASHMartin Hauke1-0/+4
GIT_SHORTHASH is used by the recently introduced snake game. Change-Id: I837e3dcc5c44e64ca7f6c243c08981ed01f35dd1
2020-08-04firmware/app: Initial commit for the game SnakeMarcel `sdrfnord` McKinnon1-0/+521
Change-Id: I3c3f012552f2a7474ade911fc071c89e55e19352
2020-08-04firmware/fb: Implemtented fb_bw8_line and fb_set_p(uint16_t x,uint16_t y)Marcel `sdrfnord` McKinnon4-19/+60
Change-Id: Id8856ace2a31ba4ebcd04746e0c96c23a679cc40
2020-08-02firmware/abb: Wrote twl3025_power_off_now to restart the phone if the power ↵Marcel `sdrfnord` McKinnon2-0/+10
button is pressed I am not sure how other developers do this. There are probably better ways to make testing faster but I kind of like it this way. I just call the twl3025_power_off_now function when the power key is pressed. Change-Id: I1e55910acd8584c74e5e190b3334a8cf6987f5f3
2020-07-31firmware/layer1: fix properly apply secondary multi-frame taskVadim Yanitskiy1-3/+5
When a dedicated channel is activated, in chan_nr2mf_task_mask() we calculate a bitmask of the corresponding multi-frame tasks to be enabled. Three logical kinds of the multi-frame tasks exist: - primary (master) - the main burst processing task, e.g. MF_TASK_{TCH_F_ODD,SDCCH4_0,GPRS_PDTCH}; - secondary - additional burst processing task (optional), e.g. MF_TASK_GPRS_PTCCH; - measurement - neighbour measurement task (optional), e.g. MF_TASK_NEIGH_{PM51,PM26E,PM26O}. By default, the primary task is set to MF_TASK_BCCH_NORM (0x00). Due to a mistake, the secondary task has also been set to BCCH, so when we switch to a dedicated mode, we also enable the BCCH. This leads to a race condition between the multi-frame tasks, when both primary and secondary ones read bursts from the DSP at the same time, so the firmware hangs because of that: nb_cmd(0) and rxnb.msg != NULL BURST ID 2!=0 BURST ID 3!=1 This regression was introduced together with experimental PDCH support [1]. Let's use value -1 to indicate that the secondary task is not set, and apply it properly. Change-Id: I4d667b2106fd8453eac9e24019bdfb14358d75e3 Fixes: [1] I44531bbe8743c188cc5d4a6ca2a63000e41d6189 Related: OS#3155
2020-07-31firmware/layer1: refactor multi-frame task mask compositionVadim Yanitskiy1-5/+10
Change-Id: I91780146d066c45c42b037c22cb49fd8a96e832b
2020-07-31layer23/mobile: implement handling of TCH test loop commandsVadim Yanitskiy7-15/+239
For more information, see 3GPP TS 44.014, sections: - 5.1 "Single-slot TCH loops", and - 8 "Message definitions and contents". This feature has nothing to do with the Mobility Management, so let's handle GSM48_PDISC_TEST messages in the Radio Resources layer implementation (gsm48_mm.c -> gsm48_rr.c). Change-Id: If8efc57c7017aa8ea47b37c472d1bbb1914389ca