Civlo85 / gsmHat

Using the Waveshare GSM/GPRS/GNSS Hat for Raspberry Pi with Python
MIT License
60 stars 26 forks source link

can I use it with pi-zero ? I have SIM7600G-H 4G HAT (B) #12

Open SmartTransp opened 2 years ago

SmartTransp commented 2 years ago

Hello, wanted to know if I can use it on pi-zero ? because I'm trying to get GPS data only

from gsmHat import GSMHat, SMS, GPS

try:
    gsm = GSMHat('/dev/ttyS0', 115200)
except Exception as e :
    print (e)
else:
    try:
         GPSObj = gsm.GetActualGPS()
    except Exception as e :
         print (e)
    else:
         print('GNSS_status: %s' % str(GPSObj.GNSS_status))
         print('Fix_status: %s' % str(GPSObj.Fix_status))
         print('UTC: %s' % str(GPSObj.UTC))
         print('Latitude: %s' % str(GPSObj.Latitude))
         print('Longitude: %s' % str(GPSObj.Longitude))
         print('Altitude: %s' % str(GPSObj.Altitude))
         print('Speed: %s' % str(GPSObj.Speed))

and I get error

    raise Exception('Could not determine Jetson model')
Exception: Could not determine Jetson model

the modem is connect to the internet without any problem (so the modem is working)

I'm able to "talk" to the modem using :

minicom -D /dev/ttyUSB2


Thanks,

smartroad commented 2 years ago

I am using it on a Pi Zero at the moment, I'm not using try when I start the hat, just calling gsm = GSMHat('/dev/ttyS0', 115200). Although I am using the SMS side, I am also not putting the calls for send/recieve SMS in a try condition.

SmartTransp commented 2 years ago

Not working same error

GaWr26 commented 2 years ago

Did anybody get this working on a SIM7000? Is there an alternative? Cheers