iotconnectivity / sim-applet-data-heartbeat

JavaCard SIM card applet to monitor the status of data connectivity over-the-air
GNU General Public License v3.0
22 stars 13 forks source link

did this applet ever work on any card? #1

Open laf0rge opened 3 years ago

laf0rge commented 3 years ago

As it fails on both the sysmoUSIM-SJS1 and the sysmoISIM-SJA2 (which are based on completely different chips and operating systems), I'm wondering if this applet has ever been successfully used on any other card. It would be good to have confirmation on this, so we're sure the applet is known-working.

Thanks!

dielenram commented 3 years ago

Hi, thanks for the comment.

This was our first attempt to use the open channel proactive command and we found some problems. Basically the "Bearer description TLV" was wrong and the device wasn't opening the channel. Unfortunately, this project was discontinued. So answering your question, it has never been used and doesn't work.

We had succeeded in a later project that we are about to integrate into our SIM card technology but it isn't going to be published as open source.

laf0rge commented 3 years ago

Hi Diego, thanks for your follow-up.

If I read you correctly, the Bearer Description TLV in this applet is wrong? This is good to know as we every so often get somebody contacting sysmocom about this, suspecting a problem in our cards rather than in this applet.

I willl now point any such inquiries to this issue. Hopefully somebody will invest the time to fix the TLV, now that it's know where the problem is.

workaholic2002x commented 2 years ago

Hi, it is the only clean approach in the whole internet after few Chineese scripts.

The issue may be with "allocation" of max channel number with the applet during installation. As it is a optional parameter, (not even conditional), it's often missed After a lot of exploration, got a clue from here https://trustedconnectivityalliance.org/wp-content/uploads/2020/01/StepStonesRelease6_v100.pdf

And then it works. Atleast, Channel no allocated.

Yes, the code works with few modifications.

But, it's not a Rosy path. Usual simulator fails. Real device is the one to test with. And for that, hundreds of time someone need to load the applet. For that a "handly application" to be made to load and install the applet to SIM without removing from the SIM from UE. However, it itself is another clumsy job.

workaholic2002x commented 2 years ago

Once, channel is opened, it is always better to check channel status.

The second issue in the code is here proHdlr.init((byte)PRO_CMD_SEND_DATA,(byte)0,channelID) As per TS, the device ID is wrong. Usually Channel ID is 1-7. But device ID must be "2X". So, adding 32 with Channel ID shall give correct result. The same for sending data, closing channel etc.

workaholic2002x commented 2 years ago

Third observation, instead of hitting Google, better to hit a TCP server, like tcpbin.com at Port 4242 which echo backs the data. Sending a small data is good to start

Further, as implemented, Quallifier=1 is great for immediate link set up in OPEN_CHANNEL. Like other Chinese script, others should not make it 0, which does not open channel immediately. Do, same for sending data (if anyone wants to implement)

culy247 commented 2 years ago

@dielenram How to set domain instead of ipv4, how to change port to use https?