Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-19 Thread Joe Ayers
>> if I haven't overlooked it, the patch does not provide a "factory" Image as
>> in ar71xx, at least according to "Flashing instructions".
> if I parse this correctly, then my answer is, that I simply didn't included
> instructions for flashing of factory image as it wasn't possible at that time,
> because `fwupdate.real` utility in airOS v6+ (I'm not 100% sure about this),
> doesn't allow flashing of unsigned factory images, so you simply couldn't
> flash other factory images then those from Ubiquity.

Would appreciate if the "factory" images could still be created.
There are users in our community receiving new ubnt AirMax devices
with AirOS v6.1.5+.   They are loading 3.18.06.1 base factory images
via tftp.  A recent reference below.

>From the release notes where signatures were added in AirOS, key
statement is "except via TFTP", is excluded from signed firmware
check:

6.0.7 (XM/XW/TI) Changelog / September 8, 2017


Important:
airOS v6.0.7 will allow only signed firmware to be loaded. Signed
versions of the following airOS versions are available: v5.6.15,
v6.0.3, v6.0.4, v6.0.6
All future airOS versions will be signed in this way and not allow
unsigned firmware to be loaded except via TFTP
--

A user in our community used tftp to flash an image to this device:
Ref:  https://github.com/aredn/aredn_ar71xx/issues/233

/var/etc/board.info from BULLET M2 XW  AIR OS  v6.1.5
board.sysid=0xe2c4
board.cpurevision=0x1122
board.name=Bullet M2
board.shortname=B2N

Joe AE6XE

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


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-18 Thread Petr Štetiar
Lech Perczak  [2018-11-18 21:34:53]:

> Can I add Tested-By tag to my patch? :)

Tested-by: Petr Štetiar  (tested on ar71xx/ath79 with 
bullet-m-xw)

-- ynezz

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


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-18 Thread Lech Perczak

Hello Petr,

W dniu 2018-11-18 o 21:18, Petr Štetiar pisze:

Lech Perczak  [2018-11-18 17:21:46]:


well as checking if rssileds package was indeed pulled in via "opkg list

Somehow the rssileds package wasn't enabled even if I've selected building of
nano-xm-w via menu config. I've deleted the .config and created a new one,
then it was selected, weird. Anyway it works also on ar71xx/bullet-m-xw.

-- ynezz


Big thanks for testing!
Can I add Tested-By tag to my patch? :)

--
Pozdrawiam,
Lech Perczak
lech.perc...@gmail.com
Mobile: +48 694 309 185


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


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-18 Thread Petr Štetiar
Lech Perczak  [2018-11-18 17:21:46]:

> well as checking if rssileds package was indeed pulled in via "opkg list

Somehow the rssileds package wasn't enabled even if I've selected building of
nano-xm-w via menu config. I've deleted the .config and created a new one,
then it was selected, weird. Anyway it works also on ar71xx/bullet-m-xw.

-- ynezz

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


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-18 Thread Lech Perczak

Hi Petr,

Thanks for testing!

W dniu 2018-11-18 o 17:05, Petr Štetiar pisze:

Lech Perczak  [2018-11-18 01:29:08]:

Hi,


Actually, I meant building and testing on ar71xx target instead of ath79.
But anyway, you might include this little change in your patch,
because when I added this support, XW wasn't ported to ath79 yet. Therefore
the LED configuration didn't need any alterations, as on ath79 it doesn't
specify PWM support.

I've just pulled your changes into my testing branch so it looks like this now:

  07b41e3 Merge commit 'refs/pull/1372/head' of 
https://github.com/openwrt/openwrt into nanostation-m-xw
  a49e6d0 ar71xx: ubnt-(xm,xw): add rssileds package
  78c3af2 ar71xx: ubnt-(xm,xw): create RSSI monitor on wlan0
  bc95553 ath79: ubnt-xw: Add rssileds kernel package
  ffc74ff WIP: ath79: Add support for Ubiquiti Nanostation M (XW)
  67a8871 ath79: Add support for Ubiquity Bullet M (XW)
  dd02a19 ar71xx: fix TP-Link Archer C7 v5 switch LEDs
  251c350 mt76: update to the latest version

Then I've built ar71xx image for nano-m-xw, but it seems like this image
doesn't work out of the box on bullet-m-xw, the green/link4 is on after boot,
and RSSI LEDs doesn't work as on ath79. Setting timer tigger on the LEDs
manually works. Don't have time right now to find out what's the problem, any
idea where should I look at?

-- ynezz

A dump of /etc/config/system right after first  boot might be useful, as 
well as checking if rssileds package was indeed pulled in via "opkg list 
--installed | grep rssileds" . Maybe .config needs to be refreshed. At 
least on XM it worked for me :)


--
Pozdrawiam,
Lech Perczak
lech.perc...@gmail.com
Mobile: +48 694 309 185


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


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-18 Thread Petr Štetiar
Lech Perczak  [2018-11-18 01:29:08]:

