Discovering Carrier from SIM card with AT commands - apn

I'm using a Fibocom G600/G610 GSM/GPRS modem module and would like to interrogate the SIM card to discover which carrier it supports so that I can connect using the correct APN.
Does anyone know whether this is possible and if so, how to do it?
Thanks all.
Ron

Yes, as:
First, AT+CIMI command to get SIM's IMSI;
Second, get country and operator from digit 1-3 and digit 4-5 of the IMSI

Related

What is the correct phone number format to send an SMS to Mexico on Twilio?

I am trying to send an SMS to Mexico via Twilio. The Mexican country code is 52 and the area code I am sending to is 667.
I have tried the following
+521667xxxxxxx - which I believe to be correct based on http://en.wikipedia.org/wiki/Telephone_numbers_in_Mexico#Dialing_a_cell_phone_in_Mexico_from_abroad
+011521667xxxxxxx
+001521667xxxxxxx
+52667xxxxxxx
I get the following error from twilio - "is not a mobile number"
This question is old, but people might still wonder about this, so here it goes:
+521667xxxxxxx used to be correct up until August 3rd, 2019. The correct format is +52667xxxxxxx since then. Even now you may have varying degrees of success using the former format since telecom companies are still allowing it, but you should use the new one to avoid problems in the future.
You can confirm this information here: https://www.mexperience.com/mexico-simplifies-telephone-dialing-rules/ (one of the few sources in English I could find)
With respect to the specific number you were trying, it really might not be a mobile number.
According to the twilio docs it would be +53667xxxxxxx. You may also have to enable international messaging
Twilio International Numbers
Enabled International Dialing Permissions

Retail point of sale credit card processing - card present. Minimizing PCI compliance requirements

I am writing a point of sale application for a client who has some very specific needs. The client is a retail store, so when they process credit cards, they have a physical card present and can swipe it. The way it is now, at the end of check out, it presents the cashier with a total, and the cashier keys the total into a credit card terminal (by hand--it is not connected to the computer), swipes the card at the terminal and then when the payment is processed, the cashier presses the "Paid by Credit Card" and it prints a receipt.
The problem is that hand keying in totals is time consuming and prone to errors. I'd much rather have my program transmit the amount to a credit card terminal and then get a message when the transaction has been processed. I don't want to touch any card holder information (card number, etc) because I want to stay outside of PCI. All I want to do is send an amount and get back an "accepted" or "declined". You'd think this would be common, but I seem to have failed to find information. (For example, authorize.net's card present API requires me to collect and transmit the card number. I don't want to collect and transmit the card number. I want to transmit an amount and have someone else collect and transmit the card number and notify me when the process is complete.)
Does anyone have a solution for this? Has anyone worked with Verifone or Ingenico's hardware? I don't care if I'm sending the number of a physical terminal connected via USB or to a virtual software terminal. I just don't want to be the terminal myself, so that I'm not anywhere in the chain of card data.
I'm familiar with the VeriFone line of products, both signature capture (Mx900 series) and mobile iOS devices (Vx600). Your first hurdle is that the units are pricey for the little guy (ie: small business owner) at about $500 & $900 each respectively (retail).
On the bright side these things are your friends when it comes to PCI via what VeriFone dubs Verishield Protect (VSP). Essentially VSP encrypts the card swipe on the magstripe head and your POS solution will have to send out a decryption request which your POS software can either consume for settlement or for a fee VeriFone will send it directly to the bank.
The main sticking point of the PCI requirements I believe you're running into is the fact that the clear card data can't be "stationary" at any point in your code and either of these solutions will be a good launching point.
Good luck!
You should take a look at payworks. They provide a iOS / Android SDK to integrate a credit card reader. You never touch credit card data.
Disclosure: I am a software engineer at payworks.
The Pax S300 can do it, though I haven't found a processor that supports it. TSYS is supposed to, but after 4 months of run around, I could never get a device. Helcim has great customer service and report that they are planning an Ingenico solution for pushing the total to the terminal by the end of 2015.

10 digit phone number validation

