Waveshare sim7600X-H 4g hat with arduino

I was watching a youtube video . In this it says that one can use this with arduino. By having a different arrangement of Yellow Jumper caps. I wanted to know what is that arrangement. If someone had any success getting arduino and waveshare sim7600X working together can they help me ?

2 Likes

Waveshare designed the Hat to fit a Raspberry Pi. Communications is via a serial UART interface.
From the Waveshare Web page the YELLOW jumper pins switch between Pi USB to UART, Control via Serial port or Direct Control via USB. The other yellow jumper allows the Pi to turn the HAT on or off.

SIM7600X-on18

The video shows the jumper in position B, Control via Serial port.
In my opinion this would be the same for an Arduino.
Of course the code would be different and the wiring would be different.
Also the Arduino is much slower processor than the Pi, but it should still work ok.

Best of luck, cheers
Jim

PS The Waveshare web page has information on using an Arduino. It does not say anything about changing the yellow jumpers from position B.

3 Likes

Hi Aditya,

Welcome to the forum!!

Here’s the link to the Arduino portion of the Wiki: https://www.waveshare.com/wiki/SIM7600E-H_4G_HAT#Arduino_Demo

With Jim’s astute observation about the jumpers, it shouldn’t be too much hassle getting it working!
Liam

1 Like

Hi James,
I have connected all the pins as shown on the wiki Page .
image
When i try to run it the net light does not blink. I have inserted a 4g Sim in the slot . The usb port in waveshare sim7600x is connected to my pc and arduino is also connected to my pc. It does not detect any thing. When i ran AT$QCRMCALL=1,1 this command showed NO CARRIER . How do i fix this ?
Are there any AT commands which can be run on serial sim7600 debugging assistant ?

1 Like

Sketch uses 4750 bytes (14%) of program storage space. Maximum is 32256 bytes.
Global variables use 624 bytes (30%) of dynamic memory, leaving 1424 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xd3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xd3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xd3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xd3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xd3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xd3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xd3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xd3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xd3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xd3
Failed uploading: uploading error: exit status 1
When i run the arduino Library it shows this as a error message .
Is there a special SIM card which is needed for this to work .

1 Like

If the Arduino is connected to the PC by USB, then pins 0 and 1 are being used by the PC for USB communication, and they can’t also be used by the hat. That’s also why the sketch upload is failing.

The usual way to get UART communication on a UNO while also debugging is to use a software serial library and set the UART to another pair of pins.

An alternative is add some display capability to the UNO (such as I2C 2- or 4- line LCD) and direct debug messages to the LCD. But you would still have to disconnect the PC from the UNO USB when finished uploading the sketch and before starting it.

1 Like

@Aditya259830 These messages mean the Arduino IDE cannot upload the program to the UNO.
It has nothing to do with the Waveshare Hat or SIM card. But …

Suggest removing the Hat and connect just the UNO to the PC, then get the program to upload successfully. The connection of the TX & RX lines to the HAT and PC is causing a conflict as @Jeff105671 mentioned.
Without the program in the UNO nothing will happen, the Hat is not getting configuration information to start.

The Waveshare information on connecting to the UNO is very basic.
Not very helpful.

Once the program is loaded connect the Hat. The Serial Monitor on the Arduino IDE with show messages from the Hat. This is not the best way to do it.

It means you will have to remove the Hat each time you want to change the program in the UNO.
You could use the ICSP connector to upload a program. You will need a programmer such as :-

The way Waveshare are doing this is basically putting a serial monitor across the TX & RX lines and not allowing the Arduino IDE to function as it normally would. As @Jeff105671 said setting up a software serial monitor would be a better option.

The more I look at this the less I like it. Connection of the Waveshare Sim7600 Hat to the UNO has not be fully developed properly and assumes a very experienced user.

I’d stick with the Rpi it has many more options.

Regards
Jim

1 Like

If i use stm32 will it be easier? @Jeff105671 @James46717

@Aditya259830 Which STM32 product are you thinking of ??
A quick check of the datasheet shows the STM32 chip is more powerful than the ATMega328P and has a number of UARTs but it all depends on how it is implemented and what software is available for it.

IMHO you would be introducing more problems.
The original video by Tim shows it works with a Rpi 4B with minimal effort.
To me that it the best starting point.

Regards
Jim

PS The quick check I did of a few implementations showed they made it emulate a UNO R3 and have not used the full functionality of the STM32 chip.

1 Like

Any device that supports a UART interface will work, and that is virtually any MCU you choose. The setup procedures will differ slightly, but UART operation is pretty much universal. The best option is going to depend on the software supporting the HAT - how well it has been written, what examples are available, what problems people have run into, what solutions they found, and whether the features you want to use in your application are well supported. If you need to deviate from a standard case you need to evaluate what skills you are bringing to the project, whether they are adequate for the changes that are needed and what additional resources might be available. Then match that against how adventurous you are prepared to be! A scan through the projects that are described on-line will usually give a good indication of what is involved in each case.

2 Likes

I think i am facing issues when i am trying to connect my Jio sim Card to the 4G hat . When i run AT commands like AT$QCRMCALL=1,1 and AT+CGATT=1 it shows no carrier and no network service respectively.
Is there a specific sim card which is used for this . I do know that it says on the wiki page that the sim should be GPRS enabled. I have also tried to do PPPD method it doesn’t connect to the internet connection that way either . How would i know if my Sim card is GPRS capable or not ?