Hi,

> Actually, I meant building and testing on ar71xx target instead of ath79.
> But anyway, you might include this little change in your patch,
> because when I added this support, XW wasn't ported to ath79 yet. Therefore
> the LED configuration didn't need any alterations, as on ath79 it doesn't
> specify PWM support.

I've just pulled your changes into my testing branch so it looks like this now:

 07b41e3 Merge commit 'refs/pull/1372/head' of 
https://github.com/openwrt/openwrt into nanostation-m-xw
 a49e6d0 ar71xx: ubnt-(xm,xw): add rssileds package
 78c3af2 ar71xx: ubnt-(xm,xw): create RSSI monitor on wlan0
 bc95553 ath79: ubnt-xw: Add rssileds kernel package
 ffc74ff WIP: ath79: Add support for Ubiquiti Nanostation M (XW)
 67a8871 ath79: Add support for Ubiquity Bullet M (XW)
 dd02a19 ar71xx: fix TP-Link Archer C7 v5 switch LEDs
 251c350 mt76: update to the latest version

Then I've built ar71xx image for nano-m-xw, but it seems like this image
doesn't work out of the box on bullet-m-xw, the green/link4 is on after boot,
and RSSI LEDs doesn't work as on ath79. Setting timer tigger on the LEDs
manually works. Don't have time right now to find out what's the problem, any
idea where should I look at?

-- ynezz

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


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-17 Thread Lech Perczak

Hello Petr,

W dniu 2018-11-17 o 14:04, Petr Štetiar pisze:

Lech Perczak  [2018-11-17 10:25:30]:


ar9342_ubnt_xw.dtsi, and then secondary ethernet and USB only enabled in
respective .dts files. It'd be even better if someone on the list had a
Rocket M XW to test, as it is the fullest variant.

Hm, so maybe I should move definition of mdio and eth0 from
ar9342_ubnt_bullet-m-xw.dts to ar9342_ubnt_xw.dtsi as well?  But this could be
done later once someone with Nanostation XW shows up and can confirm, that it
actually works.

Yes please :)

Yes to what? :-)

  a) Send third version of the patch with mdio/eth0 in ar9342_ubnt_xw.dtsi
  b) Wait for someone with Nanostation XW to confirm, that it could work and
 don't assume anything
I meant sending new patch, but after reading recent emails I believe it 
's in the works already :)



Also, wouldn't you mind reviewing and/or testing my PR regarding RSSI
indicator LEDs on your M2HP on ar71xx target?
It is located on Github: https://github.com/openwrt/openwrt/pull/1372
I only had a chance to test it against Nanobridge M5 (XM version).

Ok, but I don't have much experience with RSSI LEDs, so can you tell me how
would you like me to test it on my M2HP? Thanks.

It's just a matter of flashing build including my patch, and then
establishing a connection. Bullet may work either as AP or client, the link
LEDS should just light up and show the signal strength after you connect :)

It seems, that as being on the latest master, all I had to do was adding the
module package:

  diff --git a/target/linux/ath79/image/generic-ubnt.mk
  b/target/linux/ath79/image/generic-ubnt.mk
  index 2d0b1ad..00f1159 100644
  --- a/target/linux/ath79/image/generic-ubnt.mk
  +++ b/target/linux/ath79/image/generic-ubnt.mk
  @@ -66,6 +66,7 @@ endef
   define Device/ubnt-xw
 $(Device/ubnt)
 UBNT_TYPE := XW
  +  DEVICE_PACKAGES += rssileds
 UBNT_CHIP := ar934x
 UBNT_BOARD := XM
 UBNT_VERSION := 6.0.4

and the light show has started, so it works, nice. Thanks!

  Tested-by: Petr Štetiar 


Actually, I meant building and testing on ar71xx target instead of 
ath79. But anyway, you might include this little change in your patch,
because when I added this support, XW wasn't ported to ath79 yet. 
Therefore the LED configuration didn't need any alterations, as on ath79 
it doesn't specify PWM support. My 1st patch drops it also from ar71xx, 
which seems likely to stay for 19.01 release.


If you'd like, I can build the ar71xx image for you, or you can just 
checkout my branch from github directly.  I'll rebase it against current 
master.




-- ynezz



--
Pozdrawiam,
Lech Perczak
lech.perc...@gmail.com
Mobile: +48 694 309 185


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


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-17 Thread Petr Štetiar
Lech Perczak  [2018-11-17 10:25:30]:

> > > ar9342_ubnt_xw.dtsi, and then secondary ethernet and USB only enabled in
> > > respective .dts files. It'd be even better if someone on the list had a
> > > Rocket M XW to test, as it is the fullest variant.
>
> > Hm, so maybe I should move definition of mdio and eth0 from
> > ar9342_ubnt_bullet-m-xw.dts to ar9342_ubnt_xw.dtsi as well?  But this could 
> > be
> > done later once someone with Nanostation XW shows up and can confirm, that 
> > it
> > actually works.
>
> Yes please :)

