Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to use QTcpServer with serial interface GSM modem?
Forum Updated to NodeBB v4.3 + New Features

How to use QTcpServer with serial interface GSM modem?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
8 Posts 3 Posters 795 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Q139
    wrote on 24 Aug 2021, 14:34 last edited by Q139
    #1

    How to use QTcpServer with serial interface GSM modem?
    I have code to gather incoming packets and send out over serial interface, but how to connect those events to qTcpServer?
    The code for modem is part of same project.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 24 Aug 2021, 14:43 last edited by
      #2

      Hi
      Using QSerialport for the modem part ?
      So when modem part sends some command and get a result back from GSM, you
      want to forward these over qTcpServer or what sort of integration ?

      Q 1 Reply Last reply 24 Aug 2021, 15:37
      0
      • M mrjj
        24 Aug 2021, 14:43

        Hi
        Using QSerialport for the modem part ?
        So when modem part sends some command and get a result back from GSM, you
        want to forward these over qTcpServer or what sort of integration ?

        Q Offline
        Q Offline
        Q139
        wrote on 24 Aug 2021, 15:37 last edited by Q139
        #3

        @mrjj

        > Using QSerialport for the modem part ?
        

        Yes

        > So when modem part sends some command and get a result back from GSM, you
        > want to forward these over qTcpServer or what sort of integration ?
        

        Yes, forward to qTcpClient also fine.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 24 Aug 2021, 15:59 last edited by
          #4

          hi
          Well I would use a QObject based class as a handler between modem and tcp.
          Often you would expose the data to higher level function/signal interface
          But I'm not sure if you want to forward the raw results as a buffer - as is, or if you want
          the tcp part to have a more functional orientatyed interface so
          it would be signals like
          ManufacturerIdentification
          MobileEquipmentError

          and so on
          or the raw output/result from the GSM?

          Q 1 Reply Last reply 24 Aug 2021, 18:00
          0
          • M mrjj
            24 Aug 2021, 15:59

            hi
            Well I would use a QObject based class as a handler between modem and tcp.
            Often you would expose the data to higher level function/signal interface
            But I'm not sure if you want to forward the raw results as a buffer - as is, or if you want
            the tcp part to have a more functional orientatyed interface so
            it would be signals like
            ManufacturerIdentification
            MobileEquipmentError

            and so on
            or the raw output/result from the GSM?

            Q Offline
            Q Offline
            Q139
            wrote on 24 Aug 2021, 18:00 last edited by Q139
            #5

            @mrjj Id like to know how to pass incoming and outgoing TCP protocol internet traffic to qTcpClient without using the computer/OS default internet connection that gets used for qTcpClient by default.

            M 1 Reply Last reply 25 Aug 2021, 05:09
            0
            • Q Q139
              24 Aug 2021, 18:00

              @mrjj Id like to know how to pass incoming and outgoing TCP protocol internet traffic to qTcpClient without using the computer/OS default internet connection that gets used for qTcpClient by default.

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 25 Aug 2021, 05:09 last edited by
              #6

              @Q139

              Hi
              What other interface/network do you plan to use instead then ?

              Im not really sure exactly what you mean by that question.

              Say we have a PC with both WIFI and ethernet (lan)
              then if it uses WIFI for internet , you would like to use the LAN
              or what you mean ?

              Q 1 Reply Last reply 25 Aug 2021, 08:54
              0
              • M mrjj
                25 Aug 2021, 05:09

                @Q139

                Hi
                What other interface/network do you plan to use instead then ?

                Im not really sure exactly what you mean by that question.

                Say we have a PC with both WIFI and ethernet (lan)
                then if it uses WIFI for internet , you would like to use the LAN
                or what you mean ?

                Q Offline
                Q Offline
                Q139
                wrote on 25 Aug 2021, 08:54 last edited by Q139
                #7

                @mrjj To direct GSM 2G serial internet directly to qTcpClient within software without OS getting internet access.

                To use preexisting networking code based on qTcp classes.

                The mobile router handles TCP connection itself by default, TCP overhead will be missing and only packet data comes in. Maybe its configurable.

                K 1 Reply Last reply 25 Aug 2021, 09:15
                0
                • Q Q139
                  25 Aug 2021, 08:54

                  @mrjj To direct GSM 2G serial internet directly to qTcpClient within software without OS getting internet access.

                  To use preexisting networking code based on qTcp classes.

                  The mobile router handles TCP connection itself by default, TCP overhead will be missing and only packet data comes in. Maybe its configurable.

                  K Offline
                  K Offline
                  KroMignon
                  wrote on 25 Aug 2021, 09:15 last edited by
                  #8

                  @Q139 said in How to use QTcpServer with serial interface GSM modem?:

                  The mobile router handles TCP connection itself by default, TCP overhead will be missing and only packet data comes in. Maybe its configurable.

                  I don't think this is possible.
                  QTcpClient / QTcpSocket / QUdpSocket works with system tcp/ip stack.
                  I believe, you will have to provide any system lib which will "register" the GSM serial interface with the system tcp/ip stack to be able to use it with Qt.

                  It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                  1 Reply Last reply
                  3

                  6/8

                  25 Aug 2021, 05:09

                  • Login

                  • Login or register to search.
                  6 out of 8
                  • First post
                    6/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved