Hoernchen has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/43558?usp=email ) Change subject: bip: answer proactive commands the relay does not implement ...................................................................... bip: answer proactive commands the relay does not implement pySim-smpp2sim currently claims to support every feature flag that exists, but this immediately dies here with a SJA5: NotImplementedError: No handler method for ProvideLocalInformation(...) Answer anything unhandled with "performed_successfully" and log. Never "command_beyond_terminal_capability", tho, answering that for PROVIDE LOCAL INFORMATION refuses to open the session at all. Change-Id: I1e55d6f88c872a04b89a3946dd840d30b329621e --- M pySim/bip.py 1 file changed, 19 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified dexter: Looks good to me, approved diff --git a/pySim/bip.py b/pySim/bip.py index a23741e..d4c2875 100644 --- a/pySim/bip.py +++ b/pySim/bip.py @@ -219,6 +219,25 @@ self.sms_sink = sms_sink self.channels = ProactChannels(on_data_available=self._on_channel_data_available) + def receive_fetch(self, pcmd: ProactiveCommand): + """Answer anything this handler has no specific handler for. + + A card coming up will usually issue PROVIDE LOCAL INFORMATION, + POLL INTERVAL or TIMER MANAGEMENT before it gets anywhere near a BIP channel + because we claim to support every feature flag there is. + + Note that this is not the spec-correct answer. TS 102 223 6.8.7 + says a successful TERMINAL RESPONSE to PROVIDE LOCAL INFORMATION "shall" carry the + requested Local information data object, and 6.8.13/6.8.14 says the same for TIMER + MANAGEMENT, this returns empty results for all of them, which works with real cards. + + Always "performed_successfully", never "command_beyond_terminal_capability" because + answering that to PROVIDE LOCAL INFORMATION makes a card refuse to open the session. + """ + logger.info("no handler for %s, answering performed_successfully", + type(pcmd.decoded).__name__) + return self.prepare_response(pcmd, 'performed_successfully') + @staticmethod def _find_first_element_of_type(instlist, cls): for i in instlist: -- To view, visit https://gerrit.osmocom.org/c/pysim/+/43558?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1e55d6f88c872a04b89a3946dd840d30b329621e Gerrit-Change-Number: 43558 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen <ewild@sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org>