Yes to what? :-) 

 a) Send third version of the patch with mdio/eth0 in ar9342_ubnt_xw.dtsi
 b) Wait for someone with Nanostation XW to confirm, that it could work and
don't assume anything

> > > Also, wouldn't you mind reviewing and/or testing my PR regarding RSSI
> > > indicator LEDs on your M2HP on ar71xx target?
> > > It is located on Github: https://github.com/openwrt/openwrt/pull/1372
> > > I only had a chance to test it against Nanobridge M5 (XM version).
>
> > Ok, but I don't have much experience with RSSI LEDs, so can you tell me how
> > would you like me to test it on my M2HP? Thanks.
>
> It's just a matter of flashing build including my patch, and then
> establishing a connection. Bullet may work either as AP or client, the link
> LEDS should just light up and show the signal strength after you connect :)

It seems, that as being on the latest master, all I had to do was adding the
module package:

 diff --git a/target/linux/ath79/image/generic-ubnt.mk
 b/target/linux/ath79/image/generic-ubnt.mk
 index 2d0b1ad..00f1159 100644
 --- a/target/linux/ath79/image/generic-ubnt.mk
 +++ b/target/linux/ath79/image/generic-ubnt.mk
 @@ -66,6 +66,7 @@ endef
  define Device/ubnt-xw
$(Device/ubnt)
UBNT_TYPE := XW
 +  DEVICE_PACKAGES += rssileds
UBNT_CHIP := ar934x
UBNT_BOARD := XM
UBNT_VERSION := 6.0.4

and the light show has started, so it works, nice. Thanks!

 Tested-by: Petr Štetiar 

-- ynezz

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


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-17 Thread Petr Štetiar
Lech Perczak  [2018-11-17 10:28:20]:

> Wasn't this possible with downgrading to AirOS 5 first just as it is done
> for XM series?  Please take a look for instructions for them, on XM the
> procedure is quite easy.

I was using the same downgrade trick on other older UBNT devices as well, and
I hoped, that it would still work for this new device as well, but it didn't.
I simply couldn't find airOS v5 firmware image for XW, and flashing airOS v5
image for XM failed for me on XW:

 XW.v6.1.7# fwupdate.real -m /tmp/XM.v5.6.15.30572.170328.1107.bin -d
 ...
 Current: XW.ar934x.v6.1.7.32555.180523.1754
 New ver: XM.ar7240.v5.6.15.30572.170328.1107
 Versions: New(329231) 5.6.15, Required(393220) 6.0.4
 Invalid version 'XM.ar7240.v5.6.15.30572.170328.1107'

So for me it was clear, that it's different platform ar934x versus ar7240 and
that minimum version allowed for XW is 6.0.4. As of today, for XW you can
download just two firmware versions 6.1.7 and 6.1.8. My device came from
factory flashed with 6.1.5.

Wherever I looked it was all just about TFTP and initramfs methods, which
needs soldering and possibly can cause warranty problems.

-- ynezz

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


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-17 Thread Lech Perczak

Hi Petr, Adrian,

W dniu 2018-11-17 o 07:44, Petr Štetiar pisze:

m...@adrianschmutzler.de  [2018-11-16 19:15:41]:

Hi Adrian,


if I haven't overlooked it, the patch does not provide a "factory" Image as
in ar71xx, at least according to "Flashing instructions".

if I parse this correctly, then my answer is, that I simply didn't included
instructions for flashing of factory image as it wasn't possible at that time,
because `fwupdate.real` utility in airOS v6+ (I'm not 100% sure about this),
doesn't allow flashing of unsigned factory images, so you simply couldn't
flash other factory images then those from Ubiquity.

  XW.v6.1.7# fwupdate.real -m 
/tmp/openwrt-ath79-generic-ubnt_bullet-m2hp-squashfs-factory.bin  -d
  ...
  Current: XW.ar934x.v6.1.7.32555.180523.1754
  New ver: XW.ar934x.v6.0.4-OpenWrt-r8452+9-e95e9fc
  Versions: New(393220) 6.0.4, Required(393220) 6.0.4
  ...
  Bad Image Structure
  Signature check failed

But in the meantime it was possible to remove this RSA signature checking in
`fwupdate.real`, so in v2 of this patch, there are instructions for flashing
of factory images:

  B) Experimental factory image flashing over SSH from airOS v6.1.7

1. You need to flash your UBNT M2HP with airOS v6.1.7 firmware
   no other airOS version is currently supported
2. git clone 
https://github.com/true-systems/ubnt-bullet-m2hp-openwrt-flashing
3. cd ubnt-bullet-m2hp-openwrt-flashing
4. make flash-factory 
FW_OWRT=/path/to/your/openwrt-ath79-generic-ubnt_bullet-m-xw-squashfs-factory.bin

