Giter Site home page Giter Site logo

grfutils's People

Contributors

doclambda avatar smurfix avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

grfutils's Issues

Sending commands in diagnosis mode times out

Sometimes al of a sudden, switching the device into diagnosis mode (SD:$DEVICEID) takes very long but succeeds. Subsequently the actual command times out after a very short time.

I have no idea why this happens. Maybe we need a timeout???

bin/grfctl --device /dev/ttyUSB0 --timeout 60 -v debug activate-signal B1DB
Using device /dev/ttyUSB0...
Using a 60 second timeout...
Using log-level debug...
1425068979.990: INFO:  Initializing device /dev/ttyUSB0
1425068979.991: DEBUG: init: timeout 600 1/10s --> 200 1/10s * 3
1425068979.991: INFO:  Opening /dev/ttyUSB0...
1425068980.048: DEBUG:     got fd=3...
1425068980.049: INFO:  Setting up UART 3...
1425068980.070: INFO:  Setting timeout of 3 to 20.0 seconds...
1425068980.071: DEBUG:   vmin  = 0...
1425068980.071: DEBUG:   vtime = 200...
1425068980.088: DEBUG: sctl: 0x00
1425068980.089: DEBUG: send: <0x02>01TESTA1<0x03> (02 30 31 54 45 53 54 41 31 03)
1425068980.229: DEBUG: recv: <0x06> (len=1) (06)
1425068980.229: DEBUG: send: <0x02>SV<0x03> (02 53 56 03)
1425068980.448: DEBUG: recv: <0x02>GI_RM_V00.72<0x03> (len=14) (02 47 49 5f 52 4d 5f 56 30 30 2e 37 32 03)
Switching signal of B1DB to on...
1425068980.450: DEBUG: sctl: 0x00
1425068980.450: DEBUG: send: <0x02>01TESTA1<0x03> (02 30 31 54 45 53 54 41 31 03)
1425068980.589: DEBUG: recv: <0x06> (len=1) (06)
1425068980.590: DEBUG: send: <0x02>DA:B1DB:05<0x03> (02 44 41 3a 42 31 44 42 3a 30 35 03)
1425068980.749: DEBUG: recv: <0x06> (len=1) (06)
1425068986.869: DEBUG: recv: <0x02>Timeout<0x03> (len=9) (02 54 69 6d 65 6f 75 74 03)
1425068986.870: DEBUG: send: <0x02>SD:B1DB<0x03> (02 53 44 3a 42 31 44 42 03)
1425068986.989: DEBUG: recv: <0x06> (len=1) (06)
1425069006.991: DEBUG: read: No data received. Retrying 2 more time(s)...
1425069021.510: DEBUG: recv: <0x02>REC<0x03> (len=5) (02 52 45 43 03)
1425069027.788: DEBUG: recv: <0x02>Done<0x03> (len=6) (02 44 6f 6e 65 03)
1425069027.789: DEBUG: send: <0x02>DA:B1DB:03<0x03> (02 44 41 3a 42 31 44 42 3a 30 33 03)
1425069027.949: DEBUG: recv: <0x06> (len=1) (06)

-->1425069029.178: DEBUG: recv: <0x02>Timeout<0x03> (len=9) (02 54 69 6d 65 6f 75 74 03) 
ERROR: Activating signal of device B1DB failed: Connection timed out

1425069029.179: INFO:  Closing communication at device /dev/ttyUSB0

Safety checks

Add safety checks to all function calls to check for :

  • NULL pointer arguments
  • buffer overruns
  • invalid argument values
  • failed memory allocations
    etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.