element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Interfacing Raspberry Pi 5G HAT with other controller
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 33 replies
  • Answers 1 answer
  • Subscribers 669 subscribers
  • Views 4323 views
  • Users 0 members are here
Related

Interfacing Raspberry Pi 5G HAT with other controller

meera_hussien
meera_hussien over 1 year ago

Gooday,

I am trying to interface the 5G HAT module with the XIAO ESP32C3 module through the UART and also through the USB to TTL, but both are unsuccessful. 

Has anyone tried this method? Or is there a different method that can be used?

Below is the 5G HAT that i am using 

image

https://www.waveshare.com/wiki/RM500Q-GL_5G_HAT.

Appreciate if anyone can help on this

  • Sign in to reply
  • Cancel
  • balajivan1995
    0 balajivan1995 over 1 year ago in reply to meera_hussien

    There is a garbage character that appears before  or after "AT\r\n", enable the checkbox of hex along with Ascii to see the unnecessary character and remove it from the code. Try to find out the reason for that, now connect the ttl to 5g modem and send the message like this. Make sure the "CR-LF" is selected under "Send on enter" dropdown option. It will automatically add "\r\n". If the modem returns OK, then you can connect ESP32 directly to Modem.

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • meera_hussien
    0 meera_hussien over 1 year ago in reply to balajivan1995

    Hi. I would like to update the progress. I have tried what you suggested balajivan1995 . But it was not a success either. I tried checking the design file, and I found that there is no UART pin available. The only available interface is the USB and PCIe.

    image

    Could it be the reason why I am not able to communicate through the UART? If so, what would be the best way to communicate the 5G modulewith the controller?

    Appreciate your help on this matter, shabaz  and balajivan1995 . Thank you.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • balajivan1995
    0 balajivan1995 over 1 year ago in reply to meera_hussien

    I don't have any experience in PCIe communication. As for the USB, we can try two things,

    1. Connect USB to UART TTL to the board and connect it to ESP32's UART and hope AT Port is accessible through it.

    2. Change ESP32C3 to ESP32S3 or some other controller that supports USB host communication. 

    In this section, they've mentioned UART port is accessible in 3 modules, are you sure yours is not one of them? 

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • meera_hussien
    0 meera_hussien over 1 year ago in reply to balajivan1995

    Yes balajivan1995 . I using the RM502Q-AE.

    image

    I will change the controller board and try to see if it can work.

    Thank you.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 1 year ago in reply to meera_hussien

    It may be worth first confirming operation with a Pi. According to the Waveshare website, the UART is the only interface connected to the Pi. 

    image

    If the interface really is only USB and PCIe, then there's little hope of working with ESP32. 

    There is a chance that USB may work, but only if ESP32 can operate as USB Host (which I have no idea if it can, but hopefully it is documented somewhere), if the interface on the Waveshare card is USB peripheral.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • meera_hussien
    0 meera_hussien over 1 year ago in reply to shabaz

    Sorry for the late reply. Currently, I am confirming with Raspberry Pi.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Sonicel
    0 Sonicel over 1 year ago

    Hi, the timing and baud rates are the problems in interfacing such as baud rate, X-on, X-off, you need to flash or program the HAT using Hyper terminal or the s/w that came with the controller. And match it with the specifications with your devices. After which you need to fully reset and turn on one device at a time.

    This should then work, if not, check your C++ script language for errors. you may have to flash the correct software again to make it all match. I notice there is no [end] in the script language or [return]

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • meera_hussien
    0 meera_hussien over 1 year ago in reply to Sonicel

    Hi Sonicel ,

    Thank you for the reply. Currently i am using the Raspberry to interface and verify it everything is working fine. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • meera_hussien
    0 meera_hussien over 1 year ago

    Hi shabaz & balajivan1995 ,

    To update on the progress. I am able to communicate with the 5G HAT with the RPI through the USB. I am able to send/receive the AT command. Currently i am trying to write a code to read temperature value and send the data to the cloud through the 5G HAT via GSM. Is there any reference or sample code that i can refer to? 

    Appreciate your help on this. If you need further info please do let me know.

    Thanks again.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • balajivan1995
    0 balajivan1995 over 1 year ago in reply to meera_hussien

    well, since you are using USB interface, you can forget about  AT commands. Follow the instructions here to install network drivers for RPI. If the driver installation went smoothly, you will be able to access internet just like with an Ethernet or USB dongle.

    As for the sending telemetry to cloud, you can write a python script that runs in background and send data at the time period you set, again no need to worry about internet connectivity if the driver installation is done properly. 

    Unless you explicitly need to use in GSM mode, 5G hat is an overkill. You could use BG96 or SIM800 for that purpose.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
<>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube