forked from public/pysim
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
This commit is contained in:
@@ -219,6 +219,25 @@ class Proact(ProactiveHandler):
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user