IMSI retrieval from the network elements using IMEI without SIM card - networking

My question is more specific to GSM mobile telephony networks and more or less about SS7/SigTran Protocol suite. So I am not asking the possibility of knowing SIM card details using IMEI number from an end user point of view as it is asked here.
Being a network operator is there anyway that I can retrieve the IMSI associated with IMEI number from MSC,VLR, HLR or any other network elements in the core network(I am excluding EIR on purpose as my current implementation does not include that)? The query should be just based on IMEI with an assumption that we are not interacting with the SIM or the device. Do any of these elements store IMEI-IMSI pair when it is used before.
In summary is it possible to retrieve IMSI from the database of any of the network elements provided just IMEI number. If yes, how? what are the messages (e.g. provideSubscriberInfo-req) that are needed and the ASN1 encoding scheme.
P.S: This is not handset specific such as the one mentioned here , more of network operator specific.

Well its not possible(not that I know off) from a standard GSM operation where you can input IMEI and receive IMSI. However you can get IMSI if you know the MSISDN by GSM Map operation Any_Time_Interrogation_Request. We are using a solution from sigtrangateway.com SigtranGateway.com for same purpose in a telco project and its working fine so far.

Related

AT Command For Overwriting ICCID Sim

Is it possible to overwrite a SIM card's ICCID number using AT commands? If so, what is the command for it?
If not possible via AT commands, is there another way to overwrite the ICCID of a sim card? USSD etc
No, I'm afraid it is not possible.
ICCID number is physically written in the internal memory of the SIM itself.As soon as the cellular modem/telephone is powered on:
the SIM is resetted
the ATR string is read (ATR = Answer To reset)
the communication modem <-> SIM is configured
After that the SIM is just like some sort of "data array", in which you can read specific data at specific indexes. One of them is ICCID number and it is used for the SIM authentication on the network.
Whay it is not possible to change it? Well SIM stands for "Subscriber Identity Module". Changing your ICCID number would mean adulterating its identity, and that would fail to fulfil SIM's own main purpose.

how to use an zigbee IAS Zone device

I'm handling the Smartthings Zigbee motion sensor and i know this is IAS Zone device.
I read an question-answer and they said, "Before you get the information from the sensor, you need to enroll first."
(zigbee motion detect sensor usage)
so i tried to send 'write attribute command' to the sensor to enroll first on my python code like this,
data='\x00' + '\xaa' + '\x02' + '\x00\x10'+'\xf0'+'my MAC address'
('02' means write attribute command, '0010' means attribute of the Zone setting, 'f0' means data type-IEEE address)
this raw data format is from the 'zigbee cluster library' document.
but the sensor gave me 86 status, which means UNSUPPORTED_ATTRIBUTE
well, i think the command is wrong and my assumptions are,
-the format is wrong.
-the values i used is wrong.
-or both.
If you have any idea or any little hint, you can help me. thanks to read!
For most Zigbee security devices (IAS) you need to use these steps
You must advertise that you support the IAS cluster client when receiving a MatchDescriptorRequest (this one depends on product)
Write your IEEE address to the IAS CIE Address attribute (cluster 0x0500, attribute 0x0010)
Send a ZoneEnrollResponse with status ENROLLED to the device (some devices may require that you "trip" them and wait for them to send the ZoneEnrollRequest first)
For your packet format, Zigbee uses network byte order. I think your attributeId should be \x10\x00. This will matter for for the IEEE address as well.

HM-10 AT Commands: Using Beacon Way to Broadcast Sensor's Data

