Re: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)

2021-05-27 Thread Russell Senior
I am going to send a v3 patch with the redundant mtd-mac-address
removed in a few minutes, hopefully in-reply-to this thread if I can
manage to do it right.

On Thu, May 27, 2021 at 3:01 PM Adrian Schmutzler
 wrote:
>
> Hi,
>
> > -Original Message-
> > From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> > On Behalf Of Vincent Wiemann
> > Sent: Sonntag, 23. Mai 2021 14:20
> > To: Russell Senior ; openwrt-
> > de...@lists.openwrt.org
> > Subject: Re: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)
> >
> > Just as a side-note:
> > There are 5 different versions of the PowerBeam with different device IDs...
> >
> > Source:
> > https://github.com/freifunk-gluon/gluon/issues/94#issuecomment-
> > 510831878
> >   -- PowerBeam M5
> >   -- ERP 26 dBm according to datasheet
> >   'e3e5' = { -- PBE-M5-300
> >   pa_gain = 4
> >   ant_gain = 22
> >   },
> >   'e4e5' = { -- PBE-M5-400
> >   pa_gain = 4
> >   ant_gain = 25
> >   },
> >   'e6e5' = { -- PBE-M5-400 ISO!!
> >   pa_gain = 4
> >   ant_gain = 25
> >   },
> >   'e885' = { -- PBE-M5-620
> >   pa_gain = 4
> >   ant_gain = 29
> >   },
> >
> >   -- Powerbeam M2 400?
> >   -- ERP 28 dBm according to datasheet
> >   'e6c2' = { -- PBE-M2-400
> >   pa_gain = 6
> >   ant_gain = 18 dBi
> >   },
> >
> > While I think there shouldn't be different DTS files for them, there is a 
> > script
> > missing that respects the antenna and external PA gain of these devices.
>
> So far, we have not cared about this at device-support level (at all) as far 
> as I remember.
> I'm not sure whether we apply antenna gain for ath79 Ubiquiti _at all_ by 
> default. (From what I remember we don't).
>
> So, I tend to not care about this for this particular PR.
>
> Best
>
> Adrian
>
> >
> > Best,
> >
> > Vincent
> >
> >
> >
> > On 5/23/21 1:59 PM, Russell Senior wrote:
> > > This patch adds support for the Ubiquiti PowerBeam M (XW), e.g.
> > > PBE-M5-400, a 802.11n wireless with a feed+dish form factor. This
> > > device was previously supported by the ar71xx loco-m-xw firmware.
> > >
> > > Specifications:
> > >   - Atheros AR9342 SoC
> > >   - 64 MB RAM
> > >   - 8 MB SPI flash
> > >   - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in
> > >   - Power and LAN green LEDs
> > >   - 4x RSSI LEDs (red, orange, green, green)
> > >   - UART (115200 8N1)
> > >
> > > Flashing via stock GUI:
> > >   - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your
> > > device! Read the wiki for more info.
> > >   - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first.
> > >   - Upload the factory image via AirOS web GUI.
> > >
> > > Flashing via TFTP:
> > >   - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your
> > > device! Read the wiki for more info.
> > >   - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first.
> > >   - Use a pointy tool (e.g., unbent paperclip) to keep the
> > > reset button pressed.
> > >   - Power on the device (keep reset button pressed).
> > >   - Keep pressing until LEDs flash alternatively LED1+LED3 =>
> > > LED2+LED4 => LED1+LED3, etc.
> > >   - Release reset button.
> > >   - The device starts a TFTP server at 192.168.1.20.
> > >   - Set a static IP on the computer (e.g., 192.168.1.21/24).
> > >   - Upload via tftp the factory image:
> > >  $ tftp 192.168.1.20
> > >  tftp> bin
> > >  tftp> trace
> > >  tftp> put
> > > openwrt-ath79-generic-x-ubnt_powerbeam-m-xw-squashfs-
> > factory.bin
> > >
> > > WARNING: so far, no non-destructive method has been discovered for
> > > opening the enclosure to reach the serial console. Internal photos are
> > > available here: https://fcc.io/SWX-NBM5HP
> > >
> > > Changes since v1:
> > >   * renamed from ubnt,powerbeam-m to ubnt,powerbeam-m-xw
> > >
> > > Signed-off-by: Russell S

RE: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)

2021-05-27 Thread Adrian Schmutzler
Hi,

> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Vincent Wiemann
> Sent: Sonntag, 23. Mai 2021 14:20
> To: Russell Senior ; openwrt-
> de...@lists.openwrt.org
> Subject: Re: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)
> 
> Just as a side-note:
> There are 5 different versions of the PowerBeam with different device IDs...
> 
> Source:
> https://github.com/freifunk-gluon/gluon/issues/94#issuecomment-
> 510831878
>   -- PowerBeam M5
>   -- ERP 26 dBm according to datasheet
>   'e3e5' = { -- PBE-M5-300
>   pa_gain = 4
>   ant_gain = 22
>   },
>   'e4e5' = { -- PBE-M5-400
>   pa_gain = 4
>   ant_gain = 25
>   },
>   'e6e5' = { -- PBE-M5-400 ISO!!
>   pa_gain = 4
>   ant_gain = 25
>   },
>   'e885' = { -- PBE-M5-620
>   pa_gain = 4
>   ant_gain = 29
>   },
> 
>   -- Powerbeam M2 400?
>   -- ERP 28 dBm according to datasheet
>   'e6c2' = { -- PBE-M2-400
>   pa_gain = 6
>   ant_gain = 18 dBi
>   },
> 
> While I think there shouldn't be different DTS files for them, there is a 
> script
> missing that respects the antenna and external PA gain of these devices.

So far, we have not cared about this at device-support level (at all) as far as 
I remember.
I'm not sure whether we apply antenna gain for ath79 Ubiquiti _at all_ by 
default. (From what I remember we don't).

So, I tend to not care about this for this particular PR.

Best

Adrian

> 
> Best,
> 
> Vincent
> 
> 
> 
> On 5/23/21 1:59 PM, Russell Senior wrote:
> > This patch adds support for the Ubiquiti PowerBeam M (XW), e.g.
> > PBE-M5-400, a 802.11n wireless with a feed+dish form factor. This
> > device was previously supported by the ar71xx loco-m-xw firmware.
> >
> > Specifications:
> >   - Atheros AR9342 SoC
> >   - 64 MB RAM
> >   - 8 MB SPI flash
> >   - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in
> >   - Power and LAN green LEDs
> >   - 4x RSSI LEDs (red, orange, green, green)
> >   - UART (115200 8N1)
> >
> > Flashing via stock GUI:
> >   - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your
> > device! Read the wiki for more info.
> >   - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first.
> >   - Upload the factory image via AirOS web GUI.
> >
> > Flashing via TFTP:
> >   - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your
> > device! Read the wiki for more info.
> >   - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first.
> >   - Use a pointy tool (e.g., unbent paperclip) to keep the
> > reset button pressed.
> >   - Power on the device (keep reset button pressed).
> >   - Keep pressing until LEDs flash alternatively LED1+LED3 =>
> > LED2+LED4 => LED1+LED3, etc.
> >   - Release reset button.
> >   - The device starts a TFTP server at 192.168.1.20.
> >   - Set a static IP on the computer (e.g., 192.168.1.21/24).
> >   - Upload via tftp the factory image:
> >  $ tftp 192.168.1.20
> >  tftp> bin
> >  tftp> trace
> >  tftp> put
> > openwrt-ath79-generic-x-ubnt_powerbeam-m-xw-squashfs-
> factory.bin
> >
> > WARNING: so far, no non-destructive method has been discovered for
> > opening the enclosure to reach the serial console. Internal photos are
> > available here: https://fcc.io/SWX-NBM5HP
> >
> > Changes since v1:
> >   * renamed from ubnt,powerbeam-m to ubnt,powerbeam-m-xw
> >
> > Signed-off-by: Russell Senior 
> > ---
> >   .../ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts  | 36
> +++
> >   .../generic/base-files/etc/board.d/01_leds|  1 +
> >   .../generic/base-files/etc/board.d/02_network |  1 +
> >   target/linux/ath79/image/generic-ubnt.mk  |  8 +
> >   4 files changed, 46 insertions(+)
> >   create mode 100644
> > target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts
> >
> > diff --git a/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts
> > b/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts
> > new file mode 100644
> > index 00..edcb06acef
> > --- /dev/null
> > +++ b/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts
> >

Re: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)

