RFExplorer / RFExplorer-for-Python

RF Explorer libraries and examples for Python 3
GNU Lesser General Public License v3.0
51 stars 25 forks source link

resetIOT_HW takes too much time #11

Closed fviard closed 5 years ago

fviard commented 5 years ago

Hi, I have a RF Explorer 3G+ IoT board to that i'm evaluating to be use with the python sdk.

Reset the hardware (ResetIOT_HW) takes a little bit too long because the code is like this:

` import RPi.GPIO as GPIO

        #print("RPi info: " + str(GPIO.RPI_INFO)) #information about your RPi:
        #print("RPi.GPio version: " + GPIO.VERSION) #version of RPi.GPIO:
        GPIO.setwarnings(False)
        GPIO.setmode(GPIO.BOARD)    #refer to the pin numbers on the P1 header of the Raspberry Pi board
        GPIO.setup(12, GPIO.OUT)    #set /reset (pin 12) to output 
        GPIO.output(12, False)      #set /reset (pin 12) to LOW
        GPIO.setup(21, GPIO.OUT)    #set GPIO2 (pin 21) to output
        GPIO.output(21, bMode)      #set GPIO2 (pin 21) to HIGH (for 500Kbps)
        time.sleep(0.1)             #wait 100ms
        GPIO.output(12, True)       #set /reset to HIGH
        time.sleep(2.5)             #wait 2.5sec
        GPIO.setup(21, GPIO.IN)     #set GPIO2 to input
        GPIO.cleanup()              #clean up GPIO channels 

` Its looks like that you are waiting 2.5s after the reset for the device to be ready.

2s is a very long time. So, I was wondering if it is really needed and if we can't reduce that delay?

Thank you

arocholl commented 5 years ago

Hi, yes this is expected and required time for the firmware to fully initialize all internal electronics.