Please note, that so far it was tested only on two different Bullet M2HP (XW)
devices and it worked. If you've such device and are willing to risk testing
it, you're more then welcome. Any feedback is appreciated. Thanks!


Wasn't this possible with downgrading to AirOS 5 first just as it is 
done for XM series?
Please take a look for instructions for them, on XM the procedure is 
quite easy.




-- ynezz



--
Pozdrawiam,
Lech Perczak
lech.perc...@gmail.com
Mobile: +48 694 309 185


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


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-17 Thread Lech Perczak

W dniu 2018-11-17 o 07:33, Petr Štetiar pisze:

Lech Perczak  [2018-11-16 18:46:40]:

Hi,


For example, Nanostation is basically a Bullet with extra ethernet port, and
Rocket is a Bullet with added USB port.

Ah, thanks for explanation.

You're welcome



It'd be great if support for all of them could be included in
ar9342_ubnt_xw.dtsi, and then secondary ethernet and USB only enabled in
respective .dts files. It'd be even better if someone on the list had a
Rocket M XW to test, as it is the fullest variant.

Hm, so maybe I should move definition of mdio and eth0 from
ar9342_ubnt_bullet-m-xw.dts to ar9342_ubnt_xw.dtsi as well?  But this could be
done later once someone with Nanostation XW shows up and can confirm, that it
actually works.

Yes please :)



Also, wouldn't you mind reviewing and/or testing my PR regarding RSSI
indicator LEDs on your M2HP on ar71xx target?
It is located on Github: https://github.com/openwrt/openwrt/pull/1372
I only had a chance to test it against Nanobridge M5 (XM version).

Ok, but I don't have much experience with RSSI LEDs, so can you tell me how
would you like me to test it on my M2HP? Thanks.
It's just a matter of flashing build including my patch, and then 
establishing a connection. Bullet may work either as AP or client, the 
link LEDS should just light up and show the signal strength after you 
connect :)


-- ynezz
.



--
Pozdrawiam,
Lech Perczak
lech.perc...@gmail.com
Mobile: +48 694 309 185


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


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-16 Thread Petr Štetiar
m...@adrianschmutzler.de  [2018-11-16 19:15:41]:

Hi Adrian,

> if I haven't overlooked it, the patch does not provide a "factory" Image as
> in ar71xx, at least according to "Flashing instructions".

if I parse this correctly, then my answer is, that I simply didn't included
instructions for flashing of factory image as it wasn't possible at that time,
because `fwupdate.real` utility in airOS v6+ (I'm not 100% sure about this),
doesn't allow flashing of unsigned factory images, so you simply couldn't
flash other factory images then those from Ubiquity.

 XW.v6.1.7# fwupdate.real -m 
/tmp/openwrt-ath79-generic-ubnt_bullet-m2hp-squashfs-factory.bin  -d
 ...
 Current: XW.ar934x.v6.1.7.32555.180523.1754
 New ver: XW.ar934x.v6.0.4-OpenWrt-r8452+9-e95e9fc
 Versions: New(393220) 6.0.4, Required(393220) 6.0.4
 ...
 Bad Image Structure
 Signature check failed

But in the meantime it was possible to remove this RSA signature checking in
`fwupdate.real`, so in v2 of this patch, there are instructions for flashing
of factory images:

 B) Experimental factory image flashing over SSH from airOS v6.1.7

   1. You need to flash your UBNT M2HP with airOS v6.1.7 firmware
  no other airOS version is currently supported
   2. git clone 
https://github.com/true-systems/ubnt-bullet-m2hp-openwrt-flashing
   3. cd ubnt-bullet-m2hp-openwrt-flashing
   4. make flash-factory 
FW_OWRT=/path/to/your/openwrt-ath79-generic-ubnt_bullet-m-xw-squashfs-factory.bin

Please note, that so far it was tested only on two different Bullet M2HP (XW)
devices and it worked. If you've such device and are willing to risk testing
it, you're more then welcome. Any feedback is appreciated. Thanks!

-- ynezz

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


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-16 Thread Petr Štetiar
Lech Perczak  [2018-11-16 18:46:40]:

Hi,

> For example, Nanostation is basically a Bullet with extra ethernet port, and
> Rocket is a Bullet with added USB port.

Ah, thanks for explanation.

> It'd be great if support for all of them could be included in
> ar9342_ubnt_xw.dtsi, and then secondary ethernet and USB only enabled in
> respective .dts files. It'd be even better if someone on the list had a
> Rocket M XW to test, as it is the fullest variant.

Hm, so maybe I should move definition of mdio and eth0 from
ar9342_ubnt_bullet-m-xw.dts to ar9342_ubnt_xw.dtsi as well?  But this could be
done later once someone with Nanostation XW shows up and can confirm, that it
actually works.

