0

SIM-Reader
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

SIM-Reader

by waheb09 on Tue Nov 17, 2009 12:57 pm

I made the SimReader from http://www.ladyada.net/make/simreader/make.html and i used CMOS Hex inverter
74HC04P and 100uF / 16V capacitor and 20pF ceramic capacitor
i use pySimReader-Serial-Win32-v2 but i get this error message:
at first this one :

Traceback (most recent call last):
File "pySimReader.py", line 267, in buttonConnectReader
File "pySIMserial.pyc", line 111, in connectReader
File "pySIMserial.pyc", line 160, in openSession
TypeError: ord() expected a character, but string of length 0 found

and then :

Traceback (most recent call last):
File "pySimReader.py", line 267, in buttonConnectReader
File "pySIMserial.pyc", line 111, in connectReader
File "pySIMserial.pyc", line 143, in openSession
File "serial\serialutil.pyc", line 166, in __init__
File "serial\serialwin32.pyc", line 49, in open
serial.serialutil.SerialException: could not open port COM1: (5, 'CreateFile', 'Access is denied.')


Please help me ...
Attachments
17112009.jpg
picture of my sim reader 01
17112009.jpg (387.88 KiB) Viewed 6517 times
17112009(001).jpg
picture of my sim reader 02
17112009(001).jpg (398.11 KiB) Viewed 6517 times
waheb09
 
Posts: 13
Joined: Tue Nov 17, 2009 12:34 pm

Re: SIM-Reader

by mwr on Tue Nov 17, 2009 9:39 pm

From the User Manual, section "Connect" -- are you sure you have a COM1 on your system?
mwr
 
Posts: 47
Joined: Sun Jun 07, 2009 3:08 pm

Re: SIM-Reader

by waheb09 on Tue Nov 17, 2009 10:24 pm

Yes Sir (mwr) I do, Windows XP SP3 with all necessary updates, and i have COM 1 on my motherboard, and i tested the cable and the DB-9 female connector, and the 9V battery !!
waheb09
 
Posts: 13
Joined: Tue Nov 17, 2009 12:34 pm

Re: SIM-Reader

by mwr on Tue Nov 17, 2009 10:45 pm