I try to use beacon(HM-10) to broadcast my sensor's data, but there is a problem that I use a loop to write AT commands, after a while, it doesn't respond anything.
Here is the part of the code:
String pre = "AT+MARJ0x";
int sensorData = 0;
loop () {
sensorData = getSensorData(); // always returns 100 ~180
String atCommand = pre + sensorData; // ex: AT+MARJ0x100
BTSerial.print (atCommand);
delay (200);
}
It initially work successfully about 3-mins, and then it doesn't work and can't be sent any at commands.
Can anybody help me fix this problem?
What you are trying is not possible with an Ibeacon.
All you do is set-up the major number of Ibeacon data in your HM-10device over and over again with sensor data.
major number is a part of the Ibeacon data spec:
(source: https://developer.mbed.org/blog/entry/BLE-Beacons-URIBeacon-AltBeacons-iBeacon/)
Data Spec:
IBeacons broadcast four pieces of information:
A UUID that identifies the beacon.
A Major number identifying a subset of beacons within a large group.
A Minor number identifying a specific beacon.
A TX power level in 2's compliment, indicating the signal strength one meter from the device.
This number must be calibrated for each device by the user or manufacturer.
A scanning application reads the UUID, major number and minor number and references them against a database
to get information about the beacon;
the beacon itself carries no descriptive information - it requires this external database to be useful.
The TX power field is used with the measured signal strength to determine how far away the beacon is from the smart phone.
Please note that TxPower must be calibrated on a beacon-by-beacon basis by the user to be accurate.
For a HM-10 device AT-commands are normally only used to set-up the device, not for sending data.
Google some examples and learn how to setup communication between BLE devices.

Developing Communication Protocol for XBee

I am using XBee Digimesh Modules in API-Mode to send data between different industrial machines allowing them to share data, information and commands.
The API-Mode offers some basic commands, mainly to perform addressing and talk with the XBee Module itself in order to do configuration, etc.
Sending user data is done via a corresponding XBee API-Command which allows to send user-defined data with a maximum payload of 72 Bytes.
Since I want to expand this communication to allow integration of more machines, etc. I am thinking about how to implement a basic communication system that's tailored perfectly to the super small payload of just 72 Bytes.
Coming from the web, I normally would use some sort of JSON here but that would fill up the payload very quickly.
Also it's not possible to send a frame with lot's of information since this also fills up the payload very quickly.
So I came up with a different way of communicating. Instead of transmitting frames packed with information, what about sending some sort of Messages like this:
Machine-A Broadcasts: Who's there?
Machine-B Answers: It's me I am a xxx-Machine
Machine-C Answers: It's me I am a xxx-Machine
Machine-A now evaluates the replies and decides to work with Machine-B (because Machine-C does not match As interface):
Machine-A to B: Hello B, Give me some Value, please!
Machine-B to A: There you go: 2.349590
This can be extended to different short messages. After each message the sender holds the type of message in a state and the reply will be evaluated in relation to the state / context.
What I was trying to avoid was defining a bit-based protocol (like MIDI) which defines all events as bit based flags. Since we do not now what type of hardware there will be added in the future I want a communication protocol that's very flexible and does not need a coordinator or message broker, etc.
But since this is the first time I am thinking about communication protocols I am curious to know if there might be some existing frameworks that can handle complex communication on a light payload.
You might want to read through the ZigBee Cluster Library specification with a focus on the general commands. It describes a system of attribute discovery and retrieval. Each attribute has a 16-bit ID and a datatype (integers of various sizes, enumerated types, bitmaps) that determines its size.
It's a protocol designed for the small payloads of an 802.15.4 network, and you could potentially based your protocol off of a subset of it. Other ZigBee specifications are simply a list of defined attributes (and commands) for a given 16-bit cluster ID.
Your master device can go through a discovery process to get a list of attribute IDs, and then send a request to get values for multiple IDs in one shot. The response will be packed tight with a 16-bit ID, 8-bit attribute type and then variable length data. Even if your master device doesn't know what the ID corresponds to, it can pass the data along to other systems (like a web server) that do know.

How to auto-select the APN depending on SIM card?

I have this GSM embedded device under linux, where depending on external factors I might chose to put a different sim card into. But in the configuration for the PPP, I have to give an APN, which changes depending on the network du jour. How can I automatize that?
It just downed on me that smartphones don't need explicit APN entry to work when changing the sim card (also, the APN is sometimes different in M2M and actual cell phone, not sure I can use the same trick).
(I know you are curious: it's deployed in the middle of nowhere, and we chose the least worst network at the last minute on the installation site)
You can detect the network operator from the IMSI of the SIM, and have in your device a table mapping operators to APNs.
There are several sites that will provide you an IMSI to operator listing or MCC and MNC to operator listing. The MCC (Mobile Country One) is the first three digits of the IMIS and the MNC (Mobile Network code) the next 2 or 3 digits. Some example links:
https://www.imei.info/carriers/
https://www.mcc-mnc.com
As an aside, if you want to be able to change to adapt to the best available network coverage over time, the way many M2M applications achieve this is to use a 'forgein' SIM which can then roam to the best available signal at a given time. If your data usage requirements are low this can be a good way to avoid being dependent on one operator in an area with poor coverage. There are quite a few companies who specialise in these type of M2M sims, depending on your target location.

Resources