Just got around to building the Sim Reader kit I got at HOPE back in July. Must say that I'm impressed by the board layout, compact whilst leaving enough space to solder with ease.
Unfortunately, I'm having some difficulties communicating with the reader.
I've tried both on a Windows 2000 machine and a Debian 4.0 (Etch) Linux machine, with Administrator/root account with the necessary rights for raw serial access. I'm plugging the serial connector straight into the serial port on the PC. After selecting the appropriate port (COM1 for Windows, /dev/ttyS0 for Linux) the message displayed is "Unable to connect to reader". I've tried various other port combinations such as COM3, without success.
I've double checked the component locations and polarity and everything appears correct. I've had a good look at the soldering and checked the connections with a multimeter. The voltage across GND and 5V is 4.91V with a battery connected so it looks like the power stuff is doing it's job. I'm using a UK BANNED Mobile SIM.
I've done some digging in the code and adding of debug print statements. It appears that the first value being read from the serial port after the setRTS(1), sleep 10ms, flushInput(), setRTS(0) is 3. This doesn't match the ATR byte 0x3B hence the error.
Please can anyone offer any advise as to what might be wrong or what I should try next.
Thanks
Sim Reader, Assistance Required
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 7
- Joined: Sat Sep 13, 2008 4:47 pm
Unfortunately the error dialog "Unable to connect to reader" error happens before the debug window appears. After clicking "OK" to the error I am returned to the main application window. The pySimReader.log file is empty.
I added print statements to the raw python version on linux to output various variables. I could tidy that up a bit and supply those if that might help.
Thanks
I added print statements to the raw python version on linux to output various variables. I could tidy that up a bit and supply those if that might help.
Thanks
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
-
- Posts: 7
- Joined: Sat Sep 13, 2008 4:47 pm
I think the serial port is being read okay.
If I plug in the reader (battery connected) without the SIM inserted the following message is output to the console:
Doing the same with the SIM inserted results in the "Unable to connect to reader" error. If there was a problem reading the serial port I would expect the same result if the SIM is present or not.
The same thing happens on a separate Windows 2000 machine.
I'm thinking this is looking more like a hardware problem. I'll try to get my hands on another SIM card to give that a go, although the SIM I'm using works fine in a phone.
From http://www.electronicrepairguide.com/ho ... ystal.html
If I plug in the reader (battery connected) without the SIM inserted the following message is output to the console:
Code: Select all
Traceback (most recent call last):
File "pySimReader.py", line 267, in buttonConnectReader
self.SIM.connectReader()
File "/home/peter/simcardread/pySimReader-Serial-src/pySIMserial.py", line 121, in connectReader
res = self.openSession(self.getReaderName())
File "/home/peter/simcardread/pySimReader-Serial-src/pySIMserial.py", line 170, in openSession
print "ord(ts) 0x%x)" % ord(ts)
TypeError: ord() expected a character, but string of length 0 found
The same thing happens on a separate Windows 2000 machine.
I'm thinking this is looking more like a hardware problem. I'll try to get my hands on another SIM card to give that a go, although the SIM I'm using works fine in a phone.
From http://www.electronicrepairguide.com/ho ... ystal.html
I'm sure the airline wouldn't have done anything like that to my checked BANNEDCrystals are quite fragile components because of their construction and designed. Unlike a resistor or a capacitor, if you drop one on the ground from a decent height, it’s a 50-50 chances whether it will function again.
-
- Posts: 7
- Joined: Sat Sep 13, 2008 4:47 pm
Tried another SIM card, this time a UK O2. Worked no problems
I tried the "bad" SIM in a different phone from normal and it reminded me of some behaviour I'd seen in the past with that SIM. For a short period (about 50 seconds) after switching the phone on any attempt to access the address book results in a "SIM not Ready" error. This doesn't happen with the "good" SIM , access to the address book is available immediately.
A bit of searching on the interweb suggests other people have experienced similar issues. I think my "bad" SIM card is from circa 1999
I'll try adding various sleep statements to the initialisation steps of the software to see if I can persuade the "bad" SIM to play nice.
I tried the "bad" SIM in a different phone from normal and it reminded me of some behaviour I'd seen in the past with that SIM. For a short period (about 50 seconds) after switching the phone on any attempt to access the address book results in a "SIM not Ready" error. This doesn't happen with the "good" SIM , access to the address book is available immediately.
A bit of searching on the interweb suggests other people have experienced similar issues. I think my "bad" SIM card is from circa 1999
I'll try adding various sleep statements to the initialisation steps of the software to see if I can persuade the "bad" SIM to play nice.
Please be positive and constructive with your questions and comments.