2021-05-25 Thread Petr Štetiar
Russell Senior  [2021-05-25 04:06:30]:

Hi,

> Looking closer, I realize that the mtd-mac-address line isn't even
> needed, since it will inherit it from the included
> ar9342_ubnt_xw.dtsi.
> 
> I took a swing at replacing mtd-mac-address with nvmem-cells as in
> your example, but I got an incomprehensible cascade of errors from
> unrelated ath79 devices dts, like this:
> 
>   "Missing #address-cells in interrupt provider"
> 
> which made no sense to me and I gave up.

check this out 
https://github.com/openwrt/openwrt/pull/4041/files#diff-7b814ee8f5f9fde504d466195b8f39172897a3bb9d344a6a0b2eedf0450c11c0R113

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)

2021-05-25 Thread Russell Senior
On Tue, May 25, 2021 at 2:33 AM Russell Senior
 wrote:
>
> On Tue, May 25, 2021 at 1:40 AM Rafał Miłecki  wrote:
> >
> > On 23.05.2021 13:59, Russell Senior wrote:
> > > + {
> > > + status = "okay";
> > > +
> > > + /* default for ar934x, except for 1000M and 10M */
> > > + pll-data = <0x0200 0x0101 0x1313>;
> > > +
> > > + mtd-mac-address = < 0x0>;
> >
> > I'd love to have new DTS use upstream "nvmem-cells" property for that basic 
> > case.
> >
> > Example:
> > arm64: dts: broadcom: bcm4908: add Ethernet MAC addr
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9f01f5cdb548352418b34ce77db02a560fe2913b
>
> Not sure this qualifies as a new DTS, it is derived almost entirely
> from other ubiquiti ar9342 hardware's DTS.  I think such a conversion
> would make more sense to do wholesale, later on. I'm not particularly
> prepared to take that on at the moment.

Looking closer, I realize that the mtd-mac-address line isn't even
needed, since it will inherit it from the included
ar9342_ubnt_xw.dtsi.

I took a swing at replacing mtd-mac-address with nvmem-cells as in
your example, but I got an incomprehensible cascade of errors from
unrelated ath79 devices dts, like this:

  "Missing #address-cells in interrupt provider"

which made no sense to me and I gave up.

>
> $ git grep mtd-mac-address | wc -l
> 1119
>
> $ git grep -l mtd-mac-address | wc -l
> 568
>
> >
> >
> > > +
> > > + phy-mode = "rgmii-id";
> > > + phy-handle = <>;
> > > +
> > > + gmac-config {
> > > + device = <>;
> > > + rxd-delay = <3>;
> > > + rxdv-delay = <3>;
> > > + };
> > > +};

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)

2021-05-25 Thread Russell Senior
On Tue, May 25, 2021 at 3:57 AM Russell Senior
 wrote:
