You are here

howto: meshchat on Mikrotik hAP using extra USB storage for files

7 posts / 0 new
Last post
howto: meshchat on Mikrotik hAP using extra USB storage for files

Here is a general outline for setting up extra USB sorage for files, using the USB port on Mikrotik hAP.

You will need to be comfortable using command line and 'vi' editor, and able to follow (but not create) bash.  Internet and/or offline package cache needed.

Do not test this on a production device--make sure you have easy access for reflash if you mess up!


Prepare USB storage:
format USB as FAT32 on another computer (do not insert to hAP yet)
Install packages on hAP:
Insert prepared USB into hAP
Install package 'block-mount' on hAP
Copy 'USB Passthrough' script code from near bottom of /etc/rc.d/S99local:
Paste into bottom of /etc/rc.d/S10boot, just before last '}'.
This is required so USB device is available by execution of /etc/rc.d/S40fstab
'Comment out' (with #) the 'USB Passthrough' script code from /etc/rc.d/S99local
Modify /etc/config/fstab:
Change 'option enable '0'' to '1' for the USB device
Reboot hAP and check that USB is mounted
Install meshchat .ipk
Modify meshchat config to use USB storage:
Change /www/cgi-bin/
modify these (3) for USB path:
modify appropriately:
Create any missing folders/subfolders in meshchat USB path with respect to the (3) paths above in
Restart meshchat:
/etc/init.d/meshchatsync restart
K9CQB's picture
This should also work on the BaseBox as well, right?
This should work on any of the MikroTik devices that have a USB port, like the BaseBox series. Will this also work on the GL devices (AR150, AR300, AR750, etc.) that have USB ports?
Would it be possible to include this working USB storage support as a 'check block' option in the base AREDN firmware like it currently is with USB power or PoE passthrough?

-Damon K9CQB
I don't have any other

I don't have any other devices to try it on, but if you have those kernel modules available in the repository for your device I would think so?

Give it a shot if you have a device to experiment on!

You will know for sure, if you have the correct USB packages installed, you should see the detection of the USB storage partitions in the output of 'dmesg' command from the cli.  It will absolutely work if you see that.  It is possible that you may need other USB related kernel module packages installed for the other models of devices, I sort of guessed on the correct ones, such as 'usb2' vs 'usb3', etc.

I don't have the coding skills to automate and harden it for inclusion to firmware, I guess you could call this a proof of concept.

Also, you could consider using native linux ext2 filesystem instead of FAT32, or some other filesystem for the USB storage, but keep in mind that Windows OS will not be able to make sense of that filesystem.  

The Mikrotik devices do tend to have extra flash and RAM to support something like this.

Matt, KB9OIV

Another thing I want to try
Another thing I want to try is GPS ntp support via USB GPS dongle and ntpd.  I bet that could be functional.  The package repository doesn't seem to have usb serial modules included.  The raspberry pi is really good for this stuff, too, but I was looking for a way to use what I have.
AA7AU's picture
GPS-NTP side note

On a side note: I've been struggling trying use an inexpensive USB GPS dongle with an Arch-based (HamVoip) PI to upddate my already existing NTP PI sever (which straddles the mesh as well as the interwebs) but have run into confusing issues which have so far side-tracked me. At this poont, I'm thinking I'll have to go back to a separate Raspian instance for this.

- Don - AA7AU

K5DLQ's picture
Just be careful of flash
Just be careful of flash storage space after loading the drivers.   On 32MB devices, it's tight.
kj6dzb's picture
Is this still a valid way to
Is this still a valid way to increase storage for mesh chat? Im wondering if the Dev team could bring this upto date with the current FW.

Im wondering about 2 things? 

1: Is this the only version of Mesh Chat able to run on fw <

2: It would be useful for others... in the future, for mesh chat to have a config page too assist configuration from the UI.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer