Looks like the serial port might have been set to honor XON/XOFF, so it was skipping bytes 0x11 and 0x13.
Ah, interesting! I will keep that in mind next time I try to capture traffic. As you can tell, I'm very much an amateur at all of this.
I installed the new artifact, and as you say, the original issue remains (no power unless I use the configuration in my original post), but the errors are gone.
Here is the output of ubus call poe info
:
{
"firmware": "v16.28",
"budget": 170.000000,
"consumption": 60.000000,
"ports": {
"lan1": {
"priority": 2,
"mode": "PoE+",
"status": "Searching"
}
}
}
And here is the log given by realtek-poe -d -s
:
realtek-poe: TX -> 00 01 01 ff ff ff ff ff ff ff ff fa
realtek-poe: RX <- 00 01 00 ff ff ff ff ff ff ff ff f9
realtek-poe: TX -> 47 02 01 ff ff ff ff ff ff ff ff 42
realtek-poe: RX <- 47 02 00 ff 00 ff ff ff ff ff ff 42
realtek-poe: TX -> 02 03 00 ff ff ff ff ff ff ff ff fd
realtek-poe: RX <- 02 03 00 ff ff ff ff ff ff ff ff fd
realtek-poe: TX -> 40 04 ff ff ff ff ff ff ff ff ff 3b
realtek-poe: RX <- 40 04 ff 08 01 01 38 10 12 04 1c c7
realtek-poe: TX -> 40 05 ff ff ff ff ff ff ff ff ff 3c
realtek-poe: RX <- 40 05 ff 08 01 01 38 10 12 04 1c c8
realtek-poe: TX -> 10 06 02 ff ff ff ff ff ff ff ff 10
realtek-poe: RX <- 10 06 00 ff ff ff ff ff ff ff ff 0e
realtek-poe: TX -> 04 07 00 06 a4 00 aa ff ff ff ff 5b
realtek-poe: RX <- 04 07 00 00 ff ff ff ff ff ff ff 04
realtek-poe: TX -> 15 08 01 02 ff ff ff ff ff ff ff 19
realtek-poe: RX <- 15 08 01 00 ff ff ff ff ff ff ff 17
realtek-poe: TX -> 0c 09 01 03 ff ff ff ff ff ff ff 12
realtek-poe: RX <- 0c 09 01 00 ff ff ff ff ff ff ff 0f
realtek-poe: TX -> 08 0a 01 01 ff ff ff ff ff ff ff 0d
realtek-poe: RX <- 08 0a 01 00 ff ff ff ff ff ff ff 0c
realtek-poe: TX -> 12 0b 01 01 ff ff ff ff ff ff ff 18
realtek-poe: RX <- 12 0b 01 00 ff ff ff ff ff ff ff 17
realtek-poe: TX -> 01 0c 00 00 ff ff ff ff ff ff ff 06
realtek-poe: RX <- 01 0c 00 00 ff ff ff ff ff ff ff 06
realtek-poe: TX -> 01 0d 01 01 ff ff ff ff ff ff ff 09
realtek-poe: RX <- 01 0d 01 00 ff ff ff ff ff ff ff 08
realtek-poe: TX -> 41 0e ff ff ff ff ff ff ff ff ff 46
realtek-poe: RX <- 41 0e 02 58 06 53 00 00 50 ff ff 50
realtek-poe: TX -> 43 0f 00 ff ff ff ff ff ff ff ff 4a
realtek-poe: RX <- 43 0f 00 60 10 61 10 61 10 61 10 15
realtek-poe: TX -> 48 10 00 ff ff ff ff ff ff ff ff 50
realtek-poe: RX <- 48 10 00 00 00 02 00 02 00 ff ff 5a
realtek-poe: TX -> 49 11 00 ff ff ff ff ff ff ff ff 52
realtek-poe: RX <- 49 11 00 03 01 96 00 20 07 ff ff 19
realtek-poe: TX -> 44 12 00 ff ff ff ff ff ff ff ff 4e
realtek-poe: RX <- 44 12 00 00 00 00 00 00 be 00 00 14
realtek-poe: TX -> 48 13 01 ff ff ff ff ff ff ff ff 54
realtek-poe: RX <- 48 13 01 01 01 02 00 02 00 ff ff 60
realtek-poe: TX -> 49 14 01 ff ff ff ff ff ff ff ff 56
realtek-poe: RX <- 49 14 01 03 01 96 02 20 06 ff ff 1e
realtek-poe: TX -> 44 15 01 ff ff ff ff ff ff ff ff 52
realtek-poe: RX <- 44 15 01 00 00 00 00 00 bf 00 00 19
I am guessing something is still not quite right.
consumption": 60.000000,
would indicate that there are two ports with 30.0W devices detected, and the budget already allocated. I would go ahead and list all the eight powered ports in /etc/config/poe
.
The issue I have been having locally is that the status goes from Searching
to Requesting power
, but never transitions to Delivering power
. If you see the same thing, then we are likely seeing the same issue.
I tried, and that's exactly what I'm seeing. From what I can tell the statuses are accurate, i.e., Requesting power
is only listed for ports that have a PoE device on the other end, and they do not turn on.
For the sake of completeness, here is the configuration I've tested in /etc/config/poe
:
config global
option budget '65'
config port
option enable '1'
option id '1'
option name 'lan1'
option poe_plus '1'
option priority '1'
config port
option enable '1'
option id '2'
option name 'lan2'
option poe_plus '1'
option priority '1'
config port
option enable '1'
option id '3'
option name 'lan3'
option poe_plus '1'
option priority '1'
config port
option enable '1'
option id '4'
option name 'lan4'
option poe_plus '1'
option priority '1'
config port
option enable '1'
option id '5'
option name 'lan5'
option poe_plus '1'
option priority '1'
config port
option enable '1'
option id '6'
option name 'lan6'
option poe_plus '1'
option priority '1'
config port
option enable '1'
option id '7'
option name 'lan7'
option poe_plus '1'
option priority '1'
config port
option enable '1'
option id '8'
option name 'lan8'
option poe_plus '1'
option priority '1'
Here is the output of realtek-poe -s -d
:
realtek-poe: TX -> 00 01 01 ff ff ff ff ff ff ff ff fa
realtek-poe: RX <- 00 01 00 ff ff ff ff ff ff ff ff f9
realtek-poe: TX -> 47 02 01 ff ff ff ff ff ff ff ff 42
realtek-poe: RX <- 47 02 00 ff 00 ff ff ff ff ff ff 42
realtek-poe: TX -> 02 03 00 ff ff ff ff ff ff ff ff fd
realtek-poe: RX <- 02 03 00 ff ff ff ff ff ff ff ff fd
realtek-poe: TX -> 40 04 ff ff ff ff ff ff ff ff ff 3b
realtek-poe: RX <- 40 04 ff 08 01 01 38 10 12 04 1c c7
realtek-poe: TX -> 40 05 ff ff ff ff ff ff ff ff ff 3c
realtek-poe: RX <- 40 05 ff 08 01 01 38 10 12 04 1c c8
realtek-poe: TX -> 10 06 02 ff ff ff ff ff ff ff ff 10
realtek-poe: RX <- 10 06 00 ff ff ff ff ff ff ff ff 0e
realtek-poe: TX -> 04 07 00 02 8a 00 41 ff ff ff ff d4
realtek-poe: RX <- 04 07 00 00 ff ff ff ff ff ff ff 04
realtek-poe: TX -> 15 08 00 01 01 01 02 01 03 01 ff 26
realtek-poe: RX <- 15 08 00 00 01 00 02 00 03 00 ff 22
realtek-poe: TX -> 0c 09 00 03 01 03 02 03 03 03 ff 26
realtek-poe: RX <- 0c 09 00 00 01 00 02 00 03 00 ff 1a
realtek-poe: TX -> 08 0a 00 01 01 01 02 01 03 01 ff 1b
realtek-poe: RX <- 08 0a 00 00 01 00 02 00 03 00 ff 17
realtek-poe: TX -> 12 0b 00 01 01 01 02 01 03 01 ff 26
realtek-poe: RX <- 12 0b 00 00 01 00 02 00 03 00 ff 22
realtek-poe: TX -> 15 0c 04 01 05 01 06 01 07 01 ff 3a
realtek-poe: RX <- 15 0c 04 00 05 00 06 00 07 00 ff 36
realtek-poe: TX -> 0c 0d 04 03 05 03 06 03 07 03 ff 3a
realtek-poe: RX <- 0c 0d 04 00 05 00 06 00 07 00 ff 2e
realtek-poe: TX -> 08 0e 04 01 05 01 06 01 07 01 ff 2f
realtek-poe: RX <- 08 0e 04 00 05 00 06 00 07 00 ff 2b
realtek-poe: TX -> 12 0f 04 01 05 01 06 01 07 01 ff 3a
realtek-poe: RX <- 12 0f 04 00 05 00 06 00 07 00 ff 36
realtek-poe: TX -> 01 10 00 01 ff ff ff ff ff ff ff 0b
realtek-poe: RX <- 01 10 00 00 ff ff ff ff ff ff ff 0a
realtek-poe: TX -> 01 11 01 01 ff ff ff ff ff ff ff 0d
realtek-poe: RX <- 01 11 01 00 ff ff ff ff ff ff ff 0c
realtek-poe: TX -> 01 12 02 01 ff ff ff ff ff ff ff 0f
realtek-poe: RX <- 01 12 02 00 ff ff ff ff ff ff ff 0e
realtek-poe: TX -> 01 13 03 01 ff ff ff ff ff ff ff 11
realtek-poe: RX <- 01 13 03 00 ff ff ff ff ff ff ff 10
realtek-poe: TX -> 01 14 04 01 ff ff ff ff ff ff ff 13
realtek-poe: RX <- 01 14 04 00 ff ff ff ff ff ff ff 12
realtek-poe: TX -> 01 15 05 01 ff ff ff ff ff ff ff 15
realtek-poe: RX <- 01 15 05 00 ff ff ff ff ff ff ff 14
realtek-poe: TX -> 01 16 06 01 ff ff ff ff ff ff ff 17
realtek-poe: RX <- 01 16 06 00 ff ff ff ff ff ff ff 16
realtek-poe: TX -> 01 17 07 01 ff ff ff ff ff ff ff 19
realtek-poe: RX <- 01 17 07 00 ff ff ff ff ff ff ff 18
realtek-poe: TX -> 41 18 ff ff ff ff ff ff ff ff ff 50
realtek-poe: RX <- 41 18 00 00 02 8a 00 00 00 ff ff e3
realtek-poe: TX -> 43 19 00 ff ff ff ff ff ff ff ff 54
realtek-poe: RX <- 43 19 00 61 10 61 10 61 10 61 10 20
I'd be curious to find out why the configuration in the original post does seem to turn on the devices.
Edit: Although I should add that, with the configuration in the initial post, devices are only turned on after a cold start. If I swap in the configuration above, restart the daemon and then restart it with the old configuration, the devices stay off.
I pushed a new commit 12fec5d
("dialect: realtek: Change mystery parameter from 1 to 0"). That unstuck the controller from "Requesting power" on my Engenius. Does that fix things on the DGS-1210 as well?
Thanks! I'll make some time, hopefully later this week, to test the latest version and report back.
OK, it looks like that improved things quite a bit.
I regenerated my /etc/config/poe
using the script that @svanheule linked; here it is now:
config global
option budget '65'
config port
option name 'lan1'
option id '1'
option enable '1'
config port
option name 'lan2'
option id '2'
option enable '1'
config port
option name 'lan3'
option id '3'
option enable '1'
config port
option name 'lan4'
option id '4'
option enable '1'
config port
option name 'lan5'
option id '5'
option enable '1'
config port
option name 'lan6'
option id '6'
option enable '1'
config port
option name 'lan7'
option id '7'
option enable '1'
config port
option name 'lan8'
option id '8'
option enable '1'
With the latest version of your branch, the output of ubus call poe info
is:
{
"firmware": "v16.28",
"budget": 65.000000,
"consumption": 30.799999,
"ports": {
"lan1": {
"priority": 0,
"mode": "PoE+",
"status": "Searching"
},
"lan2": {
"priority": 0,
"mode": "PoE",
"status": "Searching"
},
"lan3": {
"priority": 0,
"mode": "PoE",
"status": "Searching"
},
"lan4": {
"priority": 0,
"mode": "PoE",
"status": "Searching"
},
"lan5": {
"priority": 0,
"mode": "PoE",
"status": "Delivering power",
"consumption": 4.600000
},
"lan6": {
"priority": 0,
"mode": "PoE",
"status": "Delivering power",
"consumption": 3.900000
},
"lan7": {
"priority": 0,
"mode": "PoE",
"status": "Searching"
},
"lan8": {
"priority": 0,
"mode": "PoE",
"status": "Searching"
}
}
}
Indeed, my PoE APs are attached on lan5
and lan6
, and are properly powered!
I'm not entirely sure about the value reported by consumption --- 30W seems like a lot. I do not have a meter ready to confirm that is the actual usage, but the total consumption reported for the APs does not seem to go above 10W. Or maybe I'm misreading this.
At any rate, I'm positively chuffed things are working now. Thanks so much for all the work put in!
Oh, and before I forget: the GitHub integration only builds a .ipk
package. Because I'm running snapshot, I had to build the .apk
myself, but that seems to work quite well. Do you think I can just use the 23.05 SDK to build your code for 23.05 if I want to move back to that? Or is there something particular to snapshot that you are relying on?
That's what the RTL dialect reports. It seems to add up the allotment for each port, rather than the actual consumption.
I think it should compile with older SDKs. I didn't add anything in the last few years to break backwards compatibility.
OK, thanks! I'll confirm here when I get around to moving back to 23.05 (or more likely 24.10 when that comes out).
If there is anything else you need me to test on my end with this hardware, let me know. Happy to be a guinea pig if it helps development on your branch.