>
> On Tue, May 25, 2021 at 3:33 AM Vincent Wiemann
>  wrote:
> >
> > On 5/25/21 2:23 AM, Russell Senior wrote:
> > > On Mon, May 24, 2021 at 2:51 AM Vincent Wiemann
> > >  wrote:
> > >>
> > >> Hi Russel,
> > >>
> > >> On 5/24/21 1:06 AM, Russell Senior wrote:
> > >>> On the PowerBeam M2 (PBE-M2-400) I see "e2 c2" in the same locations, 
> > >>> not "e6 c2".
> > >>
> > >> That's very interesting... I think the PowerBeam 400 was sold under the
> > >> NanoBeam series at the beginning. So there might be an entry missing.
> > >> Is your PowerBeam old?
> > >
> > > It was purchased circa 2015. It is clearly marked PowerBeam M2 on the
> > > sticker, along with "M/N: PBE-M2-400", although the FCCID suggests
> > > some overlap with NanoBeam (SWX-NBM2HP).
> > >
> >
> > Thank you for that information. We've also purchased a PowerBeam in 2015
> > where on the sticker it says PowerBeam, but the box stated NanoBeam...

(sorry for the empty reply ... gmail--)

I went and checked my box, it says PowerBeam M2.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)

2021-05-25 Thread Russell Senior
On Tue, May 25, 2021 at 3:33 AM Vincent Wiemann
 wrote:
>
> On 5/25/21 2:23 AM, Russell Senior wrote:
> > On Mon, May 24, 2021 at 2:51 AM Vincent Wiemann
> >  wrote:
> >>
> >> Hi Russel,
> >>
> >> On 5/24/21 1:06 AM, Russell Senior wrote:
> >>> On the PowerBeam M2 (PBE-M2-400) I see "e2 c2" in the same locations, not 
> >>> "e6 c2".
> >>
> >> That's very interesting... I think the PowerBeam 400 was sold under the
> >> NanoBeam series at the beginning. So there might be an entry missing.
> >> Is your PowerBeam old?
> >
> > It was purchased circa 2015. It is clearly marked PowerBeam M2 on the
> > sticker, along with "M/N: PBE-M2-400", although the FCCID suggests
> > some overlap with NanoBeam (SWX-NBM2HP).
> >
>
> Thank you for that information. We've also purchased a PowerBeam in 2015
> where on the sticker it says PowerBeam, but the box stated NanoBeam...

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)

2021-05-25 Thread Vincent Wiemann

On 5/25/21 2:23 AM, Russell Senior wrote:

On Mon, May 24, 2021 at 2:51 AM Vincent Wiemann
 wrote:


Hi Russel,

On 5/24/21 1:06 AM, Russell Senior wrote:

On the PowerBeam M2 (PBE-M2-400) I see "e2 c2" in the same locations, not "e6 
c2".


That's very interesting... I think the PowerBeam 400 was sold under the
NanoBeam series at the beginning. So there might be an entry missing.
Is your PowerBeam old?


It was purchased circa 2015. It is clearly marked PowerBeam M2 on the
sticker, along with "M/N: PBE-M2-400", although the FCCID suggests
some overlap with NanoBeam (SWX-NBM2HP).



Thank you for that information. We've also purchased a PowerBeam in 2015
where on the sticker it says PowerBeam, but the box stated NanoBeam...

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)

2021-05-25 Thread Russell Senior
On Tue, May 25, 2021 at 1:40 AM Rafał Miłecki  wrote:
>
> On 23.05.2021 13:59, Russell Senior wrote:
> > + {
> > + status = "okay";
> > +
> > + /* default for ar934x, except for 1000M and 10M */
> > + pll-data = <0x0200 0x0101 0x1313>;
> > +
> > + mtd-mac-address = < 0x0>;
>
> I'd love to have new DTS use upstream "nvmem-cells" property for that basic 
> case.
>
> Example:
> arm64: dts: broadcom: bcm4908: add Ethernet MAC addr
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9f01f5cdb548352418b34ce77db02a560fe2913b

Not sure this qualifies as a new DTS, it is derived almost entirely
from other ubiquiti ar9342 hardware's DTS.  I think such a conversion
would make more sense to do wholesale, later on. I'm not particularly
prepared to take that on at the moment.

$ git grep mtd-mac-address | wc -l
1119

$ git grep -l mtd-mac-address | wc -l
568

>
>
> > +
> > + phy-mode = "rgmii-id";
> > + phy-handle = <>;
> > +
> > + gmac-config {
> > + device = <>;
> > + rxd-delay = <3>;
> > + rxdv-delay = <3>;
> > + };
> > +};

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)

