HomeAutomation issues - HomeAutomation System
View Issue Details
0000015HomeAutomation SystemGeneralpublic2012-08-01 23:272012-08-12 14:56
ReporterAnders Sandblad 
Assigned ToAnders Sandblad 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Summary0000015: Speed up USB gateway
Description1. Baudrates. 1Mb/s > 38400b/s
2. Uart double speed, may make it possible to go for 56kb/s or even 115kb/s
3. Lower FTDI latency to 1ms, see additional information
4. Fill FTDI buffer of 62 bytes to force sending

Implementing 1 may need implementing 4 since 1ms will make a big impact otherwise.
Additional Informationhttp://www.spinics.net/lists/linux-usb/msg37973.html
/sys/bus/usb-serial/devices/ttyUSB0/latency_timer
ASYNC_LOW_LATENCY flag

http://projectgus.com/2011/10/notes-on-ftdi-latency-with-arduino/
http://stackoverflow.com/questions/10718693/set-low-latency-flag-on-a-serial-port-on-windows-in-c
http://arduino.cc/forum/index.php?topic=96.0
TagsNo tags attached.
Attached Files

Notes
(0000013)
Anders Sandblad   
2012-08-02 20:48   
Uncomment the following line in config.h to test UART DOUBLE SPEED according 2. above.
#define SERIAL_DOUBLE_SPEED 1
(0000014)
Anders Sandblad   
2012-08-02 21:13   
With SERIAL_DOUBLE_SPEED active a speed of 76800 can be reached with an error of 0.2% (same error as 38400).

250k, 500k and 1M can be reached with an error of 0% but for 1M SERIAL_DOUBLE_SPEED must be active.
(0000015)
Anders Sandblad   
2012-08-02 21:59   
Tests with baudrate of 1Mb/s gives about 900b/s at reprogramming (not scientific measured).
(0000016)
Anders Sandblad   
2012-08-02 22:09   
Changed default baudrate to 1Mb/s and activated SERIAL_DOUBLE_SPEED with http://websvn.auml.se/HomeAutomation/?op=revision&rev=2151
(0000017)
Anders Sandblad   
2012-08-02 22:37   
More optimization is possible but current fix is good enough.
(0000023)
Anders Sandblad   
2012-08-12 14:56   
Closing after verifying that 1Mbit/s works. More optimization possible but unnecessary. Open again or create new issue if needed.

Issue History
2012-08-01 23:27Anders SandbladNew Issue
2012-08-02 20:48Anders SandbladNote Added: 0000013
2012-08-02 21:13Anders SandbladNote Added: 0000014
2012-08-02 21:59Anders SandbladNote Added: 0000015
2012-08-02 22:09Anders SandbladNote Added: 0000016
2012-08-02 22:37Anders SandbladNote Added: 0000017
2012-08-02 22:37Anders SandbladStatusnew => resolved
2012-08-02 22:37Anders SandbladResolutionopen => fixed
2012-08-02 22:37Anders SandbladAssigned To => Anders Sandblad
2012-08-12 14:56Anders SandbladNote Added: 0000023
2012-08-12 14:56Anders SandbladStatusresolved => closed