...
Bluetooth is widely used when it is necessary to provide a wireless access to the devices located in short distances. In this application note we will show how to organize a wireless FTP access to the NXP i.MX RT1050 EVK running Linux using a USB Bluetooth adapter. In practical embedded applications such a wireless channel may be used to retrieve data collected by the i.MX RT1050 via the standard FTP protocol. The most obvious use case scenario for this need is a technician visiting an embedded device residing at a remote site in order to retrieve data collected and stored locally by the i.MX RT1050 board locally (e.g. the i.MX RT1050 may store data on a EXT2 partition in the SD Card or on a connected USB Flash). Being able to access the i.MX RT1050 over Bluetooth from a notebook or a smartphone, with no need to connect to the i.MX RT1050 with any physical cables, comes in very hand, especially for devices with limited physical access.
1. Hardware Platform
The hardware platform used in this application note is the NXP i.MX RT1050 EVK board with a USB Bluetooth adapter plugged into the USB 2 J10 connector. The generic Linux kernel device driver for the USB transport HCI layer (CONFIG_BT_HCIBTUSB
) is used in this configuration so other USB Bluetooth adapters should work as described below too.
2. Software Platform
Support for the Bluetooth FTP server is implemented by the obexftp
package:
http://dev.zuckschwerdt.org/openobex/wiki/ObexFtp.
...
The functionality described below is available from the rootfs.uImage project provided by Emcraft for the NXP i.MX RT1050 EVK board.
3. Test Setup
We will use the following terminology below:
Target: NXP i.MX RT1050 EVK board with the Bluetooth adapter plugged into the USB HS port.
The Bluetooth <Target address> in the examples below is 04:7F:0E:31:B7:94;Host: Any computer with a Bluetooth interface, running Linux with the Bluetooth tools (
bluez-utils
,openobex
, andobexftp
) installed.
The Bluetooth <Host address> in the examples below is BC:77:37:5C:32:57.
4. Bluetooth FTP Server on i.MX RT1050
Power-on the NXP i.MX RT1050 EVK board and wait for the Linux to boot on the Target. Run the Bluetooth daemons in the background:
...
Code Block |
---|
/root # ls -lt /root -rw-r--r-- 1 root root 524288 Jan 1 00:09 512kB.host lrwxrwxrwx 1 root root 12 Jan 1 00:00 busybox -> /bin/busybox |
5. Bluetooth FhTP Client on i.MX RT1050
The Target may also implement the FTP Client functionality and connect to the FTP servers exported over Bluetooth by other devices. The obexftp utility is integrated into the rootfs project and may be used for this purpose. See the commands executed on the Host above in this application note: similar commands may be run on the Target side if we want it to perform the FTP Client role.