I wish I could post a topic in more than one board. This could easily go in the HAT or Interfacing board. I've never really done anything with a pi other than load Lakka or RetroPie on it, so using a HAT with Python is very new to me. There is more information on what exactly I'm doing in the other topic I posted. I'm using a Waveshare SIM7600A-H GNSS HAT attached to my Raspberry Pi 3b with the documentation linked here. I've modified the code they provided to give myself a console so I could learn how it all worked. I'm currently focusing on the GPS aspect and have learned a LOT. There are a couple of things I'd like to do and am not sure how to go about it.
First and foremost I would like to be able to check if the SIM7600 HAT is on. I've programmed my code so that I can exit Python while leaving the module on so that I can update the code and start it again. When I do this I have to manually escape the power on method and would like to be able to just check programmatically if it's on.
Also, the provided example code uses the sleep function to wait between pressing the power button in then depressing it along with another 20 second wait for it to power up. It's a bit hackey and I'd prefer to query the HAT to see if it's ready instead of just waiting some set amount of time. It also has an 18 second wait time for the power down, though I'm not sure if that one has a better solution. The Python code I use for the console is linked here.
The documentation describes using flow control and says the SIM7600 default is hardware flow control.
Thank you for your time.
First and foremost I would like to be able to check if the SIM7600 HAT is on. I've programmed my code so that I can exit Python while leaving the module on so that I can update the code and start it again. When I do this I have to manually escape the power on method and would like to be able to just check programmatically if it's on.
Also, the provided example code uses the sleep function to wait between pressing the power button in then depressing it along with another 20 second wait for it to power up. It's a bit hackey and I'd prefer to query the HAT to see if it's ready instead of just waiting some set amount of time. It also has an 18 second wait time for the power down, though I'm not sure if that one has a better solution. The Python code I use for the console is linked here.
The documentation describes using flow control and says the SIM7600 default is hardware flow control.
1.6.1 Software flow control (XON/XOFF flow control)
Software flow control sends different characters to stop (XOFF, decimal 19) and resume (XON, decimal 17)
data flow. It is quite useful in some applications that only use three wires on the serial interface.
The default flow control approach of SIM7500&SIM7600 Series is hardware flow control (RTS/CTS flow
control), to enable software flow control in the DTE interface and within GSM engine, type the following AT
Command:
AT+IFC=1,1
Ensure that any communications software package (e.g. Hyper terminal) uses software flow control.
I didn't see anything in their example code that checks the RTS/CTS line. I was going to ask how to do this, but I can find that out on my own. Is this something I should look more into? Everything has worked fine so far, but I've only been receiving GPS data. I've yet to send SMS messages, but again their SMS code doesn't have anything that seems to correspond to this.1.6.2 Hardware flow control (RTS/CTS flow control)
Hardware flow control achieves the data flow control by controlling the RTS/CTS line. When the data
transfer should be suspended, the CTS line is set inactive until the transfer from the receiving buffer has
completed. When the receiving buffer is ok to receive more data, CTS goes active once again.
Thank you for your time.
Statistics: Posted by MadDokK — Sat Feb 24, 2024 7:49 pm