Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Interfacing nokia phone with MCU

Status
Not open for further replies.
Possibly, most phones run on a single Lithium battery so the I/O voltage is 3.3 volts, if you use a current limit resistor it may work but you may possible need a level shifter circuit. If you run the MCU off of the cell phone's battery then it will work just fine.
 
Just you can interface with a RS232 port of the MCU with the serial port of the phone through a level logic chip so called MAX232 which will do the needful.
 
vigaindia, this is not needed in this case, as the serial output of a Nokia is NOT RS232C compatible, it's logic level RS232, if the phone and the micro controller are run off the same power supply now level adjusting is required.
 
Nigel I only went by what I see
Nokia N70, N90, N91, 3230, 3300, 6155, 6170, 6230, 6230i, 6233, 6235, 6255, 6260, 6630, 6650, 6670, 6680, 6681, 7270, 7600, 7610, 7700, 7710, 9300, 9500 and some others. You may connect these phones to computer USB port by simple straight-wired USB cable (see DKU-2 schematic above).
 
Another difference is I shorted pin 7,8 and pin 6,4 of the COM port as shown in figure of my link. But in Nigel's link no such shorted shown. So, what should I do?
 
Adjust your baud rate.
 
Nokia phone and PIC

Recently I have started a hobby project on SMS controlled remote switch. On my shelf I had a Nokia 6070 phone and its data cable. The phone has so called “pop port” for external connections and the cable is of an unknown manufacture. The cable is probably aDKU-5 clone, with a built-in USB-to serial converter. Using this cable the communication with PC was OK.

I opened the wires of the cable and conducted TX, RX and ground of the phone to my PIC microcontroller’s RX and TX pins. The SMS-alarm system of Ole Wulf was running on PIC 16F628a. Using the connections above, the phone did not recognize AT commands sent by the PIC. After several trials and errors I got the serial connection established as follows.

The cable was not cut, only the wires exposed. The cable’s USB-plug was not connected to the USB port of PC. The pop port pins were connected to PIC as follows:

1 (cCarger input) to PIC’s +5 V
2 ( Ground) to PIC’s Ground
3 (ACI) intact
4 (Vout) intact
5 (NC)
6 (RX) to PIC’s TX
7 (TX) to PIC’s RX
8 (data GND) intact
9-15 (NC)

After doing the above connections the Nokia 6070 phone received the AT commands sent by the PIC and the phone delivered the corresponding messages or stored phone numbers. In other words, it was working fine! I suppose Nokia 3200 works the same way, because it has a pop port and it uses DKU-5 cable.

Why did the phone not respond by connecting only TX, RX and ground? I have no true explanation, but my guess is that the phone needs some specific information of the DKU-5 cable in order to activate its modem functions. This assumption is supported by the fact the phone announced powering of the PIC by “Data cable connected” on the screen. This message was not produced if only TX, RX and Ground were connected.
 
The hacked Nokia DKU-5 cable clone I described in my previous message is very hand:

-the mobile phone is charged from the PIC power supply
-when USB-plug is detached and Pop Port plug attached, the cable acts as a serial link between PIC and the phone
-when USB plug is attached and Pop Port plug detached, the cable acts as a serial link between PIC and PC.
-when USB plug is attached on PC, the Pop Port plug is attached, and PIC TX and RX pins are detached, the cable connects the phone and the PC
-when USB is attached, Pop Port attached AND PIC attached, I was able to follow the communication between PIC and the phone on the screen of my PC ! Sometimes some garbage characters appeared, telling that connection is not perfect.

p.s. I am out for 8 days
Mikkoj
 
Hi
I apologize that my previous message had some errors. Bellow you will see the possible connections of the hacked DKU-5 clone cable.

In order to work the cable’s Pop Port connector must all time be connected to the phone. Probably the phone provides the power of the serial-to-USB chip inside the cable. The PIC can be powered either from the USB +5V wire or from a separate power supply.

1. PIC to phone connection
- Connect TX wire of the cable to RX pin of the PIC and RX wire of the cable to TX pin of the PIC. Connect the ground wire to the PIC ground.
2. PIC to PC
- Connect TX to TX and RX to RX and ground to ground
- Connect USB plug to the PC. Use Hyperterminal with the settings of the PIC. Using the keyboard of the PC you can send responses to (some of) the AT commands sent by the PIC.
-
3. Phone to PC.
- Detach all cable wires from the PIC
- Connect USB plug to the PC. Use Hyperterminal with appropriate settings (9600,8,N,1)


Previously I said that the communication between PIC and the phone can be followed by PC’s terminal program (configuration 1 and USB plug connected to PC). The full traffic, however, can only be followed if the echo of the phone is active (command ATE1). This way the phone forwards the PIC’s AT commands to the PC. Those echoed commands are also received with the PIC and may cause freezing of the PIC program. At least the program I use does not survive all those echo commands. If echo is se off (ATE0) I can see only the phone’s responses of the PIC’s AT commands. The monitoring of the responses does not disturb the cooperation of the PIC and the phone. So, if I send message from my personal phone to the phone joined to the PIC I can se how the PIC reads the message from the SIM card memory, but I do not see how the PIC sends its response to the phone and how the phone forwards the response message to my personal phone.
 
The baud rate I use for the the PIC USART is 9600. My phone does not accept the commands for fixed baud rate, but it seems to communicate well at 9600.
 
Another solution for Nokia 3070 and other Nokia phones with Pop Port

On the markets there are available DKU-5 serial cables, which can be used to connect Nokia phones having a Pop Port to a PC . One vendor with a reasonable price (less than 5 euros) is UXCELL (https://www.uxcell.com). This cable can be used for connection of the phone to PIC microcontroller via the normal MAX 232 chip. The only modifications needed is to use a 0-modem (=TX and RX lines interchanged) cable and to make pin 4 and/or 7 of the serial cable connector high to about 10 V. This voltage is necessary for the phone in order to activate its modem functions. The voltage can be generated by the MAX232 chip by connecting the idle TXin pin to ground and taking the 10 V from the corresponding idle TXout pin.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top