GL-AR300M - 3.027 - Node.JS

Hi all,

Tried for hours to install Node.Js on my new AR300M (Nand).
Checked the forums and cannot compile with MIPS_FPU_EMULATOR .
Tried also the instructions from https://github.com/nxhack/openwrt-node-packages

Does anyone have a step-by-step manual on how to get it ?

It is a shame that GL.iNet doesn’t include it by default, especially they market their routers for hobbyists !!

Many thanks in advance :wink:

Node.js can be “challenging” on a limited-memory device. See, some hints, https://stackoverflow.com/questions/9613528/node-js-with-v8-suitable-for-limited-memory-device

Only 128 MB of RAM and a mid-range, single-core, MIPS-based SoC may not be enough to run much of anything, especially if you intend to run it as a router at the same time. The MIPS architecture also doesn’t support floating-point operations, as far as I know. This is not a GL.iNet limitation, it is an architecture limitation.

You might want to either reconsider your choice of platform or language. I wouldn’t consider anything less than a multi-core ARM-based SoC with at least 512 MB of RAM if I wanted to run Node.js (and would likely disable wireless to prevent memory exhaustion).

MIPS24Kc in the AR9331/9531 doesn’t have an FPU - Even the 24Kf, while having an FPU, needs the FPU_EMULATOR to do correct floating point, there’s a couple of OPS that break/non-compliant operations there.

I agree that something like an RPi is a better solution - more CPU, VFP/Neon support, and Node runs just fine on an RPi2 or higher…

I’m wondering what’s the use case where folks are trying to get Node running on the MIPS boxen?

NodeRED? HomeBridge? MQTT?

Thank you both for your very detailed answer and apologies for my short one, answering from the phone…

Actually my ultimate goal is to run zigbee2mqtt on it. My home automation is based on this protocol (+wifi) and I want to run mosquito and zigbee2mqtt on it. I have also a raspberry (node red and homeassistant) but in the past I got several corrupted cards and I want to separate the 2 systems, so at least i have the mqtt messages.

AR300M v2.264 has NodeJS in the repo. It takes a lot of effort to compile it.
But we didn’t continue to maintain this and there are few people using this.

You can use our MV1000 Brume router, which run ubuntu. So installing nodejs is much easier.

For MQTT you don’t need nodjs.

1 Like

Thanks !
I will try 2.264…
I missed the early birds for MV1000 and currently out of my budget. Thanks for the suggestion !

The Node.JS dependency for Floating Point is actually something upstream - the V8 stuff…

It’s a commonly asked question - the FPU emulation was disabled upstream on OpenWRT to save some RAM/Flash for the super small 4/32 targets on the ar7xxx branch.

There are ways to hack around it - but I wouldn’t recommend it.