PDA

View Full Version : توابع و پروژهای بدرد بخور برای کار با پورتها



ali_habibi1384
پنج شنبه 17 آبان 1386, 01:49 صبح
سلام
تا حالا در مورد کار با پورتها و درگاه ها کسی موضوعی مطرح نکرده اگر هم شده کاملا به نتیجه نرسیده. من یکسری توابع و پروژه هایی رو در این باره جمع آوری کردم و اینجا می زارم شما هم همکاری کنید تا مجموعه کاملتر بشه.:لبخندساده:

ali_habibi1384
پنج شنبه 17 آبان 1386, 01:56 صبح
شماره گیری با مودم

ali_habibi1384
پنج شنبه 17 آبان 1386, 01:57 صبح
تبدیل کدهای دریافتی از پورت به کد اسکی و نمایش آن

ali_habibi1384
پنج شنبه 17 آبان 1386, 01:58 صبح
یک برنامه کامل برای برقراری ارتباط با مودم

ali_habibi1384
پنج شنبه 17 آبان 1386, 02:03 صبح
یک مجموعه کامل برای توابع tapi

ali_habibi1384
پنج شنبه 17 آبان 1386, 02:07 صبح
یک برنامه جانبی جالب برای برقراری ارتباط با هر پورت دلخواه و نمایش ورودی های آن به مبناهای مختلف.

ali_habibi1384
پنج شنبه 17 آبان 1386, 02:09 صبح
تست کردن مودم برای دریافت اطلاعات از آن

ali_habibi1384
پنج شنبه 17 آبان 1386, 02:12 صبح
ATAttention - this precedes all commands except A/ and +++A/Execute previous command - does not require a <CR>ACauses the modem to go off hook. If a call is coming in, the modem will try to answer it. The precedure for answering a call is a short silence and then an answer tone. Sending a character to the modem during this procedure will abort the answer sequence. The amount of time the modem will wait for a carrier is programmable by modifying the S7 register. B0Select CCITT V.22 (1200 bps)B1Select Bell 212A (1200 bps)B2Select CCITT V23 - Originate mode will transmit data at 75 bps and receive data at 1200 bps. Answer mode will transmit data at 1200 bps and receive data at 75 bps. The command N0 (disable auto mode) must be selected.DD alone will take the modem off-hook and wait for a dial tone. (see X command for exceptions). The length of time to wait for a dial tone before dialing is programmable in register S6.DmnATDmn will dial a phone number where m is the modifier: L, W, ,, ;, @, or S. It will dial the telephone number n.LDial last numberWWait for dial tone. If you have selected X0 or X1 (disable dial tone detection), then you can use this modifier to override that setting.,Pause during dial. Thie amount of time to pause is determined in register S8.;Return to command mode after dialing. It does not wait for carrier or hang up.@Wait for 5 seconds of silence. This is used to access systems that do not provide a dial tone.!Hook flash. Causes the modem to go on-hook for 0.5 seconds. This is used in PBX systems and for voice features like call waiting.S=(0-9)Dials a stored number. Up to ten numbers can be stored, and the addresses are from 0 to 9. To store a number into one of these addresses, use the &Z command.E0Commands issued to the modem are not echoed to the local terminal. This only matters in the command mode. It does not affect the modem's ability to send response codes.E1Commands are echoed to the local terminal.H0Force modem on-hook (hang-up)H1Force modem off-hook (to answer or dial).I0Return numeric product codeI1Return hardware variation codeI2Report internal codeI3Report software revision numberI4Report product feature listingL0Speaker volume zeroL1Speaker volume lowL2Speaker volume lowL3Speaker volume low (Hardware currently limits volume adjustment to on/off)M0Speaker always offM1Speaker on until carrier detectedM2Speaker always onM3Speaker on during answering onlyN0Disable auto-mode. This forces the modem to connect at the speed specified in register S37N1Enable auto-mode. The modem will answer at the highest available line speed and ignore any ATBn command.O0Return to data mode. If you have entered the command mode using the time independent escape sequence, this will put you back in data mode without going on-hook.O1Retrain the modem. If the line condition has changed since the original connection, retraining the modem will cause it to reconnect at the most efficient speed for the current line condition.PPulse dialing allows the modem to work on telephone networks where one is not supported. Pulse and tone dialing cannot be mixed on the same command line. Q0Enable response to DTE.

