A comprehensive Python-based testing and debugging tool for the WaveShare Sim7600E-H cellular module.
- 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
- Python 3.6+
- pyserial library
- WaveShare Sim7600E-H module connected via serial port
- Install the required dependency:
pip install pyserial- Ensure your WaveShare Sim7600E-H is properly connected to your computer via USB/serial.
Run all tests on a specific serial port:
python Test.py COM3 # Windows
python Test.py /dev/ttyUSB0 # Linux/MacTo include SMS functionality tests (sending and reading SMS):
python Test.py COM3 --testsms +1234567890Warning: SMS tests will send actual SMS messages and may incur costs. Ensure you have proper authorization and sufficient balance.
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)
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
The tool uses the following default settings:
- Baud rate: 115200
- Timeout: 1 second
You can modify these in the Sim7600Tester class constructor if needed.
For the SMS test, you'll need to modify the test recipient number in the code:
test_recipient = "+1234567890" # Replace with actual test numberWarning: 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
Main testing class for the Sim7600E-H module.
connect(): Establish serial connectiondisconnect(): Close serial connectionsend_at_command(command): Send AT command and return responseread_response(): Read response from serial buffersend_sms(recipient, message): Send SMS messageread_sms(index): Read SMS messages (all or specific index)test_basic_at(): Test basic AT communicationtest_module_info(): Test module information queriestest_network_registration(): Test network registration statustest_signal_strength(): Test signal strengthtest_sms(): Test SMS sending capabilitytest_sms_reading(): Test SMS reading capabilityrun_all_tests(): Run all available tests
-
Serial Port Not Found
- Verify the correct serial port (COM3, /dev/ttyUSB0, etc.)
- Check device manager (Windows) or dmesg (Linux) for connected devices
-
Module Not Responding
- Ensure the module is powered on
- Check power supply and connections
- Verify SIM card is properly inserted
-
Network Registration Failed
- Check SIM card validity and balance
- Verify antenna connection
- Ensure you're in an area with cellular coverage
-
SMS Test Failed
- Verify SIM card has SMS capability
- Check account balance/plan
- Ensure valid recipient number format (+country code)
Enable debug logging by modifying the logging level:
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')- Connect the WaveShare Sim7600E-H to your computer via USB
- Insert a valid SIM card into the module
- Ensure proper power supply (check module specifications)
- Connect antenna for better signal reception
This project is open source. Feel free to modify and distribute.
Contributions are welcome! Please feel free to submit issues and pull requests.
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.