2021-05-25 Thread Rafał Miłecki

On 23.05.2021 13:59, Russell Senior wrote:

+ {
+   status = "okay";
+
+   /* default for ar934x, except for 1000M and 10M */
+   pll-data = <0x0200 0x0101 0x1313>;
+
+   mtd-mac-address = < 0x0>;


I'd love to have new DTS use upstream "nvmem-cells" property for that basic 
case.

Example:
arm64: dts: broadcom: bcm4908: add Ethernet MAC addr
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9f01f5cdb548352418b34ce77db02a560fe2913b



+
+   phy-mode = "rgmii-id";
+   phy-handle = <>;
+
+   gmac-config {
+   device = <>;
+   rxd-delay = <3>;
+   rxdv-delay = <3>;
+   };
+};


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)

2021-05-24 Thread Russell Senior
On Mon, May 24, 2021 at 2:51 AM Vincent Wiemann
 wrote:
>
> Hi Russel,
>
> On 5/24/21 1:06 AM, Russell Senior wrote:
> > On the PowerBeam M2 (PBE-M2-400) I see "e2 c2" in the same locations, not 
> > "e6 c2".
>
> That's very interesting... I think the PowerBeam 400 was sold under the
> NanoBeam series at the beginning. So there might be an entry missing.
> Is your PowerBeam old?

It was purchased circa 2015. It is clearly marked PowerBeam M2 on the
sticker, along with "M/N: PBE-M2-400", although the FCCID suggests
some overlap with NanoBeam (SWX-NBM2HP).

-- 
Russell Senior
russ...@personaltelco.net

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)

2021-05-24 Thread Joe Ayers
> Subject: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)
> Message-ID: <20210523115946.711907-1-russ...@personaltelco.net>
>
> This patch adds support for the Ubiquiti PowerBeam M (XW), e.g. PBE-M5-400,
> a 802.11n wireless with a feed+dish form factor. This device was previously
> supported by the ar71xx loco-m-xw firmware.
>
> Specifications:
>  - Atheros AR9342 SoC
>  - 64 MB RAM
>  - 8 MB SPI flash
>  - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in
>  - Power and LAN green LEDs
>  - 4x RSSI LEDs (red, orange, green, green)
>  - UART (115200 8N1)
>
> Flashing via stock GUI:
>  - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your

This was resolved by the following commit and has not been an issue
for some time:
https://github.com/openwrt/openwrt/commit/076d58d3440f382c536ea8874f58b0df23c263bc


>device! Read the wiki for more info.
>  - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first.
>  - Upload the factory image via AirOS web GUI.
>
> Flashing via TFTP:
>  - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your
>device! Read the wiki for more info.
>  - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first.
>  - Use a pointy tool (e.g., unbent paperclip) to keep the
>reset button pressed.
>  - Power on the device (keep reset button pressed).
>  - Keep pressing until LEDs flash alternatively LED1+LED3 =>
>LED2+LED4 => LED1+LED3, etc.
>  - Release reset button.
>  - The device starts a TFTP server at 192.168.1.20.
>  - Set a static IP on the computer (e.g., 192.168.1.21/24).
>  - Upload via tftp the factory image:
> $ tftp 192.168.1.20
> tftp> bin
> tftp> trace
> tftp> put 
> openwrt-ath79-generic-x-ubnt_powerbeam-m-xw-squashfs-factory.bin
>

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)

2021-05-24 Thread Vincent Wiemann

Hi Russel,

