Print router's OpenWrt designation from command line?

I need help with a command to echo or print router's OpenWrt designation from command line.

I already know the command cat /tmp/sysinfo/model returns the value of the router model, for example:

root@OpenWrt:/# cat /tmp/sysinfo/model
Xiaomi Mi Router 3G

But the designation of the router in the OpenWrt database is:

xiaomi_mir3g

Is there a command that results in the designation rather than the model?

Thanks!

Never mind, came up with the solution myself, if anyone needs this, it is the below:

cat /tmp/sysinfo/board_name > /tmp/board_name1 && sed 's/,/_/g' /tmp/board_name1 > /tmp/board_name && rm -rf /tmp/board_name1 && cat /tmp/board_name

Maybe this one?

ubus call system board
1 Like

This one gives the answer:

xiaomi,mir3g

in order to get the

xiaomi_mir3g

I need to sed it:

sed 's/,/_/g' /tmp/board_name1 > /tmp/board_name

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.