I'm using cform to capture internet leads on my website. I need a code so that people have to provide full 10 digit phone number or else it wont let them submit the request. Thank you.
Just get the length of what the user provides. check if they are all numbers, and if they are, assume that it is a number.

How do I query a Windows Phone 7 phone number via API?

Quick question that I can't find an answer to...
How do you find what the number of the phone running Windows Phone 7 is?
For example, in the UK the number would start with 447*. I need this information to send to our server so it can send the user a text message when something has happened.
As far as I know, phone number is not available via the API.
Do you mean the phone's actual number or the country code? +44 is the UK international code. If you mean the phone number, I don't think this is possible. In Mango, you can get the Mobile Operator. Mobile operators tend to have their own first few digits, so you could store a table of those and check it against the operator returned. It may not be wholly accurate, but might be useful if you can get a list of numbers of prefix major operators.
It is not available with the API, nor any private methods.
This is also not in the Mango release as far as I am aware.
Its not available directly; but if you definitely need the phone number and you are providing a useful service that the user is interested in, then just ask the user to provide their phone number.
You can validate if the user has entered the number along with country code by looking at the location and determining the country code from a lookup table/ web service.

retrieving the serial number of a USB keyboard under Windows

Many USB devices contain a unique serial number (which is actually a Unicode string) which the host can use in conjunction with the 16-bit vendor and product ID numbers to uniquely identify the device.
I'm trying to figure out how to write a Windows application that would be able to display a list of all USB human interface devices attached to the system. The list would have one row for each HID, including system keyboards. There would be columns in the list for the vendor ID, product ID, and serial number.
I can get a list of USB HIDs by calling SetupDiGetClassDevs with the GUID returned by HidD_GetHidGuid and looping through the result by repeatedly calling SetupDiEnumDeviceInterfaces. I can then call SetupDiGetDeviceInterfaceDetail to get the path to each device, which I can open with CreateFile, so long as I am careful to request neither read nor write permission, which would be denied for a system keyboard. From there I can get the vendor and product ID numbers by invoking HidD_GetAttributes.
What I'm having trouble figuring out is how to retrieve the serial number string. When I search for solutions to this problem, I find a lot of information about how to get serial numbers for USB mass storage devices, but nothing that looks like it might apply to any other type of USB device. I would be happy to discover either a generic method or a HID-specific method of retrieving the serial number string.
I have a feeling that the Win32 port of libusb could manage this without too much trouble, but unfortunately I need a solution that depends only on libraries that come with Windows, such as the setupapi and hid DLLs that contain the functions mentioned above.
Any suggestions would be very much appreciated!
It turns out that HID.dll defines a function called HidD_GetSerialNumberString that does exactly what I want, given the handle I got from CreateFile as described above. Just tried it out and it works great. There are also HidD_GetManufacturerString and HidD_GetProductString functions to retrieve the other string descriptors referred to in the device descriptor, and even a HidD_GetIndexedString to get an arbitrary string descriptor given its index (presumably because the HID descriptor is allowed to contain string descriptor indices). I feel pretty silly now -- the answer was right there under my nose this whole time.
Thank you all for taking the time to read and answer my question! I'm going to go ahead and accept Alphaneo's answer since it sounds quite promising, and in fact I was waiting for the DDK to download when I stumbled across this answer.
Have you tried the USBVIew source code that comes along with the DDK. The USBView tool displays serial number for any USB device, and the source is shipped with the DDK.
Have you tried searching for the documentation of the HID definition of input records, output records and features records for Hid keyboards. This should show you the list of "things" you can get out/in of a keyboard through HID.
Also, I know it is possible to enumerate the HID record definition by software. I did something similar about 1 year ago, but I cannot remember the details at the top of my head. Doing so would allow you to see what the keyboard USB class is publishing as a standard interface.
I hope it can get you a few pointers to find out what you are looking for. Sorry I could not be more precise!
I recommend this book USB Complete. Chapter 4 Enumeration: How the Host Learns about Devices has the information you need.
This page has many links to information and for you links to libraries and utilities you can use.
you can use GetVolumeInformation for getting the serial number of any hardware attached.

Resources