Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Transfer data via GSM data call

Status
Not open for further replies.

DCO_81

Member level 1
Member level 1
Joined
Mar 10, 2005
Messages
39
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Germany, south
Activity points
1,657
software data transfer bs26 by modem

Hi,

I wrote a short linux program where I use the serial port of the modem. So I was able to build an connection between 2 GSM Modem via a data call. How do I actually transfer data betwenn these two modem? Do I need a special protocol (PPP, TCP/IP, ZMODEM)?
 

No difference between normal modem and mobile mdoems. Just mobiel modems are more restrictive in trasnfer parameters selection than usual mdoems .
Let say xmodem would be fine .
 

Sorry, I am a beginner. How do I implement a protocol like xmodem? Can you send me a code example?
 

when i open a data connection between 2 gsm modems (using ATD number)
then after I receive a "0x0D 0x0A CONNECT 0x0D 0x0A" every byte I send over the serial port on the one side, is received at the other side and vice versa.

What modems are you using then?

And you can use "any" protocol you want over that raw data connection

Antharax
 
I use an option fusion pcmcia card and a siemens MC45 T. Do I even need a protocol for data transfer or can I just send byte for byte to serial port? I usually have to send about 1-2 MB.
 

I would use a simple protocol!
split the data in chunks of know length
send them with a start byte, length byte, Msg Type, sequence number and CRC

And let the other side acknowledge the Packets with their sequence numbers

Data:
|Start|DataType|Length|SeqNr|Data(length bytes)|CRC(16-bit crc)|

Acknowledge:
|Start|AckType|SeqNr|CRC(16-bit crc)|


Code:
-- Side 1                                                           -- Side 2
------------------------------------------------------------------------------
|0x01|'D'|64|0|data|CRC|                       ->
  (start Retransmit timer for Packet 0)                             
|0x01|'D'|64|1|data|CRC|                       ->
  (start Retransmit timer for Packet 1)
|0x01|'D'|64|2|data|CRC|                       ->      (receive Packet 0)
  (start Retransmit timer for Packet 2)      <-        |0x01|'A'|0|CRC|
|0x01|'D'|64|3|data|CRC|                        ->      (receive Packet 1)
  (receive acknowledge of Packet 0)           <-        |0x01|'A'|1|CRC|
  (stop Retransmit timer for Packet 0)
...

It's similar to certain bootloader protocols. When CRC is too difficult to implement you can also use a checksum.

Of course there are issues to be solved (sequence number overflow should be handled with care, ...
Hope this is a start!

Antharax
 

Thanks Antharax.

Can you suggest me an existing protocol I can use? I think this will be more simple than making by "own protocol".
 

How can I establish a PPP connection based on a gsm data call connection? I need this for the final tcp/ip connection.
 

DCO_81 said:
How can I establish a PPP connection based on a gsm data call connection? I need this for the final tcp/ip connection.

to implement ppp protocol u'll have to take care of following things:
> link layer, LCP.
> Authentication, CHAP/PAP.
> IPCP, for configuring conection.
> IPv4 using udp/tcp.
> application layer protocol like ftp/http.

for this writting protocol for host if u r going to logon to internet server is required.
 

Actually, my protocol hierarchie should be like this:


Pres/Apl : My Stuff
Session : Socket
Transport: TCP
Network : IP
Link : PPP
Physical : BS26

Are there any libs for ppp in c++?
Or have I to use linux scripts?
 

you are correct.

the stack codes can be found on free BSD links.

DCO_81 said:
Actually, my protocol hierarchie should be like this:


Pres/Apl : My Stuff
Session : Socket
Transport: TCP
Network : IP
Link : PPP
Physical : BS26

Are there any libs for ppp in c++?
Or have I to use linux scripts?
 

Sorry kuldeep,

what do you mean with "free BSD links"? Can you post the link to this stack?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top