Is this based on the indicator lights or on responses to the commands?

If you are still getting the message “Failed uploading: uploading error: exit status 1” then the software is not running and any indications from the hat would mean that it hasn’t been initialised correctly, so it’s not even trying to connect.

1 Like

How are you running these commands ??
Are they via the sim7600-H 4G connection to your PC as you mentioned in a previous post.

To make this work you will need to change the Yellow Jumper to position C, and the Arduino is no longer needed. I am assuming the sim7600-H 4G will activate itself in this mode. As I don’t have a sim7600-h 4G I cannot say for sure, but it is what I would do if faced with what you are seeing.

image

Regards
Jim

There are two USB ports on the sim7600-H 4G.
Which one is connected to your PC ??

12 is for testing AT commands as it says.
13 is the connection for controlling the card via USB (I think). It says login to Raspberry Pi. Not really sure what that means.

19 The other yellow jumper may be in the wrong position.
PWR - 3V3 would make the sim7600-H 4G auto configure.
PWR- D6 Startup/Shutdown by Raspberry Pi.

Put it in the PWR - 3V3 position.

18 Put this jumper in position C.

Cheers
Jim

Image2

I am connecting the hat directly to my computer “without any microcontroller(Arduino)” . I am connecting it via usb (12 as shown in the picture above ) . Till now i was trying with the jumper caps at B position now i will fix it on C . I will arrange both of the jumper caps like you have described to see if it works or not .
Update :-
I ran the hat while i had connected sim7600x 4g hat to the pc throough 12 Number usb . I also had the jumper caps in between PWR and 3V3 pins . The jumper cap on 18 was in C position . I ran the commands using this serial debugger provided by waveshare on their wike page (here) . I still got the same error
[01:24:03.026]OUT¡ú¡óAT$QCRMCALL=1,1
¡õ
[01:24:03.033]IN¡û¡ô
NO CARRIER
and
[01:25:01.423]OUT¡ú¡óAT+CGATT=1
¡õ
[01:25:14.331]IN¡û¡ô
+CME ERROR: no network service
The NET llight is not blinking and the PWR light is on.
Regards
Aditya

1 Like

I am not connecting the arduino right now. I am just using the serial debugger provided by waveshare (here) . I have connected the hat to the pc through the usb connection on the hat. (Not USB to UART) . The Jumper caps were on 3v3 and PWR pin. The other jumper caps was on C position . When i run the command it still gives me the same output . The PWR light is on and the NET light is not blinking like it is supposed to.
Regards
Aditya

Reading further into the Waveshare web page …

In the second half of 2021, the SIM7600 series boards will be switched to new versions for shipment.
In the new version, PWR and 3V3 are short-circuited by default

It does not say how to check which version you have. But if it is the new one then putting the jumper in PWR 3V3 position does nothing. Some of the instructions are a little confusing because it says to remove the jumper if you want to use manual mode. Suggest trying manual with the jumper removed. The jumper should not be in the PWR D6 position because you are not using a Rpi or Arduino.

Manual power on/off: Support the “PWRKEY button”

  • “PWRKEY button”: Press the PWRKEY button for about 1 second, wait for about 10 seconds, and see the NET light start to blink once every second, then the module starts to work; if you want to shut down, press and hold PWRKEY button for 3~5s to shut down, and the NET light will be off.

image

Try what it says above and see if the Net light will light up.

After you get the Net light up you should follow the instructions in the Software section of the web page. You need to download and install a Windows Driver and check it configures the ports as shown on the web page. Also download and install the debugging assistant.

If you cannot get the Net light up there is something else wrong, the board maybe faulty, it may not have the correct firmware or the firmware maybe corrupt. In this case I would suggest contacting the supplier you bought the board from.

There is a V1 & V2 schematic link at the bottom of the web page, the only difference seemed to be in the power supply.
The A B C jumpers should not affect operation via a Windows interface. They switch the TX RX between sim7600, Raspberry Pi interface, and the USB to UART connector.
The USB connector you are using is correct for a Windows interface.

I should have looked into this in more detail before, sorry.

Regards
Jim

If i have done all of this and it stil doesn’t work i.e net light does not blink . Then that would mean that there is a defective sim or defective hat .

From what you have said, YES, it is the next thing I would be looking at.

From the web page the Net light OFF means the sim7600 is powered off; asleep.
The instructions say to use the PWRKEY to start it manually.
If this does not work then something in the sim7600X-H is not connecting to the mobile network.

The web page shows a SIM installed as part of the hardware setup and the antennas connected.
It could be the SIM, you could try another.
It could be the antennas.
Or it could be the sim7600X-H firmware or something else with it.

When you type commands to it, it responds with NO CARRIER, so at least the chip is working to that level.

I’d be trying another 4G SIM to start with and make sure it seats nicely against all the pins, the card needs to be activated. Also examine the antenna connections closely, both the antenna and the board; to ensure nothing is wrong. Remove the connector and have a close look at the pins to ensure they are
not bent or broken and the sockets. Check the cable too, the wire could be broken inside. These connectors are very fragile. You probably only need the 4G antenna to get it working, though.

Regards
Jim

@Jeff105671 @James46717
My issue about the module has been solved . It seem the problem was with the sim. Now the net light blinks and Pwr light is on . The sim has been recharged . But whenever i try to run command ATD<my_phone_number> It says no carrier . But I can see that sim has a network names airtel with full network coverage. What could be the problem?