waveshare 4g pi hat error

December 4, 2023, 06:28

qwesaunt

following the guide from core electronics, i tried setting my pi up with waveshare 4g hat and i have a registered sim card but when i try to send a txt or a call, even the gps, i get an error in the program

oops.se

What guide, URL?

qwesaunt

I think a mistake I made was; I had an error when installing a packet and halfway through I changed to root by typing ā€œsudo suā€ to allow the packets to install. Which may have conflicted the permissions?

qwesaunt

Error was that my usr did not have permission to unzip a packet if I recall correctly

oops.se

Then I recommend that you learn the commands `chown^= Change Owner

qwesaunt

Still no luck. When I try to run this command, I get an unexpected error and thatā€™s it. If I run everything as root with sudo su command, I can install everything but the program then doesnā€™t work

qwesaunt


qwesaunt

Iā€™ve tried adding ā€œsudoā€ before the command as well and I get the same error

oops.se

You claim that you get an error, but I can't see that you have posted the error so! I followed the guide but I changed the order. First I enabled the serial port for terminal access: sudo raspi-config 3. Interface Options 16 Serial port yes And then I ran the commands :
sudo apt update
sudo apt -y upgrade
sudo apt install minicom p7zip-full

wget https://www.waveshare.com/w/upload/2/29/SIM7600X-4G-HAT-Demo.7z
7z x SIM7600X-4G-HAT-Demo.7z -r -o/home/pi
sudo chmod 777 -R /home/pi/SIM7600X-4G-HAT-Demo
sudo nano /etc/rc.local
sh /home/pi/SIM7600X-4G-HAT-Demo/Raspberry/c/sim7600_4G_hat_init

cd /home/pi/SIM7600X-4G-HAT-Demo/Raspberry/c/bcm2835
chmod +x configure && ./configure && sudo make && sudo make install
PS! Remember to change pi to the user your using. And I encounter no problem!

oops.se

And please post text as text

qwesaunt

Sorry for not clarifying, Iā€™m very new to this. After running it the other way, I my seemed to work until I ran into this issue. I thought I had already given myself permission

oops.se

And please post text as text! I can't read microscopic text in pictures!

qwesaunt

Bash: cd: /home/pi/SIM7600X-4G-HAT-Demo/Raspberry/c/bcm2835: Permission denied

oops.se

Is the user "pi"? What is the result from the command whoami?

oops.se

This is all install commands changed to using the current user, NOT using a hardcoded user (pi)!
sudo apt update
sudo apt -y upgrade
sudo apt install minicom p7zip-full

wget https://www.waveshare.com/w/upload/2/29/SIM7600X-4G-HAT-Demo.7z
7z x SIM7600X-4G-HAT-Demo.7z -r -o/home/$USER
sudo chmod 777 -R /home/$USER/SIM7600X-4G-HAT-Demo
sudo nano /etc/rc.local
sh /home/$USER/SIM7600X-4G-HAT-Demo/Raspberry/c/sim7600_4G_hat_init

cd /home/$USER/SIM7600X-4G-HAT-Demo/Raspberry/c/bcm2835
chmod +x configure && ./configure && sudo make && sudo make install

qwesaunt

The result when I type whoami comes back as Jake

qwesaunt

And the terminal name is Jake@4GPi

qwesaunt

Iā€™ve got the program installed finally. Thank you very much. Now I just have to learn how to use it lol

qwesaunt

Changing to the current user did the trick

qwesaunt

Thanks. Appreciate the help!

iursevla

<@317114145654964225> does the hat work well? Can it send SMS ?

qwesaunt

Itā€™s supposed to be able to but Iā€™m having a hard time getting it to work properly. Iā€™ve put it on the back burner for now hoping that Iā€™ll developed the skills to learn it soon enough. Iā€™m 99% sure itā€™s just user error since Iā€™m brand new to using raspberry piā€™s

qwesaunt

According to the article and the python files, the hat can send sms, phone calls, and gps

iursevla

Thanks, got any link for the hat and articles? Sorry, I'm on mobile right now and can't read the whole thread

oops.se

It is a "Mobile phone" and it has audio in/out so you can even make phone calls with it. But it is not a "Smart phone".