On 5/24/21 1:06 AM, Russell Senior wrote:

On the PowerBeam M2 (PBE-M2-400) I see "e2 c2" in the same locations, not "e6 
c2".


That's very interesting... I think the PowerBeam 400 was sold under the
NanoBeam series at the beginning. So there might be an entry missing.
Is your PowerBeam old?



Vincent> While I think there shouldn't be different DTS files for them,
Vincent> there is a script missing that respects the antenna and
Vincent> external PA gain of these devices.

-ENOPATCH



Maybe we should add it to the wiki instead.


Best,

Vincent

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)

2021-05-24 Thread Russell Senior
> "Vincent" == Vincent Wiemann  writes:

Vincent> Just as a side-note: There are 5 different versions of the
Vincent> PowerBeam with different device IDs...

Vincent> Source:
Vincent> 
https://github.com/freifunk-gluon/gluon/issues/94#issuecomment-510831878
Vincent> -- PowerBeam M5 -- ERP 26 dBm according to datasheet 'e3e5' = {
Vincent> -- PBE-M5-300 pa_gain = 4 ant_gain = 22 }, 'e4e5' = { --
Vincent> PBE-M5-400 pa_gain = 4 ant_gain = 25 }, 'e6e5' = { --
Vincent> PBE-M5-400 ISO!!  pa_gain = 4 ant_gain = 25 }, 'e885' = { --
Vincent> PBE-M5-620 pa_gain = 4 ant_gain = 29 },

FWIW, I see the "e4 e5" bytes in the ART partition at offset 0x000c and 0xa01e.

Vincent>-- Powerbeam M2 400?  -- ERP 28 dBm according to
Vincent> datasheet 'e6c2' = { -- PBE-M2-400 pa_gain = 6 ant_gain = 18
Vincent> dBi },

On the PowerBeam M2 (PBE-M2-400) I see "e2 c2" in the same locations, not "e6 
c2".

Vincent> While I think there shouldn't be different DTS files for them,
Vincent> there is a script missing that respects the antenna and
Vincent> external PA gain of these devices.

-ENOPATCH


-- 
Russell Senior, President
russ...@personaltelco.net

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)

2021-05-23 Thread Vincent Wiemann

Just as a side-note:
There are 5 different versions of the PowerBeam with different
device IDs...

Source:
https://github.com/freifunk-gluon/gluon/issues/94#issuecomment-510831878
-- PowerBeam M5
-- ERP 26 dBm according to datasheet
'e3e5' = { -- PBE-M5-300
pa_gain = 4
ant_gain = 22
},
'e4e5' = { -- PBE-M5-400
pa_gain = 4
ant_gain = 25
},
'e6e5' = { -- PBE-M5-400 ISO!!
pa_gain = 4
ant_gain = 25
},
'e885' = { -- PBE-M5-620
pa_gain = 4
ant_gain = 29
},

-- Powerbeam M2 400?
-- ERP 28 dBm according to datasheet
'e6c2' = { -- PBE-M2-400
pa_gain = 6
ant_gain = 18 dBi
},

While I think there shouldn't be different DTS files for them, there is
a script missing that respects the antenna and external PA gain of these
devices.

Best,

Vincent



On 5/23/21 1:59 PM, Russell Senior wrote:

This patch adds support for the Ubiquiti PowerBeam M (XW), e.g. PBE-M5-400,
a 802.11n wireless with a feed+dish form factor. This device was previously
supported by the ar71xx loco-m-xw firmware.

Specifications:
  - Atheros AR9342 SoC
  - 64 MB RAM
  - 8 MB SPI flash
  - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in
  - Power and LAN green LEDs
  - 4x RSSI LEDs (red, orange, green, green)
  - UART (115200 8N1)

Flashing via stock GUI:
  - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your
device! Read the wiki for more info.
  - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first.
  - Upload the factory image via AirOS web GUI.

Flashing via TFTP:
  - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your
