Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

WaveShare Sim7600E-H Testing Tool

A comprehensive Python-based testing and debugging tool for the WaveShare Sim7600E-H cellular module.

Features

  • Serial Communication: Robust serial connection with configurable baud rate and timeout
  • AT Command Testing: Basic AT command verification
  • Module Information: Query manufacturer, model, serial number, and firmware details
  • Network Testing: Network registration status and signal strength measurement
  • SMS Functionality: Send and read SMS messages for testing cellular connectivity
  • Comprehensive Logging: Detailed logging of all operations and test results
  • Error Handling: Graceful error handling with informative messages

Requirements

  • Python 3.6+
  • pyserial library
  • WaveShare Sim7600E-H module connected via serial port

Installation

  1. Install the required dependency:
pip install pyserial
  1. Ensure your WaveShare Sim7600E-H is properly connected to your computer via USB/serial.

Usage

Basic Testing

Run all tests on a specific serial port:

python Test.py COM3          # Windows
python Test.py /dev/ttyUSB0  # Linux/Mac

SMS Testing

To include SMS functionality tests (sending and reading SMS):

python Test.py COM3 --testsms +1234567890

Warning: SMS tests will send actual SMS messages and may incur costs. Ensure you have proper authorization and sufficient balance.

Test Results

The tool will run the following tests:

  • Basic AT Test: Verifies basic communication with the module
  • Module Information Test: Queries manufacturer, model, serial number, and firmware details
  • Network Registration Test: Checks if the module is registered on the cellular network
  • Signal Strength Test: Measures the current signal strength (RSSI)
  • SMS Test: Attempts to send a test SMS message (only when --testsms PHONE_NUMBER is used)
  • SMS Reading Test: Tests reading SMS messages from the module (only when --testsms is used)

Output Example

usage: Test.py [-h] [--testsms PHONE_NUMBER] port
Test.py: error: argument --testsms: expected one argument
python WaveShareTest.py COM12 --testsms 0049172xxxxx
2025-10-10 08:29:39,217 - INFO - Connected to COM12 at 115200 baud
2025-10-10 08:29:39,217 - INFO - Testing basic AT command...
2025-10-10 08:29:39,222 - INFO - Basic AT test PASSED
2025-10-10 08:29:39,222 - INFO - Testing module information queries...

--- Module Information ---
Manufacturer: SIMCOM INCORPORATED
2025-10-10 08:29:39,224 - INFO - Manufacturer query PASSED
Model: SIMCOM_SIM7600E-H
2025-10-10 08:29:39,226 - INFO - Model query PASSED
Serial Number: 86814XXXXXXX
2025-10-10 08:29:39,228 - INFO - Serial Number query PASSED
Module Version: +CSUB: B04V03
2025-10-10 08:29:39,229 - INFO - Module Version query PASSED
Firmware Version: +CGMR: LE20B04SIM7600M22
2025-10-10 08:29:39,230 - INFO - Firmware Version query PASSED
Network Operator: +COPS: 0,0,"Telekom.de Telekom.de",0
2025-10-10 08:29:39,232 - INFO - Network Operator query PASSED
--- End Module Information ---

2025-10-10 08:29:39,233 - INFO - Module info test PASSED - 6/6 queries successful
2025-10-10 08:29:39,233 - INFO - Testing network registration...
2025-10-10 08:29:39,235 - INFO - Network registration test PASSED
2025-10-10 08:29:39,235 - INFO - Testing signal strength...
2025-10-10 08:29:39,236 - INFO - Signal strength test PASSED - RSSI: 21 (-71 dBm)
2025-10-10 08:29:39,236 - INFO - Testing SMS functionality...
2025-10-10 08:29:39,237 - INFO - Testing network registration...
2025-10-10 08:29:39,239 - INFO - Network registration test PASSED
2025-10-10 08:29:43,145 - INFO - SMS sent successfully
2025-10-10 08:29:43,145 - INFO - SMS test PASSED
2025-10-10 08:29:43,145 - INFO - Testing SMS reading functionality...
2025-10-10 08:29:43,162 - INFO - All SMS messages read successfully
2025-10-10 08:29:43,162 - INFO - SMS reading test PASSED - found 2 messages

--- SMS Messages ---
SMS: 0,"REC READ","+49172xxxxx","","25/10/10,08:11:22+08"
Content: Ok
----------------------------------------
SMS: 1,"REC READ","+49172xxxxx","","25/10/10,08:27:17+08"
Content: Hshsjsjs

OK
----------------------------------------
--- End SMS Messages ---


--- Radio Diagnostics ---
Operator: Telekom.de Telekom.de
RAT: GSM (2G) (code 0)
--- End Radio Diagnostics ---


Test Results:
test_basic_at: PASSED
test_module_info: PASSED
test_network_registration: PASSED
test_signal_strength: PASSED
test_sms: PASSED
test_sms_reading: PASSED
2025-10-10 08:29:43,182 - INFO - Disconnected from serial port

Configuration

Serial Port Settings

The tool uses the following default settings:

  • Baud rate: 115200
  • Timeout: 1 second

You can modify these in the Sim7600Tester class constructor if needed.

SMS Test Configuration

For the SMS test, you'll need to modify the test recipient number in the code:

test_recipient = "+1234567890"  # Replace with actual test number

Warning: The SMS test will attempt to send an actual SMS message. Ensure you have:

  • A valid SIM card with SMS capability
  • Sufficient balance/plan for SMS
  • Network coverage
  • A valid recipient phone number

Class Reference

Sim7600Tester

Main testing class for the Sim7600E-H module.

Methods

  • connect(): Establish serial connection
  • disconnect(): Close serial connection
  • send_at_command(command): Send AT command and return response
  • read_response(): Read response from serial buffer
  • send_sms(recipient, message): Send SMS message
  • read_sms(index): Read SMS messages (all or specific index)
  • test_basic_at(): Test basic AT communication
  • test_module_info(): Test module information queries
  • test_network_registration(): Test network registration status
  • test_signal_strength(): Test signal strength
  • test_sms(): Test SMS sending capability
  • test_sms_reading(): Test SMS reading capability
  • run_all_tests(): Run all available tests

Troubleshooting

Common Issues

  1. Serial Port Not Found

    • Verify the correct serial port (COM3, /dev/ttyUSB0, etc.)
    • Check device manager (Windows) or dmesg (Linux) for connected devices
  2. Module Not Responding

    • Ensure the module is powered on
    • Check power supply and connections
    • Verify SIM card is properly inserted
  3. Network Registration Failed

    • Check SIM card validity and balance
    • Verify antenna connection
    • Ensure you're in an area with cellular coverage
  4. SMS Test Failed

    • Verify SIM card has SMS capability
    • Check account balance/plan
    • Ensure valid recipient number format (+country code)

Debug Mode

Enable debug logging by modifying the logging level:

logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')

Hardware Setup

  1. Connect the WaveShare Sim7600E-H to your computer via USB
  2. Insert a valid SIM card into the module
  3. Ensure proper power supply (check module specifications)
  4. Connect antenna for better signal reception

License

This project is open source. Feel free to modify and distribute.

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

Disclaimer

This tool is provided as-is for testing and debugging purposes. Always ensure you have proper authorization before sending SMS messages or using cellular services.

About

A Python utility for testing and diagnosing SIMCom SIM7600 series LTE modems over serial.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages