Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status.lua - unsupported device #193

Closed
dman776 opened this issue Dec 16, 2021 · 12 comments
Closed

Status.lua - unsupported device #193

dman776 opened this issue Dec 16, 2021 · 12 comments
Assignees

Comments

@dman776
Copy link
Contributor

dman776 commented Dec 16, 2021

Nanostation M2
dump_perl2 build
The "!!! UNSUPPORTED DEVICE !!!" banner is showing on status.lua (but not on the status page - perl based)

@aanon4
Copy link
Contributor

aanon4 commented Dec 16, 2021

Can you send me the output of the following (a lua script):

require('aredn.hardware')
require('luci.util')
=luci.util.dumptable(aredn.hardware.get_radio())

@dman776
Copy link
Contributor Author

dman776 commented Dec 16, 2021

root@K5DLQ-UNSM2-100:~# lua
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio (double int32)

require("aredn.hardware")
require("luci.util")
=luci.util.dumptable(aredn.hardware.get_radio())
/usr/lib/lua/luci/util.lua:144: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
/usr/lib/lua/luci/util.lua:144: in function </usr/lib/lua/luci/util.lua:140>
(tail call): ?
[C]: ?

@dman776
Copy link
Contributor Author

dman776 commented Dec 16, 2021

Also....
root@K5DLQ-UNSM2-100:/usr/lib/lua/aredn# cat /etc/board.json
{
"model": {
"id": "ubnt,nanostation-m",
"name": "Ubiquiti Nanostation M"
},

@aanon4
Copy link
Contributor

aanon4 commented Dec 16, 2021

The Ubiquiti stuff has some serious mucking about to get the radio info. How about the output for this:

require('aredn.hardware')
=aredn.hardware.get_board_id()

And this:
/usr/local/bin/get_boardid

@aanon4
Copy link
Contributor

aanon4 commented Dec 19, 2021

Pinging @dman776 for more info.

@dman776
Copy link
Contributor Author

dman776 commented Dec 21, 2021

root@K5DLQ-UNSM2-100:~# lua
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio (double int32)

require("aredn.hardware")
=aredn.hardware.get_board_id()
0xe012

root@K5DLQ-UNSM2-100:~# /usr/local/bin/get_boardid
0xe012

@aanon4
Copy link
Contributor

aanon4 commented Dec 22, 2021

Okay. This one has me confused then as both the old and new board id functions return the same value, and if I force my build to return that value (fixing the return value of aredn.hardware.get_board_id to "0xe012") the board isn't marked as unsupported.

Above you included board.json which looks truncated and not valid json - does it really look like that? That file being invalid might have some unexpected side effects.

@dman776
Copy link
Contributor Author

dman776 commented Dec 22, 2021 via email

@aanon4
Copy link
Contributor

aanon4 commented Dec 22, 2021

Could you post the whole thing? I'm somewhat stumped as to what's going on :-(

@dman776
Copy link
Contributor Author

dman776 commented Dec 22, 2021

board.json.zip

@aanon4
Copy link
Contributor

aanon4 commented Dec 24, 2021

So I bought a M2 node but that didn't show this problem, so I guessed it was actually an old M2 node you had. I couldn't source one of those but managed to locally trade a shiny new M5 for an old M5 and that did show the issue! Turns out these older nodes append an extra character return to the information which I needed to strip:

Fixed here: 7fe5372

@aanon4
Copy link
Contributor

aanon4 commented Jan 20, 2022

Can we close this now?

@dman776 dman776 closed this as completed Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants