<?xml version="1.0" encoding="utf-8" ?>
				<!-- generator="e107" -->
				<!-- content type="Forum / topic" -->
				<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
				<channel rdf:about="http://www.8051projects.net/">
				<title>8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes : Forum / topic</title>
				<link>http://www.8051projects.net/</link>
				<description>Learn to make simple microcontroller projects, pic, 8051, avr and arm projects. download 8051 projects, tutorials, libraries, sample codes. join the microcontroller discussion forum and ask doubts regarding electronics. the best source for 8051 over internet.</description>
				<dc:language>en-gb</dc:language>
				<dc:date>2009-01-08T09:14:00-08:00</dc:date>
				<dc:creator>contact@nospam.com</dc:creator>
				<admin:generatorAgent rdf:resource="http://e107.org" />
				<admin:errorReportsTo rdf:resource="mailto:contact@nospam.com" />
				<sy:updatePeriod>hourly</sy:updatePeriod>
				<sy:updateFrequency>1</sy:updateFrequency>
				<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
				<items>
				<rdf:Seq>
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t2590.html" />
				</rdf:Seq>
				</items>
				</channel>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator></dc:creator>
						<dc:subject></dc:subject>
						<description>i would like to ask some help..please help me on my project..my project is automatically sending of SMS via Nokia 3310 .. how do i interface nokia 3310 to the serial port of my PC.. Ii dont know how to program it..im noob in interfacing..what programming language should i use? is Visual Basic possible to use?how? please help me..thanks..</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>as i already said.. you can make use of VB to send sms...here is a sample VB code.. Nokia FBUS SMS and PDU Utility Code and NotesPrivate Sub Form_Unload(Cancel As Integer)If MSComm1.PortOpen = True Then MSComm1.PortOpen = False' This code assumes that you have a Form called SMS' with the following on it:' 1 x Microsoft COM Control V6.0'' DISCLAIMER' This code and the information in it has been provided at no charge, for' non commercial use and the author disclaims all liability of any kind' relating to any use made of itEnd SubPrivate Sub PDUEncoder_Click()PDU.Show' For details on the Nokia FBUS format, jump on the web and check out' sites such as GNOKIA. There are also other sites which talk about' the electronics needed to interface a PC or microcontroller to' a Nokia phone that has an FBUS interface'' This code assumes that you have a Form called SMS' with the following on it:' 1 x Command Button (which is set to run this code when it is clicked)'' DISCLAIMER' This code and the information in it has been provided at no charge, for' non commercial use and the author disclaims all liability of any kind' relating to any use made of itEnd SubPrivate Sub SendSMS_Click()' declare variablesDim msg As StringDim RdStr As StringDim SndStr As StringDim iDim FL As Integer' clear the send and receive text boxesSent_String.Text = "": Rcvd_String = ""SMS.Refresh' if the COM port is closed, then open itIf MSComm1.PortOpen = False Then MSComm1.PortOpen = True' ask for the message and get the PDU versionmsg = InputBox("Message")msg_pdu = Text_To_PDU(msg)' get the SMSC phone number' and convert it to FBUS formatInput_Phone = InputBox("SMSC Phone Number", , "+61411990010")GoSub Convert_Phone_NumberSMSC_Number = Phone_Number' get the SMS destination phone number' and convert it to FBUS formatInput_Phone = InputBox("SMS Destination Phone Number", , "0431867231")test_flag = TrueGoSub Convert_Phone_Number' set frame parametersFrame_ID = Right$("0" &amp; (CStr(Hex(&H1E))), 2)DestDev = Right$("0" &amp; (CStr(Hex(&H0))), 2)SrcDev = Right$("0" &amp; (CStr(Hex(&HC))), 2)MsgType = Right$("0" &amp; (CStr(Hex(&H2))), 2)SMS_Frame_Hdr = Right$("0" &amp; (CStr(Hex(&H0))), 2) &amp; Right$("0" &amp; (CStr(Hex(&H1))), 2) &amp; Right$("0" &amp; (CStr(Hex(&H0))), 2) &amp; Right$("0" &amp; (CStr(Hex(&H1))), 2) &amp; Right$("0" &amp; (CStr(Hex(&H2))), 2) &amp; Right$("0" &amp; (CStr(Hex(&H0))), 2)SMSC_Details = SMSC_NumberMsg_Length_For_Calc = (Len(msg_pdu) / 2)Msg_Text_Length = Right$("0" &amp; CStr(Hex(Len(msg))), 2)TPDU = Right$("0" &amp; (CStr(Hex(&H15))), 2) &amp; Right$("0" &amp; (CStr(Hex(&H0))), 2) &amp; Right$("0" &amp; (CStr(Hex(&H0))), 2) &amp; Right$("0" &amp; (CStr(Hex(&H0))), 2)vp = Right$("0" &amp; (CStr(Hex(&HA7))), 2) &amp; Right$("0" &amp; (CStr(Hex(&H0))), 2) &amp; Right$("0" &amp; (CStr(Hex(&H0))), 2) &amp; Right$("0" &amp; (CStr(Hex(&H0))), 2) &amp; Right$("0" &amp; (CStr(Hex(&H0))), 2) &amp; Right$("0" &amp; (CStr(Hex(&H0))), 2) &amp; Right$("0" &amp; (CStr(Hex(&H0))), 2)Frames_To_Go = Right$("0" &amp; (CStr(Hex(&H1))), 2)Seq_No = Right$("0" &amp; (CStr(Hex(&H43))), 2)Frame = Frame_ID &amp; DestDev &amp; SrcDev &amp; MsgType &amp; "00" &amp; SMS_Frame_Hdr &amp; SMSC_Details &amp; TPDU &amp; Msg_Text_Length &amp; Phone_Number &amp; vp &amp; msg_pdu &amp; Frames_To_Go &amp; Seq_No' Set Frame Length valuesFL = (Len(SMS_Frame_Hdr) / 2) + (Len(SMSC_Details) / 2) + (Len(TPDU) / 2) + (Len(Msg_Text_Length) / 2) + (Len(Phone_Number) / 2) + (Len(vp) / 2) + (Len(msg_pdu) / 2) + (Len(Frames_To_Go) / 2) + (Len(Seq_No) / 2)Frame_Length = FL' check whether pad byte is necessary and add one' if it isPad_Byte = ""If FL Mod 2  0 Then' Frame is an odd length so add Pad BytePad_Byte = Right$("0" &amp; (CStr(Hex(&H0))), 2)End If' create frameBuf_Frame = FrameFrame = Left$(Buf_Frame, 10) &amp; Right$("0" &amp; CStr(Hex(Frame_Length)), 2) &amp; Mid$(Buf_Frame, 11, Len(Buf_Frame) - 10)Frame = Frame &amp; Pad_Byte' calculate checksums and add them to the frame' there are two checksums for FBUS. The first' is an exclusive or (XOR) of the characters in every' odd position in the frame and the second is an' exclusive or (XOR) of the characters in every even' position in the frame (eg if a frame was' 1E 0C 00 7F 00 02 02 03, the odd checksum value would' be: 1E XOR 00 XOR 00 XOR 02 which results in a value' of 1C and the even checksum byte would be:' 0C XOR 7F XOR 02 XOR 03 which results in a value of 72' note all values shown above are in hexprocess_chr = ""first_odd = Truefirst_even = Truechar_pos = 0For i = 1 To Len(Frame)process_chr = process_chr &amp; Mid$(Frame, i, 1)If Len(process_chr) = 2 ThenProcess_Value = CSng("&H" &amp; process_chr)char_pos = char_pos + 1If char_pos Mod 2  0 Then' odd positionIf first_odd = True ThenOdd_ChkSum = Process_Valuefirst_odd = FalseElseOdd_ChkSum = Odd_ChkSum Xor Process_ValueEnd IfElse' even positionIf first_even = True ThenEven_ChkSum = Process_Valuefirst_even = FalseElseEven_ChkSum = Even_ChkSum Xor Process_ValueEnd IfEnd Ifprocess_chr = ""End IfNext iOdd_ChkSum = Hex(Odd_ChkSum)Even_ChkSum = Hex(Even_ChkSum)Frame = Frame &amp; Right("0" &amp; (CStr(Hex(CStr("&H" &amp; Odd_ChkSum)))), 2) &amp; Right("0" &amp; (CStr(Hex("&H" &amp; CStr(Even_ChkSum)))), 2)' create a display friendly version of the frame to be sent' so that we can display itFor i = 1 To Len(Frame)Out_Chr = Out_Chr &amp; Mid$(Frame, i, 1)If Len(Out_Chr) = 2 ThenOutput_Frame = Output_Frame &amp; Out_Chr &amp; " "Out_Chr = ""End IfNext i' create sms command to go to phoneprocess_chr = ""Send_String = ""For i = 1 To Len(Frame)process_chr = process_chr &amp; Mid$(Frame, i, 1)If Len(process_chr) = 2 ThenSend_String = Send_String &amp; Chr$(CSng("&H" &amp; process_chr))process_chr = ""End IfNext i' display what we are about to sendFor i = 1 To 127: Sent_String.Text = Sent_String.Text &amp; "55 ": Next iSent_String.Text = Sent_String.Text &amp; "55" &amp; Chr$(13) &amp; Chr$(10)Sent_String.Text = Sent_String.Text &amp; Chr(13) &amp; Chr(10) &amp; Output_Frame' refresh the form to ensure that the values are displayedSMS.Refresh' send 128 'U's' (0x55) (55D) to start an FBUS sessionFor i = 1 To 128MSComm1.Output = Chr$(85)Next i' send the commandMSComm1.Output = Send_String' display reply by looping and displaying any characters' that are received from the phone.' The First_Flag value is used in the formatting logic.' It ensures that a new line for each response from the' phone does not occur on the first response (this avoids' a blank line in your Text Box)First_Flag = TrueCheckRX:If MSComm1.InBufferCount  0 ThenRdStr = MSComm1.InputFor i = 1 To Len(RdStr) Step 2If i  1 Then Rcvd_String.Text = Rcvd_String.Text &amp; " "If CStr(Hex(Asc(Mid$(RdStr, i, 2)))) = "1E" And First_Flag = False Then Rcvd_String.Text = Rcvd_String.Text &amp; Chr(13) &amp; Chr(10)Rcvd_String.Text = Rcvd_String.Text &amp; Right$("0" &amp; CStr(Hex(Asc(Mid$(RdStr, i, 2)))), 2)First_Flag = FalseNext iRcvd_String.RefreshEnd IfDoEventsGoTo CheckRXExit SubConvert_Phone_Number:If Left$(Input_Phone, 1) = "+" ThenPhone_Number = "91"Input_Phone = Mid$(Input_Phone, 2, Len(Input_Phone) - 1)ElsePhone_Number = "81"End IfProcess_Digit = ""Pad_Digits = 10For i = 1 To Len(Input_Phone)Process_Digit = Process_Digit &amp; Mid$(Input_Phone, i, 1)If Len(Process_Digit) = 2 ThenPhone_Number = Phone_Number &amp; Right$(Process_Digit, 1) &amp; Left$(Process_Digit, 1)Process_Digit = ""Pad_Digits = Pad_Digits - 1End IfNext iIf Len(Process_Digit) = 1 Then' We have an orphaned digit caused by' a phone number with an odd number of' digits, so create Fn where n = the' orphaned digitPhone_Number = Phone_Number &amp; "F" &amp; Process_DigitPad_Digits = Pad_Digits - 1End IfBuf_Phone_Number = Phone_NumberIf test_flag = False ThenPhone_Number = Right$(("0" &amp; CStr(11 - Pad_Digits)), 2) &amp; Buf_Phone_NumberElsePhone_Number = "0A" &amp; Buf_Phone_NumberEnd IfFor i = 1 To Pad_DigitsPhone_Number = Phone_Number &amp; "00"Next iReturn' NOTES'' For details on the Nokia FBUS format, jump on the web and check out' sites such as GNOKIA. There are also other sites which talk about' the electronics needed to interface a PC or microcontroller to' a Nokia phone that has an FBUS interface'' This code assumes that you have a Form called SMS' with the following on it:' 1 x Text Box called 'Sent_String' with Multi-Line set to True' 1 x Text Box called 'Rcvd_String' with Multi-Line set to True' 1 x Command Button (which is set to run this code when it is clicked)' 1 x Microsoft COM Control V6.0' DISCLAIMER' This code and the information in it has been provided at no charge, for' non commercial use and the author disclaims all liability of any kind' relating to any use made of itEnd SubPrivate Sub SMSFail_Click()help_string = "If you can't get an SMS to work, here are some things to try" &amp; Chr(13) &amp; Chr(10) &amp; Chr(13) &amp; Chr(10)help_string = help_string &amp; _"1. Press the Test / Reset Button to test the interface (and set a different FBUS sequence number)." &amp; Chr(13) &amp; Chr(10) &amp; Chr(13) &amp; Chr(10)help_string = help_string &amp; _"2. Turn the phone on and off to reset it (and the FBUS sequence number)." &amp; Chr(13) &amp; Chr(10) &amp; Chr(13) &amp; Chr(10)help_string = help_string &amp; _"3. If you get 4 responses from the phone when you use the Send SMS option, but you don't receive anything on the destination phone, make sure that:" &amp; Chr(13) &amp; Chr(10)help_string = help_string &amp; _"a) the phone can send an SMS by sending one manually; and" &amp; Chr(13) &amp; Chr(10)help_string = help_string &amp; _"b) you are entering the correct SMSC and destination phone numbers in the correct format. "help_string = help_string &amp; _"SMSC phone numbers must be in international format (eg +61411990010). Destination numbers must be in international format (eg +61411990010) or their normal format (eg 0411990010) " &amp; Chr(13) &amp; Chr(10) &amp; Chr(13) &amp; Chr(10)help_string = help_string &amp; _"4. If you do not get any responses from the phone when you use the Send SMS option, follow (1), then (2) above." &amp; Chr(13) &amp; Chr(10) &amp; Chr(13) &amp; Chr(10)help_string = help_string &amp; _"5. Is your phone compatible with this Utility? It has only been tested with a Nokia 3310."MsgBox "" &amp; help_string' NOTES'' For details on the Nokia FBUS format, jump on the web and check out' sites such as GNOKIA. There are also other sites which talk about' the electronics needed to interface a PC or microcontroller to' a Nokia phone that has an FBUS interface'' This code assumes that you have a Form called SMS' with the following on it:' 1 x Command Button (which is set to run this code when it is clicked)'' DISCLAIMER' This code and the information in it has been provided at no charge, for' non commercial use and the author disclaims all liability of any kind' relating to any use made of itEnd SubPrivate Sub TestReset_Click()' declare variablesDim RdStr As StringDim SndStr As StringDim i As SingleDim First_Flag As BooleanSent_String.Text = "": Rcvd_String = ""SMS.Refresh' if the COM port is closed, then open itIf MSComm1.PortOpen = False Then MSComm1.PortOpen = True' display what we are about to sendFor i = 1 To 127: Sent_String.Text = Sent_String.Text &amp; "55 ": Next iSent_String.Text = Sent_String.Text &amp; "55" &amp; Chr$(13) &amp; Chr$(10)Sent_String.Text = Sent_String.Text &amp; "1E 00 0C D1 00 07 00 01 00 03 00 01 60 00 72 D5" &amp; Chr(13) &amp; Chr(10)' refresh the form to ensure that the values are displayedSMS.Refresh' create the command to sendSndStr = Chr$(30) &amp; Chr$(0) &amp; Chr$(12) &amp; Chr$(209) &amp; Chr$(0) &amp; Chr(7) &amp; Chr$(0) &amp; Chr$(1) &amp; Chr(0) &amp; Chr(3) &amp; Chr$(0) &amp; Chr$(1) &amp; Chr$(96) &amp; Chr$(0) &amp; Chr$(114) &amp; Chr$(213)' Send 128 'U's' (0x55) (55D) to start an FBUS sessionFor i = 1 To 128MSComm1.Output = Chr$(85)Next i' send the command (in this case it is the command that gets the' the phone to return its hardware and software detailsMSComm1.Output = SndStr' display reply by looping and displaying any characters' that are received from the phone.' The First_Flag value is used in the formatting logic.' It ensures that a new line for each response from the' phone does not occur on the first response (this avoids' a blank line in your Text Box)First_Flag = TrueCheckRX:If MSComm1.InBufferCount  0 ThenRdStr = MSComm1.InputFor i = 1 To Len(RdStr) Step 2If i  1 Then Rcvd_String.Text = Rcvd_String.Text &amp; " "If CStr(Hex(Asc(Mid$(RdStr, i, 2)))) = "1E" And First_Flag = False Then Rcvd_String.Text = Rcvd_String.Text &amp; Chr(13) &amp; Chr(10)Rcvd_String.Text = Rcvd_String.Text &amp; Right$("0" &amp; CStr(Hex(Asc(Mid$(RdStr, i, 2)))), 2)First_Flag = FalseNext iRcvd_String.RefreshEnd IfDoEventsGoTo CheckRX'' NOTES'' This code has two functions:' 1. test whether your PC - Phone Interface is working' 2. resets the phone message sequence number if you' just sent an SMS.'' Function 2 is necessary as I have not implemented any' sequence increment logic in this utility. This means that' once you send an SMS, you can't send another one until' you run this code (which sends a different sequence number' to the phone, thereby allowing you to send another SMS. This' sequence issue occurs as as the SMS send code uses the same' sequence number and the phone will not accept the same' sequence number twice in a row.'' This code starts an FBUS session (ie sends 128 'U's (hex 55's)) to' the phone, then sends the command to return the hardware and' software details of the phone.'' All data sent to and received from the phone must be hex characters' and the sofwtare and hardware details that come back from the phone' will be in PDU format.'' IMPORTANT NOTE: the command has only been tested on a Nokia 3310' SECOND IMPORTANT NOTE: as there can be a delay between sending' a command and getting a response, this code loops endlessly looking' for responses from the phone (ie it does not time out). A Nokia 3310' will send 4 responses to this command (one short one acknowledging' the command and 3 identical (and longer) responses containing the' hardware and software details). You can add timeout code if you want.' If you don't then make sure that you put a Port close command somwhere' else in your code' For details on the Nokia FBUS format, jump on the web and check out' sites such as GNOKIA. There are also other sites which talk about' the electronics needed to interface a PC or microcontroller to' a Nokia phone that has an FBUS interface'' This code assumes that you have a Form called SMS' with the following on it:' 1 x Text Box called 'Sent_String' with Multi-Line set to True' 1 x Text Box called 'Rcvd_String' with Multi-Line set to True' 1 x Command Button (which is set to run this code when it is clicked)' 1 x Microsoft COM Control V6.0'' DISCLAIMER' This code and the information in it has been provided at no charge, for' non commercial use and the author disclaims all liability of any kind' relating to any use made of itEnd SubPrivate Sub Encode_Button_Click()' declare variablesDim encoded_text As StringDim i As Integer' clear any previous valuesEncoded_Msg.Text = ""ECLength.Text = ""ECLength.Text = ""' display length of unencoded messageUECLength.Text = Len(Unencoded_Msg.Text)' refresh formPDU.Refresh' get encoded textencoded_text = Text_To_PDU(Unencoded_Msg.Text)' display encoded messageFor i = 1 To Len(encoded_text) Step 2If i  1 Then Encoded_Msg.Text = Encoded_Msg.Text &amp; " "Encoded_Msg.Text = Encoded_Msg.Text &amp; Mid$(encoded_text, i, 2)Next i' display length of encoded messageECLength.Text = Len(encoded_text) / 2' refresh formPDU.Refresh' NOTES'' This code assumes that you have a Form called PDU' with the following on it:' 1 x Text Box called 'Unencoded_Msg' with Multi-Line set to True' 1 x Text Box called 'UECLength'' 1 x Text Box called 'Encoded_Msg' with Multi-Line set to True' 1 x Text Box called 'ECLength'' 1 x Command Button (which is set to run this code when it is clicked)'' DISCLAIMER' This code and the information in it has been provided at no charge, for' non commercial use and the author disclaims all liability of any kind' relating to any use made of itEnd SubPublic Function Text_To_PDU(msg)' declare variablesDim bin_msg_chars(128) As StringDim return_value As StringDim borrow_value, i, n As Byte' default return value to nothingText_To_PDU = ""' return if there is no message to encodeIf Len(msg) = 0 Then Exit Function' put the binary value of each message character' into the bin_msg_chars arrayFor i = 1 To Len(msg)bin_msg_chars(i) = Dec_To_Bin(Asc(Mid$(msg, i, 1)))Next i' perform the encoding (see notes below)borrow_value = 0: n = 0For i = 1 To Len(msg)If i  Len(msg) ThenIf bin_msg_chars(i)  "!" Thenborrow_val = borrow_val + 1If borrow_val = 8 Then borrow_val = 1n = n + 1return_string = return_string &amp; Right$("0" &amp; CStr(Hex(Bin_To_Dec(Right$(bin_msg_chars(i + 1), borrow_val) &amp; bin_msg_chars(i)))), 2)If borrow_val = 7 Thenbin_msg_chars(i + 1) = "!"Elsebin_msg_chars(i + 1) = Mid$(bin_msg_chars(i + 1), 1, Len(bin_msg_chars(i + 1)) - borrow_val)End IfEnd IfElsen = n + 1return_string = return_string &amp; Right$("0" &amp; CStr(Hex(Bin_To_Dec(bin_msg_chars(i)))), 2)End IfNext i' return the encoded mesage to the calling programText_To_PDU = return_string' NOTES'' PDU ENCODING BASICS'' PDU encoding is performed by taking each 7 bit character and packing' them into 8 bit characters. If you have more than 7 characters, this results' in a compressed form of encoding as every 7th character is encoded into' the previous 6 characters.'' Encoding can be done manually by taking the characters to be encoded, writing them' down back to front (eg hello would be written 'olleh'), converting them to' 7 bit binary and performing the process (working left to right) set out below. In essence' this process involves making 8 bit characters from 7 bit characters by taking bits from' successive characters.'' 1. For the first character (ie the 'h'), we need 1 bit to make it an 8 bit character.' We get this by taking it from the last bit of the next character (ie the 'e') and adding' it to the front of the character we are processing. For this example, the bit we would' take would be a '1'(as 'e' is 110 0101 in binary). This gives us a first encoded character' of 1110 1000 (as 'h' is binary 110 1000) so adding the '1' we took gives us 1110 1000.' 2. As we have taken the last bit from the second character (ie the 'e'), we need to take' 2 characters from the following character (ie the 'l') to make an 8 bit character.' The two would be '00' (as 'l' is 110 1100 in binary). If we add these two bits to the' character we are processing, we get 0011 0010 (as the 'e' was 110 0101, but became 110 010' after we took the last bit to encode our first character).' 3. This process continues for each character until we either:' (a) reach a point where we have taken all of the bits from the next character (eg where we' have taken 6 bits from a character (leaving 1 bit) and then have to process that character)' and have another character in front of that to process. To do this, we would need to take' all 7 bits of the following character. After we do this, there is nothing left of the following' character so it is skipped (ie we don't process it). It is not lost as it has been encoded into' the previous character; or' (b) reach the last character (ie there are no more characters ahead of it). At this point we' simply leave the last character as it is (ie we do nothing to it). For our 'hello' example, the' last character will be 0x06 (ie 6 Hex or 0000 0110 binary)' 4. Once you have completed this process, don't forget that you have worked from right to left, but the' encoded values must be entered into your phone from left to right. For our example we would (working' right to left) get 0x06 0xFD 0x9B 0x32 0xE8. However, the phone would need to see E8329BFD06'' If you want to check a manual encoding, the working should look like this:'' Chr o l l e h' Hex 0x6F 0x6C 0x6C 0x65 0x68' Bin 110 1111 110 1100 110 1100 110 0101 110 1000'' Bits 110 [1111] 110 1[100] 110 11[00] 110 010[1]' taken'' Result 110 1111 1101 1001 1011 0011 0010 1110 1000' 0x06 0xFD 0x9B 0x32 0xE8'' reverse the order to get the form that is used to send to your phone' and you get the result: E8 32 FD 06 (all hex)'' THIS CODE'' As Visual Basic does not have a bit shift function, the code manipulates' the message characters by turning them into binary values and pretty much' applying the encoding method described above.'' While you could perform encoding with few less lines of code using something' like c or c++ (which has bit shift functions), there is actually not a huge' difference in code size and this method may make the code easier to understand' as it follows the encoding method described above.'' DISCLAIMER' This code and the information in it has been provided at no charge, for' non commercial use and the author disclaims all liability of any kind' relating to any use made of it'End FunctionPublic Function Dec_To_Bin(dec_val)' declare variablesDim leading_zero_flag As BooleanDim i, place_val As ByteDim pad_zeroes As String' logicleading_zero_flag = TrueFor i = 1 To 8If i = 1 Then place_val = 128 Else place_val = place_val / 2If dec_val / place_val >= 1 ThenDec_To_Bin = Dec_To_Bin &amp; "1"dec_val = dec_val - place_valleading_zero_flag = FalseElseIf leading_zero_flag = False ThenDec_To_Bin = Dec_To_Bin &amp; "0"End IfEnd IfNext ipad_zeroes = ""For i = 1 To 7 - Len(Dec_To_Bin)pad_zeroes = pad_zeroes &amp; "0"Next iDec_To_Bin = pad_zeroes &amp; Dec_To_Bin'' NOTES' This code converts to binary by successively dividing' the passed decimal value by 128, 64, 32, 16, 8, 4, 2 and 1' and testing whether each result is greater than or equal to 1' If it is greater than or equal to 1, then it sets the relevant' bit value to a '1'. If it is not greater than or equal to 1, then' it sets the relevant bit value to a '0' if the leading bit flag is set.' This flag ensures that we get one leading zero for a 7 bit character' that starts with a '0' (eg 011 0010) and no leading zeroes for a' 7 bit character that starts with a '1' (eg 110 1000). This is critical' for the bit manipulation logic in the 'Text_To_PDU' routine as it has' to have 7 bit binary values'' DISCLAIMER' This code and the information in it has been provided at no charge, for' non commercial use and the author disclaims all liability of any kind' relating to any use made of itEnd FunctionPublic Function Bin_To_Dec(bin_val)' declare variablesDim i, place_val As Byte' logicbin_val = Right$("00000000" &amp; bin_val, 8)For i = 8 To 1 Step -1If i = 8 Then place_val = 1 Else place_val = place_val * 2If Mid$(bin_val, i, 1) = "1" ThenBin_To_Dec = Bin_To_Dec + place_valEnd IfNext i'' NOTES' This code converts the passed binary value to decimal' by successively adding 1, 2, 4, 8, 16, 32, 64 and 128' depending on whether the relevant binary value bit is' a '1' or a '0'.' The padding of preceding zeroes at the start is needed' as the 'Text_To_PDU' routine works with binary values' of varying sizes. The padding ensures that this logic' always gets an 8 bit binary value'' DISCLAIMER' This code and the information in it has been provided at no charge, for' non commercial use and the author disclaims all liability of any kind' relating to any use made of itEnd Function</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>elie</dc:creator>
						<dc:subject></dc:subject>
						<description>what kind of data cable should I use to interface to the serial port of the PC?</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>if you want to make use of datacable then you need to clear RTS and Set DTR signal in the program..This can be done as shown below..CODE: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MSComm1.Dtr = True<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MSComm1.Rts = Falseyou can directly connect your phone with datacable to the PC's com port.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>elie</dc:creator>
						<dc:subject></dc:subject>
						<description>what's the name of the datacable?thank you Ajay..</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>Just ask for Nokia 3310 datacable.. thats all.. technically i think its called DAU9P or FBUS cable.. you need to check in your local market..</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>elie</dc:creator>
						<dc:subject></dc:subject>
						<description>ah ok.. thanks a lot Ajay..great help for me..</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>just connect the datacable... with PC COM port... and take the above given code as reference and make your project.. If you face any problem. Ask me</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>elie</dc:creator>
						<dc:subject></dc:subject>
						<description>hi ajay..i have now datacable.. how do i start to make my project?please help me.. i dont know what to do    .. I need ur help..</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>elie</dc:creator>
						<dc:subject></dc:subject>
						<description>the code doesn't work  .. i transferred it to visual basic.. and i tested it but it doesnt send a SMS.. nothing happened.. help me ajay please..</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>I don't think you've read the code properly.. did you add the components as described in the code? Like buttons, textboxes forms etc...?</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>elie</dc:creator>
						<dc:subject></dc:subject>
						<description>yes.. i did all what it said in the code.. but it doesn't work   what should i do?</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>well it worked with me...  anyways i am attaching the VB project.. check it out</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>download it from here...Nokia FBUS SMS and PDU Utility Code and Notes</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>elie</dc:creator>
						<dc:subject></dc:subject>
						<description>hi again ajay    ..what does this means?IMPORTANT: PLEASE CHANGE THE MSCOMM1 SETTINGS ACCORDING TO THE COM PORT AVAILABLE ON YOUR PC.i dont understand it.. can u explain it to me.. thank u again..</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>shyam</dc:creator>
						<dc:subject></dc:subject>
						<description>check your device manager to see the name of your serial ports....in some pcs you will find lots of com ports available....com1com2com3...etc.... mostly happens when u are using laptops with bluetooth and wi fi....so do confirm the name of your com port at which the f-bus cable is to be connected......</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>usually its either COM1 or COM2..in the SMS.frm you see MSCOMM1 icon.. click on its properties and change the COM port number whichever is available on your PC.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>elie</dc:creator>
						<dc:subject></dc:subject>
						<description>9600,n,8,1 this is the default settings on my com1.. do i have to change it?</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>yes.. change it to whatever port available and 115200,n,8,1</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>HW = hardware Versionand SW = software version..the test button send command 0xD1 which is to read the hardware and software version of Nokia Phones.I want to see what you get in the receive window.. there are two text boxes in the software...the top one is what is being transmitted and bottom one is what is being received. So do not forget to label the data received..e.g.TX data:........RX data:........like that i want.. and whatever you sent at the top... doesn't seems to be correct....</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>??? is that an error you are getting? or what?</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>elie</dc:creator>
						<dc:subject></dc:subject>
						<description>ajay..still not working..what does this means..set different FBUS sequence number..help me please..</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>elie</dc:creator>
						<dc:subject></dc:subject>
						<description>there's no error appeared.. but the destination number doesn't receive the SMS that i have sent..</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>what reply you are getting form the phone.. can you post it?also have you done the test? i mean to say.. have you tried clicking on test button..you will get a ACK frame after that you will get a HW and SW version frame 3 times... tell me are u getting that or not...</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t2590.html">
						<title>Re: Automatically sending of SMS via Nokia 3310</title>
						<link>http://www.8051projects.net/forum-t2590.html</link>
						<dc:date>2009-01-08T09:14:00-08:00</dc:date>
						<dc:creator>elie</dc:creator>
						<dc:subject></dc:subject>
						<description>hi ajay..this is what i get after clicking the test button and reseting the phone:55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 5555 55 55 55 55 1E 0C 00 00 00 00 60 72 1E 00 00 D1 CF 1E 00 00 01 00 56 30 2E 37 30 2D 37 30 0A 48 2D 0A 63 20 4D 2E 01 3E1E 00 00 01 00 56 302E 37 30 2D 37 30 0A 48 2D 0A 63 20 4D 2E 01 3E1E 00 00 01 00 56 302E 37 30 2D 37 30 0A 48 2D 0A 63 20 4D 2E 01 3E1E 00 00 01 00 01 1E 00 00 00 00 00 00 00 00 00 00 00 FF D0 03 01 00 2D 14 F4 01 00 E1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00what is HW and SW version btw?</description>
						</item>
				</rdf:RDF>