|
NetBurner 3.5.6
PDF Version |
Updating a device application can be done many ways. The most common is over a network connection, but there are times when it is preferrable or necessary to update an applicatoin over a serial connection.
The Serial Update Example demonstrates two approaches: #- Serial config server. This can be though of as being the same as manually entering the serial config server with an A to abort command and using the fla command to flash the application. #- Direct. This method assumed 100% control over the update and does not use the serial configuration server.
The void ResumeSerialConfig(int fd_cfg, bool persist) system function is used to trigger the serial configuraiton server to use the specified file descriptor to process the serial stream. Nothing more is required. This is the most common method.
The direct method puts the update responsibility on the application. The example demonstrates two scenarios: The serial port is being used for both applications data as well as a serial application update. In this case a mechanism is required to identify an update vs serial data. To accomodate this situation, the example provides an approach to using a configurable preamble and escape mechanisms. It is up to the application to decide what the best mechanisam is to identify an update vs data; the example provides one such method. A preamble and/or escape mechanism may or may not be necessary in your specific use case.