And you definitely see a COM1 in Device Manager? The access denied for opening COM1 for writing would normally indicate its absence, or possibly a permissions problem (but I don't think Windows XP would cause that with a serial port even on a normal user account). You might see if you can get HyperTerminal or PuTTY to connect to COM1 successfully, too. If they can't connect to it, then neither will the SIM reader program.
mwr
 
Posts: 47
Joined: Sun Jun 07, 2009 3:08 pm

Re: SIM-Reader

by waheb09 on Wed Nov 18, 2009 9:43 am

Good morning
if is this what you mean, please have a look at this screenshots.
thank you sir, any thing any ideas would be helpful, thenks for the replys, i appreciate that.
Attachments
untitled.jpg
untitled.jpg (279.79 KiB) Viewed 6498 times
com.JPG
com.JPG (115.93 KiB) Viewed 6498 times
waheb09
 
Posts: 13
Joined: Tue Nov 17, 2009 12:34 pm

Re: SIM-Reader

by waheb09 on Wed Nov 18, 2009 11:41 am

this is the parts list and what i used :

Printed circuit board
SIM card holder
3.579545 MHz ("colorburst") crystal
DB-9 female connector w/solder cup
CMOS Hex inverter 74HC04N i used 74HC04P
7805 (TO-220 package) or 78L05 (TO-92) 05V regulator
NPN transistor, EBC pinout Such as PN2222 or 2N3904 i used 2N2222
0.1uF ceramic capacitor
2 of 18-22pF ceramic capacitor i used 20pf
100uF / 6.3V capacitor (or higher!) i used 100uF/16V
Green or red 3mm LED i used red
Power diode
2 of 5.1V Zener diode
1/4W 5% 1Meg resistor Brown Black Green Gold
3 of 1/4W 5% 1.0K resistor Brown Black Red Gold
4 of 1/4W 5% 10K resistor Brown, Black, Orange, Gold
9V battery clip
6 pin header
waheb09
 
Posts: 13
Joined: Tue Nov 17, 2009 12:34 pm

Re: SIM-Reader

by adafruit on Wed Nov 18, 2009 12:53 pm

2n2222 may not be pin compatible

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: SIM-Reader

by waheb09 on Wed Nov 18, 2009 9:07 pm

thank you adafruit for the reply, i'll change it and i'll post back.
waheb09
 
Posts: 13
Joined: Tue Nov 17, 2009 12:34 pm

Re: SIM-Reader

by waheb09 on Thu Nov 19, 2009 5:56 pm

Hello today, i changed the transistor 2N2222 to 2N3904, but i still have the same thing, same error message, nothing happened

Traceback (most recent call last):
File "pySimReader.py", line 267, in buttonConnectReader
File "pySIMserial.pyc", line 111, in connectReader
File "pySIMserial.pyc", line 160, in openSession
TypeError: ord() expected a character, but string of length 0 found

Traceback (most recent call last):
File "pySimReader.py", line 267, in buttonConnectReader
File "pySIMserial.pyc", line 111, in connectReader
File "pySIMserial.pyc", line 143, in openSession
File "serial\serialutil.pyc", line 166, in __init__
File "serial\serialwin32.pyc", line 49, in open
serial.serialutil.SerialException: could not open port COM1: (5, 'CreateFile', 'Access is denied.')

any ideas !!
waheb09
 
Posts: 13
Joined: Tue Nov 17, 2009 12:34 pm

Re: SIM-Reader

by waheb09 on Fri Nov 20, 2009 9:52 am

Hello, will some body help me here !!
i need it to work as soon as possible, please.
Thanks.
waheb09
 
Posts: 13
Joined: Tue Nov 17, 2009 12:34 pm

Re: SIM-Reader

by mwr on Sat Nov 21, 2009 8:33 pm

Disconnect all the hardware from COM1. Use PuTTY or HyperTerminal to make a direct connection to COM1. Do either of them report errors?
mwr
 
Posts: 47
Joined: Sun Jun 07, 2009 3:08 pm

Re: SIM-Reader

by waheb09 on Sun Nov 22, 2009 10:57 am

Hello
Sir mwr, thank you for helping me, and I hope you will be patient and explain to me how to do that in details please, and what should i have in both cases, thank you, and take care
waheb09
 
Posts: 13
Joined: Tue Nov 17, 2009 12:34 pm

Re: SIM-Reader

by mwr on Sun Nov 22, 2009 3:04 pm

This page explains one way of using HyperTerminal to test a serial port, assuming you have a specially-wired loopback cable (loopback cable wiring described here, but ignore anything specific to LabVIEW). Or, if you have two PCs on hand, you can wire up a null-modem cable, bring up HyperTerminal on each, set their line speeds and other serial settings identically, and then characters you type on one PC would be displayed on the other one.

The point is to verify that you have a working serial port and cable. If you've successfully communicated with *any* serial hardware, but the Sim reader is causing problems, then you can probably skip all this. If you've never used the serial ports previously, then you can't definitively say if the problem is with the reader, or with something else.
mwr
 
Posts: 47
Joined: Sun Jun 07, 2009 3:08 pm

Re: SIM-Reader

by waheb09 on Mon Nov 23, 2009 7:15 am

Hello Sir mwr, yesterday i used the PIC Programer with the same cable in the same serial port (COM1) with the same PC, and it worked fine, if is that mean any thing !!
Thank You, Have a nice day.
waheb09
 
Posts: 13
Joined: Tue Nov 17, 2009 12:34 pm

Re: SIM-Reader

by mwr on Mon Nov 23, 2009 10:25 am

Then I'm nearly out of ideas, except to agree that it's not the PC's serial port.

There's a slim possibility that the serial cable you're using may be sufficient for the PIC programmer, but is missing flow control lines or similar for the SIM reader. Check out all nine pins on the cable and compare it versus a serial line with all the hardware flow control pins available. I can guarantee you that the RTS and DTR lines are used in setting up the communications, so they'd better be available.

If the cable checks out, then you're left with isolating it down to the software and the SIM reader itself. My Python isn't good enough to instantly figure out which commands the software is sending, but if you get the pySimReader source and extract it, you can trace through it to see what's being sent to the serial port, print it out to the screen additionally, and then try to push the same commands through some other serial program (HyperTerminal, PuTTY, xCTU). If pySimReader can't push the same commands that one of the other serial programs can, then the problem is software.

If both the cable and the software check out (that is, both pySimReader and another serial program fail to get a response properly), then you've narrowed it down to the reader hardware. And at that point, you'll have to ask someone other than me, since I have no experience on that part.
mwr
 
Posts: 47
Joined: Sun Jun 07, 2009 3:08 pm

Please be positive and constructive with your questions and comments.