on7lds / NextionDriver

Driver program to connect MMDVMhost with Nextion Displays, adding extra functionality
34 stars 33 forks source link

Debugging: NextionDriver output? #17

Closed rd0fun closed 3 years ago

rd0fun commented 3 years ago

Is there a way to tap the NextionDriver port to see the data being returned to the screen for debugging purposes?

on7lds commented 3 years ago

Start NextionDriver with -d -vvvv (= do not go to background and be very verbose) as extra options You'll see a lot of info of what is being done (what is received, transmitted, etc)

rd0fun commented 3 years ago

Perfect, thank you. Immediately I have another question (sorry!).

Started with screenLayout 3                                                     
Started with verbose level 2                                                    
Opening sockets ...                                                             
Transparent Connection: talking socket open, fd=4                               
Try to bind 0.0.0.0 ...                                                         
Transparent Connection: listening socket open, fd=5                             
Transparent data sockets active                                                 
I can not (yet) check or update modem connected displays                        
Starting without network interface   

I thought the driver uses a local port on localhost to communicate, why the "starting without network"?

Also, modem connected displays cannot pass data? That was a surprise to see, I thought that was resolved? Actually, I though that was the point of NextionDriver; to enable transparent data to/from the display via "FrameType" no matter how connected?

Thanks for the great work!

on7lds commented 3 years ago

You can run NextionDriver without network if you do not use transparent data.

You can ask NextionDriver to wait for an active network interface when starting. If not, it starts faster (without waiting for an active network interface), but it might delay anyway when starting if transparent data is enabled.

Modem connected displays mostly have only one direction of communication (that is: TO the display). This is because in the modem firmware the serial return-path mostly is not implemented. One of the NextionDriver features is it can check or update a display and it can react to messages from the display (f.e. button press). But then bidirectional communications are required. Hence the message.

NextionDriver is not just for the transparent data, it is for having more possibilities to control your display layout (f.e. check https://fr-fr.facebook.com/groups/Nextion).