device! Read the wiki for more info.
  - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first.
  - Use a pointy tool (e.g., unbent paperclip) to keep the
reset button pressed.
  - Power on the device (keep reset button pressed).
  - Keep pressing until LEDs flash alternatively LED1+LED3 =>
LED2+LED4 => LED1+LED3, etc.
  - Release reset button.
  - The device starts a TFTP server at 192.168.1.20.
  - Set a static IP on the computer (e.g., 192.168.1.21/24).
  - Upload via tftp the factory image:
 $ tftp 192.168.1.20
 tftp> bin
 tftp> trace
 tftp> put 
openwrt-ath79-generic-x-ubnt_powerbeam-m-xw-squashfs-factory.bin

WARNING: so far, no non-destructive method has been discovered for
opening the enclosure to reach the serial console. Internal photos
are available here: https://fcc.io/SWX-NBM5HP

Changes since v1:
  * renamed from ubnt,powerbeam-m to ubnt,powerbeam-m-xw

Signed-off-by: Russell Senior 
---
  .../ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts  | 36 +++
  .../generic/base-files/etc/board.d/01_leds|  1 +
  .../generic/base-files/etc/board.d/02_network |  1 +
  target/linux/ath79/image/generic-ubnt.mk  |  8 +
  4 files changed, 46 insertions(+)
  create mode 100644 target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts

diff --git a/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts 
b/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts
new file mode 100644
index 00..edcb06acef
--- /dev/null
+++ b/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "ar9342_ubnt_xw.dtsi"
+
+/ {
+   compatible = "ubnt,powerbeam-m-xw", "ubnt,xw", "qca,ar9342";
+   model = "Ubiquiti PowerBeam M (XW)";
+};
+
+ {
+   status = "okay";
+
+   phy-mask = <4>;
+
+   phy4: ethernet-phy@4 {
+   reg = <4>;
+   };
+};
+
+ {
+   status = "okay";
+
+   /* default for ar934x, except for 1000M and 10M */
+   pll-data = <0x0200 0x0101 0x1313>;
+
+   mtd-mac-address = < 0x0>;
+
+   phy-mode = "rgmii-id";
+   phy-handle = <>;
+
+   gmac-config {
+   device = <>;
+   rxd-delay = <3>;
+   rxdv-delay = <3>;
+   };
+};
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds 
b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
index 1990353394..35ce90aeb4 100644
--- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
@@ -383,6 +383,7 @@ ubnt,nanostation-loco-m-xw|\
  ubnt,nanostation-m|\
  ubnt,nanostation-m-xw|\
  ubnt,picostation-m|\
+ubnt,powerbeam-m-xw|\
  ubnt,powerbridge-m|\
  ubnt,rocket-m)
ucidef_set_rssimon "wlan0" "20" "1"
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network 
b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index 

[PATCH v2] ath79: add support for Ubiquiti PowerBeam M (XW)

2021-05-23 Thread Russell Senior
This patch adds support for the Ubiquiti PowerBeam M (XW), e.g. PBE-M5-400,
a 802.11n wireless with a feed+dish form factor. This device was previously
supported by the ar71xx loco-m-xw firmware.

Specifications:
 - Atheros AR9342 SoC
 - 64 MB RAM
 - 8 MB SPI flash
 - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in
 - Power and LAN green LEDs
 - 4x RSSI LEDs (red, orange, green, green)
 - UART (115200 8N1)

Flashing via stock GUI:
 - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your
   device! Read the wiki for more info.
 - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first.
 - Upload the factory image via AirOS web GUI.

Flashing via TFTP:
 - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your
   device! Read the wiki for more info.
 - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first.
 - Use a pointy tool (e.g., unbent paperclip) to keep the
   reset button pressed.
 - Power on the device (keep reset button pressed).
 - Keep pressing until LEDs flash alternatively LED1+LED3 =>
   LED2+LED4 => LED1+LED3, etc.
 - Release reset button.
 - The device starts a TFTP server at 192.168.1.20.
 - Set a static IP on the computer (e.g., 192.168.1.21/24).
 - Upload via tftp the factory image:
