Community discussions

MikroTik App
 
MartCLR
just joined
Topic Author
Posts: 1
Joined: Wed Oct 11, 2023 8:39 am

USB and FAT16

Wed Oct 11, 2023 9:05 am

Hi,

I searched the forum and I found some conflicting information regarding supported USB disk formats, but most of the results dated back almost a decade, so I decided to create a new topic. I have a MikroTik hAP ac lite which is running the latest (7.11.2) RouterOS at the time of writing.

I have a controller that uses UF2 Bootloader. I am using the hAP as a WiFi -> Ethernet bridge and would like to use a USB port for debugging (over serial) and flashing the controller.

The following description is based on previous tests using a Windows PC as a host, not MikroTik.
In normal mode, the controller enumerates as a serial device, you can open the serial port and communicate with the controller as expected. When opening the serial port with a baud rate of 1200 the controller is sent to Bootloader mode.
In Bootloader mode, the controller enumerates as a mass-storage device. Windows reports the file system to be FAT (not FAT32 etc.). Checking the bootloader source code it seems to be FAT16.

Back to the MikroTik connection
When the controller is in normal mode and I connect the USB, then /system resource usb print detail results with the following:
Flags: I - inactive 
 0   device="1-0" vendor="Linux 5.6.3 ehci_hcd" name="RB400 EHCI" 
     serial-number="rb400_usb" vendor-id="0x1d6b" device-id="0x0002" 
     speed="480" ports=1 usb-version=" 2.00" 

 1   device="1-1" vendor="Teknic, Inc." name="Teknic ClearCore" 
     serial-number="3A3485875351523451202020FF102C0B" 
     vendor-id="0x2890" device-id="0x8022" speed="12" 
     usb-version=" 2.00"
This implies that the USB connection was successful, MikroTik sees the USB device. Then I send the controller to bootloader mode by resetting it (not via the USB serial I wrote about before). /system resource usb print detail results with the following:
Flags: I - inactive 
 0   device="1-0" vendor="Linux 5.6.3 ehci_hcd" name="RB400 EHCI" 
     serial-number="rb400_usb" vendor-id="0x1d6b" device-id="0x0002" 
     speed="480" ports=1 usb-version=" 2.00" 

 1   device="1-1" vendor="Teknic, Inc." name="ClearCore" 
     serial-number="3A3485875351523451202020FF102C0B" 
     vendor-id="0x2890" device-id="0x0022" speed="12" 
     usb-version=" 2.00"
As you can see, the device is still connected, but the device-id has changed to 0x0022 which is correct - in mass-storage mode the device-id changes, also indicating, that the connection is successful.

Everything until this point seems to be working nicely, but in mass-storage mode, MikroTik does not see any files or the drive. /disk print command just hangs and does not return anything.
I tested the theory that FAT16 is not supported by formatting a USB stick firstly to FAT32 which worked right away when connected to the MikroTik. Then I formatted the same drive to FAT (Windows does not show the 16 suffix, probably it is FAT16) and the drive/files did not appear.

Is there any workaround to get FAT16 working as well?

Who is online

Users browsing this forum: stef70 and 5 guests