> Also, wouldn't you mind reviewing and/or testing my PR regarding RSSI
> indicator LEDs on your M2HP on ar71xx target?
> It is located on Github: https://github.com/openwrt/openwrt/pull/1372
> I only had a chance to test it against Nanobridge M5 (XM version).

Ok, but I don't have much experience with RSSI LEDs, so can you tell me how
would you like me to test it on my M2HP? Thanks.

-- ynezz

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


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-16 Thread mail
Hi,

if I haven't overlooked it, the patch does not provide a "factory" Image as in 
ar71xx, at least according to "Flashing instructions".

Is this specific to this patch or is there some reason why factory won't be 
available for XM on ath79 at all?

Best Adrian

> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Lech Perczak
> Sent: Freitag, 16. November 2018 18:47
> To: Petr Štetiar 
> Cc: openwrt-devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity
> Bullet M2HP
> 
> Hi,
> 
> W dniu 2018-11-16 o 16:13, Petr Štetiar pisze:
> > Lech Perczak  [2018-11-15 19:30:00]:
> >
> > Hi,
> >
> >> Just a couple of remarks inline, based on my knowledge about XM series.
> > thanks for the review!
> >
> >>> + ubnt,bullet-m2hp|\
> >> I'd call it ubnt,bullet-m-xw, as this patch will very likely support
> >> Bullet-M5HP also.
> > Ok
> >
> >>> + link4 {
> >>> + label = "ubnt:green:link4";
> >>> + gpios = < 14 GPIO_ACTIVE_LOW>;
> >>> + };
> >>> + };
> >>> +};
> >> Shouldn't those LEDs be defined in ar9342_ubnt_xw.dtsi?
> >> AFAIK all XW boards (Bullet, Nano, Rocket) use same LED
> >> configurations, like in XM target also.
> > It's hard for me to add support for something I don't have on the
> > table and can't test it at least quickly, so it's hard to guess what
> > should be common and share stuff and what's separate for each device.
> 
> This is the situation where we have to rely on knowledge of others :) The
> whole range of Ubiquiti Airmax devices uses essentially those two boards,
> with functionally-equivalent variants based on XM and XW boards.
> 
> For example, Nanostation is basically a Bullet with extra ethernet port, and
> Rocket is a Bullet with added USB port.
> As far as I understand ar71xx code, the same situation is present on XW
> boards. Same functionality, different SoCs.
> 
> Feel free to ask me any questions on this topic :)
> 
> >
> >> Please take a look at ath79 device tree for XM boards and for board
> >> file for XW in ar71xx.
> > I did, but wasn't smart from that anyway. I would need more experience
> > with those device to understand the differencies.
> It'd be great if support for all of them could be included in
> ar9342_ubnt_xw.dtsi, and then secondary ethernet and USB only enabled in
> respective .dts files. It'd be even better if someone on the list had a Rocket
> M XW to test, as it is the fullest variant.
> 
> Unfortunately I only have access to XM-based devices :(
> 
> >
> >>> +  DEVICE_TITLE := Ubiquiti Bullet M2HP
> >> Same as before, I'd call it ubnt_bullet-m-xw, as this patchset should
> >> automatically support Bullet-M5HP also.
> > Ok so it might be safe to change it to `Ubiquiti Bullet M2 and M5 HP (XW)` ?
> I'd go with just Ubiquiti Bullet-M (XW), as this target will directly support 
> also
> Nanobridge and Powerbeam series, which also have frequency variants
> available for 900MHz and 3.4GHz bands (for licensed or amateur radio use).
> >
> > -- ynezz
> >
> Also, wouldn't you mind reviewing and/or testing my PR regarding RSSI
> indicator LEDs on your M2HP on ar71xx target?
> It is located on Github: https://github.com/openwrt/openwrt/pull/1372
> I only had a chance to test it against Nanobridge M5 (XM version).
> Also please rebase it on top of current master if you do decide to test it :)
> 
> --
> With kind regards,
> Lech
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


pgpi0HXPe8Iw1.pgp
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-16 Thread Lech Perczak

Hi,

W dniu 2018-11-16 o 16:13, Petr Štetiar pisze:

Lech Perczak  [2018-11-15 19:30:00]:

Hi,


Just a couple of remarks inline, based on my knowledge about XM series.

thanks for the review!


+   ubnt,bullet-m2hp|\

I'd call it ubnt,bullet-m-xw, as this patch will very likely support
Bullet-M5HP also.

Ok


+   link4 {
+   label = "ubnt:green:link4";
+   gpios = < 14 GPIO_ACTIVE_LOW>;
+   };
+   };
+};

Shouldn't those LEDs be defined in ar9342_ubnt_xw.dtsi?
AFAIK all XW boards (Bullet, Nano, Rocket) use same LED configurations, like
in XM target also.

It's hard for me to add support for something I don't have on the table and
can't test it at least quickly, so it's hard to guess what should be
common and share stuff and what's separate for each device.


