Compile "helloworld" for the Teltonika RUT956

I've tried to compile a simple "helloworld" app for the RUT956, but I get the following :-

./helloworld: line 1 syntax error: unexpected "(" expecting ")".

I am guessing that the code is not being built for the correct architecture. I wonder if anyone can point me in the right direction for howto compile for this router?

Doubtful an architecture choice is going to drive a syntax error.

1 Like

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
root@RUT956:~# ubus call system board
{
        "kernel": "5.15.159",
        "hostname": "RUT956",
        "system": "MediaTek MT7628AN ver:1 eco:2",
        "model": "Teltonika RUT9M",
        "board_name": "teltonika,rut9m",
        "release": {
                "distribution": "OpenWrt",
                "version": "21.02.0",
                "revision": "r16279-5cc0535800",
                "target": "ramips/mt76x8",
                "description": "OpenWrt 21.02.0 r16279-5cc0535800"
        }
}
root@RUT956:~# 

It appears you are using firmware that is not from the official OpenWrt project.

When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.

You may find that the best options are:

  1. Install an official version of OpenWrt, if your device is supported (see https://firmware-selector.openwrt.org).
  2. Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
  3. Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).

If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.

Thank you for your reply.

I don't want to install an offiical version of OpenWrt. I believe the Teltonika routers are based on OpenWrt, and was merely looking for some assistance in how-to compile a simple C program for that specific architecture.

then you're asking the wrong people ...

you want us to tell you why your unpublished code is failing on a proprietary OS, we know nothing about ?

can you fix my [insert random broken thing] for me ?
from remote, I won't even let you see it ...

All I want to know is how to compile for this board, sorry to of bother you so much.

Option 1 - you add official OpenWRT support for particular device. Since you have GPL code from OEM probably an easy ride.
Option 2 - ask vendor to support ancient firmware version even by their means (current 956 firmware is approximately OpenWRT 23.05 if reading release notes)

please tell us how we should know ?

I wonder if those are the same ... ?

Yep, whole series is same baseboard, just different options plugged.

1 Like

Because it was in the first line of my initial question

and the reason why we can't, was in my initial reply.

And I thanked you for your reply

You need to ask teltonika for SDK compatible with your by all means ancient device firmware. Or in general inquire their support line with your question.

No problem. I wrongly believed that this was a general OpenWRT question in how-to compile for the Teltonika as it's based on OpenWRT. I have asked Teltonika the same question and can only thank you guys for pointing me in the right direction. :+1: