Struct ublox_cellular::command::file_system::PrepareDownloadFile [−][src]
Expand description
22.2 Download file +UDWNFILE
Stores (writes) a file into the file system:
- The stream of bytes can be entered after the ‘>’ prompt has been provided
to the user. The file transfer is terminated exactly when
bytes have been entered and either “OK” final result code or an error result code is returned. The feed process cannot be interrupted i.e. the command mode is re-entered once the user has provided the declared the number of bytes. - If the file already exists, the data will be appended to the file already stored in the file system.
- If the data transfer stops, after 20 s the command is stopped and the “+CME ERROR: FFS TIMEOUT” error result code (if +CMEE: 2) is returned.
- If the module shuts down during the file storing, all bytes of the file will be deleted.
- If an error occurs during the file writing, the transfer is aborted and it is up to the user to delete the file.
Notes:
- TOBY-L4 / TOBY-L2 / MPCI-L2 / LARA-R2 / TOBY-R2 / SARA-U2 / LISA-U2 / LISA-U1 / SARA-G4 / SARA-G3 / LEON-G1 - The available free memory space is checked before starting the file transfer. If the file size exceeds the available space, the “+CME ERROR: NOT ENOUGH FREE SPACE” error result code will be provided (if +CMEE: 2).
- TOBY-L2 / MPCI-L2 / LARA-R2 / TOBY-R2 / SARA-U2 / LISA-U2 / LISA-U1 / SARA-G4 / SARA-G3 / LEON-G1 - If the HW flow control is disabled (AT&K0), a data loss could be experienced. So the HW flow control usage is strongly recommended.
- TOBY-L4 - The ‘>’ prompt after which the stream of bytes can be entered will be provided to the user on a dedicated channel of the USB CDC-ACM interface. If the command is issued on the AT interface over an IP connection, the DTE will send the binary data over the TCP connection to the DCE. The DTE monitors the TCP data port for the binary data transfer (for more details on the TCP/IP port configuration, see the <tcp_data_port> parameter of the +UIFCONF AT command). After the establishment of the TCP connection from the DTE to the specific port, the DTE will start the file transfer. The ‘>’ prompt is not provided to the user on the AT interface over an IP connection. The DCE will close the connection when the specific amount of data is received, or an error result code occurs. Once the AT command is issued, the DCE will listen on the specific port and will close it after the timeout expiration (20 s). The DCE will close the TCP connection, if no data are received for 30 s.
Fields
filename: &'a str
size: usize
Trait Implementations
type Response = NoResponse
type Response = NoResponse
The type of the response. Must implement the AtatResp
trait.
type Error = GenericError
type Error = GenericError
The type of the error.
Return the command as a heapless Vec
of bytes.
Parse the response into a Self::Response
or Error<Self::Error>
instance.
The max timeout in milliseconds.
Force the ingress manager into receive state immediately after sending the command. Read more
Force client to look for a response. Empty slice is then passed to parse by client. Implemented to enhance expandability fo ATAT Read more