This is the situation where we have to rely on knowledge of others :)
The whole range of Ubiquiti Airmax devices uses essentially those two 
boards, with functionally-equivalent variants based on XM and XW boards.


For example, Nanostation is basically a Bullet with extra ethernet port, 
and Rocket is a Bullet with added USB port.
As far as I understand ar71xx code, the same situation is present on XW 
boards. Same functionality, different SoCs.


Feel free to ask me any questions on this topic :)




Please take a look at ath79 device tree for XM boards and for board file for
XW in ar71xx.

I did, but wasn't smart from that anyway. I would need more experience with
those device to understand the differencies.
It'd be great if support for all of them could be included in 
ar9342_ubnt_xw.dtsi, and then secondary ethernet and USB only enabled in 
respective .dts files. It'd be even better if someone on the list had a 
Rocket M XW to test, as it is the fullest variant.


Unfortunately I only have access to XM-based devices :(




+  DEVICE_TITLE := Ubiquiti Bullet M2HP

Same as before, I'd call it ubnt_bullet-m-xw, as this patchset should
automatically support Bullet-M5HP also.

Ok so it might be safe to change it to `Ubiquiti Bullet M2 and M5 HP (XW)` ?
I'd go with just Ubiquiti Bullet-M (XW), as this target will directly 
support also Nanobridge and Powerbeam series, which also have frequency 
variants available for 900MHz and 3.4GHz bands (for licensed or amateur 
radio use).


-- ynezz

Also, wouldn't you mind reviewing and/or testing my PR regarding RSSI 
indicator LEDs on your M2HP on ar71xx target?

It is located on Github: https://github.com/openwrt/openwrt/pull/1372
I only had a chance to test it against Nanobridge M5 (XM version).
Also please rebase it on top of current master if you do decide to test 
it :)


--
With kind regards,
Lech


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


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-16 Thread Petr Štetiar
Lech Perczak  [2018-11-15 19:30:00]:

Hi,

> Just a couple of remarks inline, based on my knowledge about XM series.

thanks for the review!

> > +   ubnt,bullet-m2hp|\
>
> I'd call it ubnt,bullet-m-xw, as this patch will very likely support
> Bullet-M5HP also.

Ok

> > +   link4 {
> > +   label = "ubnt:green:link4";
> > +   gpios = < 14 GPIO_ACTIVE_LOW>;
> > +   };
> > +   };
> > +};
> 
> Shouldn't those LEDs be defined in ar9342_ubnt_xw.dtsi?
> AFAIK all XW boards (Bullet, Nano, Rocket) use same LED configurations, like
> in XM target also.

It's hard for me to add support for something I don't have on the table and
can't test it at least quickly, so it's hard to guess what should be
common and share stuff and what's separate for each device.

> Please take a look at ath79 device tree for XM boards and for board file for
> XW in ar71xx.

I did, but wasn't smart from that anyway. I would need more experience with
those device to understand the differencies.

> > +  DEVICE_TITLE := Ubiquiti Bullet M2HP
>
> Same as before, I'd call it ubnt_bullet-m-xw, as this patchset should
> automatically support Bullet-M5HP also.

Ok so it might be safe to change it to `Ubiquiti Bullet M2 and M5 HP (XW)` ?

-- ynezz

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


Re: [OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-15 Thread Lech Perczak

Hi,

Just a couple of remarks inline, based on my knowledge about XM series.

W dniu 2018-11-15 o 13:32, Petr Štetiar pisze:

From: Petr Štetiar 

CPU: AR9342 SoC
RAM: 64 MB DDR2
Flash:8 MB NOR SPI
Ports:  100 MBit (24V PoE in)
WLAN:   2.4 GHz
UART: 1 UART on PCB marked as J1 with 115200 8N1 config
LEDs:   Power, Ethernet, WPS, USB, RF 2.4G, RF 5G
Buttons:Reset

UART connection details

   .-.
   | |
[ETH]  J1 [ANT]
   |o VCC o RX o TX o GND|
   `-'

Flashing instructions

  A) Serial console, U-Boot and TFTP

1. Connect to serial header J1 on the PCB
2. Power on device and enter U-Boot console
3. Set up TFTP server serving an OpenWrt initramfs build
4. Load initramfs build using the command tftpboot in the U-Boot cli
5. Boot the loaded image using the command bootm
6. Copy squashfs OpenWrt sysupgrade build to the booted device
7. Use mtd to write sysupgrade to partition "firmware"
8. Reboot and enjoy

  B) Sysupgrade over SSH in airOS v6.1.7

1. Upgrade or downgrade airOS to v6.1.7
2. git clone 
https://github.com/true-systems/ubnt-bullet-m2hp-openwrt-flashing
3. cd ubnt-bullet-m2hp-openwrt-flashing
4. less README.md
5. make flash 
FW_UBNT=/path/to/your/openwrt-ath79-generic-ubnt_bullet-m2hp-squashfs-sysupgrade.bin

Signed-off-by: Petr Štetiar 
---
  target/linux/ath79/base-files/etc/board.d/01_leds  |  1 +
  .../linux/ath79/base-files/etc/board.d/02_network  |  1 +
  target/linux/ath79/dts/ar9342_ubnt_bullet-m2hp.dts | 66 
  target/linux/ath79/dts/ar9342_ubnt_xw.dtsi | 88 ++
  target/linux/ath79/image/generic-ubnt.mk   | 16 
  5 files changed, 172 insertions(+)
  create mode 100644 target/linux/ath79/dts/ar9342_ubnt_bullet-m2hp.dts
  create mode 100644 target/linux/ath79/dts/ar9342_ubnt_xw.dtsi

diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds 
b/target/linux/ath79/base-files/etc/board.d/01_leds
index f04eb7f..281686e 100755
--- a/target/linux/ath79/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/base-files/etc/board.d/01_leds
@@ -94,6 +94,7 @@ tplink,tl-wr841-v11)
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" 
"0x02"
;;
  ubnt,bullet-m|\
+ubnt,bullet-m2hp|\
  ubnt,nano-m|\
  ubnt,rocket-m)
ucidef_set_rssimon "wlan0" "20" "1"
diff --git a/target/linux/ath79/base-files/etc/board.d/02_network 
b/target/linux/ath79/base-files/etc/board.d/02_network
index 5f02c57..8556bd3 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -22,6 +22,7 @@ ath79_setup_interfaces()
tplink,tl-wa901nd-v2|\
tplink,tl-wr703n|\
ubnt,bullet-m|\
+   ubnt,bullet-m2hp|\
I'd call it ubnt,bullet-m-xw, as this patch will very likely support 
Bullet-M5HP also.

ubnt,lap-120|\
ubnt,nanostation-ac-loco|\
ubnt,rocket-m|\
diff --git a/target/linux/ath79/dts/ar9342_ubnt_bullet-m2hp.dts 
b/target/linux/ath79/dts/ar9342_ubnt_bullet-m2hp.dts
new file mode 100644
index 000..2e978cf
--- /dev/null
+++ b/target/linux/ath79/dts/ar9342_ubnt_bullet-m2hp.dts
@@ -0,0 +1,66 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include 
+#include 
+
+#include "ar9342_ubnt_xw.dtsi"
+
+/ {
+   compatible = "ubnt,bullet-m2hp", "ubnt,xw";
+   model = "Ubiquiti Bullet M2HP (XW)";
+
+   gpio-leds {
+   compatible = "gpio-leds";
+
+   link1 {
+   label = "ubnt:red:link1";
+   gpios = < 11 GPIO_ACTIVE_LOW>;
+   };
+
+   link2 {
+   label = "ubnt:orange:link2";
+   gpios = < 16 GPIO_ACTIVE_LOW>;
+   };
+
+   link3 {
+   label = "ubnt:green:link3";
+   gpios = < 13 GPIO_ACTIVE_LOW>;
+   };
+
+   link4 {
+   label = "ubnt:green:link4";
+   gpios = < 14 GPIO_ACTIVE_LOW>;
+   };
+   };
+};


Shouldn't those LEDs be defined in ar9342_ubnt_xw.dtsi?
AFAIK all XW boards (Bullet, Nano, Rocket) use same LED configurations, 
like in XM target also.
Please take a look at ath79 device tree for XM boards and for board file 
for XW in ar71xx.



+
+ {
+   status = "okay";
+
+   phy-mask = <4>;
+   phy4: ethernet-phy@4 {
+   phy-mode = "rgmii";
+   reg = <4>;
+   };
+};
+
+ {
+   status = "okay";
+
+   pll-data = <0x0600 0x0101 0x1313>;
+   mtd-mac-address = < 0x0>;
+
+   phy-mode = "rgmii";
+   phy-handle = <>;
+
+   gmac-config {
+   device = <>;
+   rxd-delay = <3>;
+   rxdv-delay = <3>;
+   };
+};
+
+ {
+   status = 

[OpenWrt-Devel] [PATCH] ath79: Add support for Ubiquity Bullet M2HP

2018-11-15 Thread Petr Štetiar
From: Petr Štetiar 

CPU: AR9342 SoC
RAM: 64 MB DDR2
Flash:8 MB NOR SPI
Ports:  100 MBit (24V PoE in)
WLAN:   2.4 GHz
UART: 1 UART on PCB marked as J1 with 115200 8N1 config
LEDs:   Power, Ethernet, WPS, USB, RF 2.4G, RF 5G
Buttons:Reset

UART connection details

  .-.
  | |
[ETH]  J1 [ANT]
  |o VCC o RX o TX o GND|
  `-'

Flashing instructions

 A) Serial console, U-Boot and TFTP

   1. Connect to serial header J1 on the PCB
   2. Power on device and enter U-Boot console
   3. Set up TFTP server serving an OpenWrt initramfs build
   4. Load initramfs build using the command tftpboot in the U-Boot cli
   5. Boot the loaded image using the command bootm
   6. Copy squashfs OpenWrt sysupgrade build to the booted device
   7. Use mtd to write sysupgrade to partition "firmware"
   8. Reboot and enjoy

 B) Sysupgrade over SSH in airOS v6.1.7

   1. Upgrade or downgrade airOS to v6.1.7
   2. git clone 
https://github.com/true-systems/ubnt-bullet-m2hp-openwrt-flashing
   3. cd ubnt-bullet-m2hp-openwrt-flashing
   4. less README.md
   5. make flash 
FW_UBNT=/path/to/your/openwrt-ath79-generic-ubnt_bullet-m2hp-squashfs-sysupgrade.bin

Signed-off-by: Petr Štetiar 
---
 target/linux/ath79/base-files/etc/board.d/01_leds  |  1 +
 .../linux/ath79/base-files/etc/board.d/02_network  |  1 +
 target/linux/ath79/dts/ar9342_ubnt_bullet-m2hp.dts | 66 
 target/linux/ath79/dts/ar9342_ubnt_xw.dtsi | 88 ++
 target/linux/ath79/image/generic-ubnt.mk   | 16 
 5 files changed, 172 insertions(+)
 create mode 100644 target/linux/ath79/dts/ar9342_ubnt_bullet-m2hp.dts
 create mode 100644 target/linux/ath79/dts/ar9342_ubnt_xw.dtsi

diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds 
b/target/linux/ath79/base-files/etc/board.d/01_leds
index f04eb7f..281686e 100755
--- a/target/linux/ath79/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/base-files/etc/board.d/01_leds
@@ -94,6 +94,7 @@ tplink,tl-wr841-v11)
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" 
"0x02"
;;
 ubnt,bullet-m|\
+ubnt,bullet-m2hp|\
 ubnt,nano-m|\
 ubnt,rocket-m)
ucidef_set_rssimon "wlan0" "20" "1"
diff --git a/target/linux/ath79/base-files/etc/board.d/02_network 
b/target/linux/ath79/base-files/etc/board.d/02_network
index 5f02c57..8556bd3 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -22,6 +22,7 @@ ath79_setup_interfaces()
tplink,tl-wa901nd-v2|\
tplink,tl-wr703n|\
ubnt,bullet-m|\
+   ubnt,bullet-m2hp|\
ubnt,lap-120|\
ubnt,nanostation-ac-loco|\
ubnt,rocket-m|\
diff --git a/target/linux/ath79/dts/ar9342_ubnt_bullet-m2hp.dts 
b/target/linux/ath79/dts/ar9342_ubnt_bullet-m2hp.dts
new file mode 100644
index 000..2e978cf
--- /dev/null
+++ b/target/linux/ath79/dts/ar9342_ubnt_bullet-m2hp.dts
@@ -0,0 +1,66 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include 
+#include 
+
+#include "ar9342_ubnt_xw.dtsi"
+
+/ {
+   compatible = "ubnt,bullet-m2hp", "ubnt,xw";
+   model = "Ubiquiti Bullet M2HP (XW)";
+
+   gpio-leds {
+   compatible = "gpio-leds";
+
+   link1 {
+   label = "ubnt:red:link1";
+   gpios = < 11 GPIO_ACTIVE_LOW>;
+   };
+
+   link2 {
+   label = "ubnt:orange:link2";
+   gpios = < 16 GPIO_ACTIVE_LOW>;
+   };
+
+   link3 {
+   label = "ubnt:green:link3";
+   gpios = < 13 GPIO_ACTIVE_LOW>;
+   };
+
+   link4 {
+   label = "ubnt:green:link4";
+   gpios = < 14 GPIO_ACTIVE_LOW>;
+   };
+   };
+};
+
+ {
+   status = "okay";
+
+   phy-mask = <4>;
+   phy4: ethernet-phy@4 {
+   phy-mode = "rgmii";
+   reg = <4>;
+   };
+};
+
+ {
+   status = "okay";
+
+   pll-data = <0x0600 0x0101 0x1313>;
+   mtd-mac-address = < 0x0>;
+
+   phy-mode = "rgmii";
+   phy-handle = <>;
+
+   gmac-config {
+   device = <>;
+   rxd-delay = <3>;
+   rxdv-delay = <3>;
+   };
+};
+
+ {
+   status = "disabled";
+};
diff --git a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi 
b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi
new file mode 100644
index 000..c5ae5df
--- /dev/null
+++ b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi
@@ -0,0 +1,88 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include 
+#include 
+
+#include "ar9344.dtsi"
+
+/ {
+   compatible = "ubnt,xw", "qca,ar9342";
+   model = "Ubiquiti Networks XW board";
+
+   keys {
+   compatible = "gpio-keys";
+
+