Print issues on TER-GN910

  • Hi,

    I wish to redirect the operation of the Python print statement. I came across an article in the documentation showing me how to redirect to either SER or USB0. When I reassign sys.stdout and sys,stderr my basic app seems to 'hang'. Commenting out the reassignment statements the code runs as expected. A copy of he code is shown attached:

    SERtest .py.txt

    The PORTCFG value is 0.

    Eventually, I want to use USB0, but I get a similar result as with the SER. Could anyone advise,

    Many thanks

  • Hi,

    Redirecting messages to USB0 is available as of certian FW versions. You can do a quick implemtation your self for this:

    For USB:

    def PrintW(arg):


    and for serial:

    def PrintW(arg):


    Just pay attention to the indentation in the code and initialize the speed of the serial port if you want to use it.