ali_habibi1384
پنج شنبه 17 آبان 1386, 02:13 صبح
ATAttention - this precedes all commands except A/ and +++A/Execute previous command - does not require a <CR>ACauses the modem to go off hook. If a call is coming in, the modem will try to answer it. The precedure for answering a call is a short silence and then an answer tone. Sending a character to the modem during this procedure will abort the answer sequence. The amount of time the modem will wait for a carrier is programmable by modifying the S7 register. B0Select CCITT V.22 (1200 bps)B1Select Bell 212A (1200 bps)B2Select CCITT V23 - Originate mode will transmit data at 75 bps and receive data at 1200 bps. Answer mode will transmit data at 1200 bps and receive data at 75 bps. The command N0 (disable auto mode) must be selected.DD alone will take the modem off-hook and wait for a dial tone. (see X command for exceptions). The length of time to wait for a dial tone before dialing is programmable in register S6.DmnATDmn will dial a phone number where m is the modifier: L, W, ,, ;, @, or S. It will dial the telephone number n.LDial last numberWWait for dial tone. If you have selected X0 or X1 (disable dial tone detection), then you can use this modifier to override that setting.,Pause during dial. Thie amount of time to pause is determined in register S8.;Return to command mode after dialing. It does not wait for carrier or hang up.@Wait for 5 seconds of silence. This is used to access systems that do not provide a dial tone.!Hook flash. Causes the modem to go on-hook for 0.5 seconds. This is used in PBX systems and for voice features like call waiting.S=(0-9)Dials a stored number. Up to ten numbers can be stored, and the addresses are from 0 to 9. To store a number into one of these addresses, use the &Z command.E0Commands issued to the modem are not echoed to the local terminal. This only matters in the command mode. It does not affect the modem's ability to send response codes.E1Commands are echoed to the local terminal.H0Force modem on-hook (hang-up)H1Force modem off-hook (to answer or dial).I0Return numeric product codeI1Return hardware variation codeI2Report internal codeI3Report software revision numberI4Report product feature listingL0Speaker volume zeroL1Speaker volume lowL2Speaker volume lowL3Speaker volume low (Hardware currently limits volume adjustment to on/off)M0Speaker always offM1Speaker on until carrier detectedM2Speaker always onM3Speaker on during answering onlyN0Disable auto-mode. This forces the modem to connect at the speed specified in register S37N1Enable auto-mode. The modem will answer at the highest available line speed and ignore any ATBn command.O0Return to data mode. If you have entered the command mode using the time independent escape sequence, this will put you back in data mode without going on-hook.O1Retrain the modem. If the line condition has changed since the original connection, retraining the modem will cause it to reconnect at the most efficient speed for the current line condition.PPulse dialing allows the modem to work on telephone networks where one is not supported. Pulse and tone dialing cannot be mixed on the same command line. Q0Enable response to DTE.

ali_habibi1384
پنج شنبه 17 آبان 1386, 02:16 صبح
این قرار بود یه جدول بشه به این شکل در اومده!

ali_habibi1384
پنج شنبه 17 آبان 1386, 02:22 صبح
منابع at command :

%Cn : Enable/Disable Data Compression
%En : Auto-Retrain control
&Cn : DCD Control
&Dn : DTR Option
&Fn : Recall Factory Profile
&Gn : Select Guard Tone
&Jn : Telephone Jack Control
&Kn : Data Flow Control
&Qn : Communication (Sync/Async Mode)
&Rn : RTS/CTS (Hardware) Flow Control
&Tn : Test Mode
&V : View Configuration
&Wn : Store User Profile
&Yn : Default User Profile
)Mn : Cellular Power Level Adjustment
*Hn : Link Negotiation Speed
+++ : Escape Sequence
+MS : Select Modulation
:En : Compromise Equalizer Setting
? : Read Currently Selected S Register
@Mn : Initial Cellular Power Level Setting
\An : Select Maximum MNP Block Size
\Bn : Transmit Break
\Gn : Modem to Modem (Software) Flow Control
\Ln : Select MNP Block/Stream Mode
\Nn : Protocol Negotiation Selection
A : Answer
A/ : Re-execute Command

ali_habibi1384
پنج شنبه 17 آبان 1386, 02:23 صبح
ادامه :
Bn : CCITT or Bell Selection
Cn : Carrier Control
Dn : Dial
En : Command Echo
Fn : Select Modulation
Hn : Disconnect (Hang-up)
In : Identification
Ln : Speaker Volume
Mn : Speaker Control
Nn : Automode Enable (Automatic Line Speed Detection)
On : Return to Online Data Mode
P : Set Pulse Dial Default
Qn : Result Code On/Off
Sn : Select a Specific S Register
Sn? : Read an S Register
T : Set Tone Dial Default
Vn : Result Code Format
Wn : Negotiation Progress (Connect Message) Control
Xn : Extended Result Code
Yn : Long Space Disconnect
Zn : Modem Reset
Sn=x : Write an S Register Value
&Zn=x : Store Phone Number

ali_habibi1384
پنج شنبه 17 آبان 1386, 02:37 صبح
ارسال به پورت و دریافت از آن

ali_habibi1384
پنج شنبه 17 آبان 1386, 23:32 عصر
فقط مصرف کننده نباشید شما هم مطلب بدین

اوبالیت به بو
پنج شنبه 17 آبان 1386, 23:45 عصر
وای اون دوتا برنامه اولیت چقدر باهالا حرف ندارن

ali_habibi1384
جمعه 18 آبان 1386, 00:12 صبح
قابل نداشت شما هم اگه دارین بزارین