What happened to pin_deepsleep_wakeup()?



  • Hi! I am not quite sure what has happened with the machine.pin_deepsleep_wakeup() function.
    I have a bunch of PyComs lying around and I tested this with one of my devices and Adafruit's PIR sensor. Worked fantastically. But now, I get this when I try the same code out on my other devices upgraded to the latest version:

    AttributeError: 'module' object has no attribute 'pin_deepsleep_wakeup'
    

    Code:

    import machine
    machine.pin_deepsleep_wakeup(["P2"], mode=machine.WAKEUP_ANY_HIGH)  
    

    This makes me feel like it is like os.mkfs() - something has changed without updates to the documentation. Or maybe it is just me that has done something wrong...



  • Hi techykermit,

    I'm sorry about the delay in the documentation update. I've now updated the machine.pin_deepsleep_wakeup() function - [https://docs.pycom.io/firmwareapi/pycom/machine/#machine-pin-deepsleep-wakeup-pins-mode-enable-pull] and I am currently working on updating the the os.mkfs() function in the documentation.

    Keep us posted with how you get on,

    Ankith B
    Have you checked out our docs for the answer? (Now with an easy search function) https://docs.pycom.io   
    Check out our newly revamped device management platform, Pybytes! https://pybytes.pycom.io/



  • @robert-hh I fear you are right. Not exactly a way to win hearts & minds.



  • @kjm Sorry, I have no clue of Pycom intentions and plans. The whole company seems to be silent, not activity at the forum. But as I understood Pycom's post about the latest Sequans modem improvement, it includes both software and hardware changes. This means, that even with an updated firmware the old devices will not get par with the new ones.



  • @robert-hh Ah pfalcon what a mixture of talent & hubris! OK, what about something closer to pycom. My latest gpy has 43818 sequans firmware & is much more stable on lte than all my other GPYs but pycom don't seem to be in any hurry to provide an upgdiff_41065-to-43818.dup upgrader. Do I really have to go out & buy all new GPYs or might there be a way to upgrade the old ones? Is there any way I could get the 43818 firmware out of the modem?



  • @kjm Even if Pycom would care about pull request from the community, they are not responsible for micropython-lib, which is in the domain of micropython.org. And that is some kind of grey area, since

    • the primary focus of that lib is the Linux port
    • urequests.py like most of the code was contributed by Paul Sokolovsky, which is not that active any more in the group. He still contributes to the lib, but with the focus of his own Micropython flavor, which slowly drifts away from the mainline.
    • the lib is not maintained as well as the main package. Which does not hurt. Being it Python source code, you can always incorporate the changes in your code. It is "just" for the sake of the community, if bug are fixed and improvements get public.


  • @robert-hh Speaking of missing/renamed functionality, has anybody managed to figure out why https://github.com/micropython/micropython-lib/pull/263/files won't work with urequests on pycom gpy?



  • @robert-hh Very interesting. You are correct, it works now. The documentation needs some updates - os.mkfs() is another example of a function that has been changed.



  • @techykermit Looks like it is called "pin_sleep_wakeup" now.

        { MP_OBJ_NEW_QSTR(MP_QSTR_remaining_sleep_time),    (mp_obj_t)(&machine_remaining_sleep_time_obj) },
        { MP_OBJ_NEW_QSTR(MP_QSTR_pin_sleep_wakeup),    (mp_obj_t)(&machine_pin_sleep_wakeup_obj) },
        { MP_OBJ_NEW_QSTR(MP_QSTR_reset_cause),             (mp_obj_t)(&machine_reset_cause_obj) },
    

    The code is changed but not the documentation.


Log in to reply
 

Pycom on Twitter