$ tftp 192.168.1.20
tftp> bin
tftp> trace
tftp> put 
openwrt-ath79-generic-x-ubnt_powerbeam-m-xw-squashfs-factory.bin

WARNING: so far, no non-destructive method has been discovered for
opening the enclosure to reach the serial console. Internal photos
are available here: https://fcc.io/SWX-NBM5HP

Changes since v1:
 * renamed from ubnt,powerbeam-m to ubnt,powerbeam-m-xw

Signed-off-by: Russell Senior 
---
 .../ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts  | 36 +++
 .../generic/base-files/etc/board.d/01_leds|  1 +
 .../generic/base-files/etc/board.d/02_network |  1 +
 target/linux/ath79/image/generic-ubnt.mk  |  8 +
 4 files changed, 46 insertions(+)
 create mode 100644 target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts

diff --git a/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts 
b/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts
new file mode 100644
index 00..edcb06acef
--- /dev/null
+++ b/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "ar9342_ubnt_xw.dtsi"
+
+/ {
+   compatible = "ubnt,powerbeam-m-xw", "ubnt,xw", "qca,ar9342";
+   model = "Ubiquiti PowerBeam M (XW)";
+};
+
+ {
+   status = "okay";
+
+   phy-mask = <4>;
+
+   phy4: ethernet-phy@4 {
+   reg = <4>;
+   };
+};
+
+ {
+   status = "okay";
+
+   /* default for ar934x, except for 1000M and 10M */
+   pll-data = <0x0200 0x0101 0x1313>;
+
+   mtd-mac-address = < 0x0>;
+
+   phy-mode = "rgmii-id";
+   phy-handle = <>;
+
+   gmac-config {
+   device = <>;
+   rxd-delay = <3>;
+   rxdv-delay = <3>;
+   };
+};
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds 
b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
index 1990353394..35ce90aeb4 100644
--- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
@@ -383,6 +383,7 @@ ubnt,nanostation-loco-m-xw|\
 ubnt,nanostation-m|\
 ubnt,nanostation-m-xw|\
 ubnt,picostation-m|\
+ubnt,powerbeam-m-xw|\
 ubnt,powerbridge-m|\
 ubnt,rocket-m)
ucidef_set_rssimon "wlan0" "20" "1"
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network 
b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index 4133b9d7d3..6e31cdac69 100644
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -85,6 +85,7 @@ ath79_setup_interfaces()
ubnt,picostation-m|\
ubnt,powerbeam-5ac-500|\
ubnt,powerbeam-5ac-gen2|\
+   ubnt,powerbeam-m-xw|\
ubnt,powerbridge-m|\
ubnt,rocket-m|\
ubnt,unifiac-lite|\
diff --git a/target/linux/ath79/image/generic-ubnt.mk 
b/target/linux/ath79/image/generic-ubnt.mk
index 733d803d7a..5948e059e8 100644
--- a/target/linux/ath79/image/generic-ubnt.mk
+++ b/target/linux/ath79/image/generic-ubnt.mk
@@ -328,6 +328,14 @@ define Device/ubnt_powerbeam-5ac-gen2
 endef
 TARGET_DEVICES += ubnt_powerbeam-5ac-gen2
 
+define Device/ubnt_powerbeam-m-xw
+  $(Device/ubnt-xw)
+  DEVICE_MODEL := PowerBeam M
+  DEVICE_PACKAGES += rssileds
+  SUPPORTED_DEVICES += loco-m-xw
+endef
+TARGET_DEVICES += ubnt_powerbeam-m-xw
+
 define Device/ubnt_powerbridge-m
   $(Device/ubnt-xm)
   SOC := ar7241
-- 
2.31.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel