Bug#877297: [Debian-lego-team] Bug#877297: libnxt: usb:v03EBp* too inclusive, leads to false positive matches

2021-10-01 Thread Nicolas Schodet
* Petter Reinholdtsen  [2021-10-01 14:31]:
> [Nicolas Schodet]
> > I think there is no need to check, the product ID is included verbatim
> > in the libnxt code source:
> >
> >   { 0x03EB, 0x6124 }, /* SAM-BA */
> OK, very good.  Btw, when will the NXT go into this mode?  Is there a
> point in listing it as one of the NXT IDs at all?

Only when suffering from the NXT clicking syndrome :)

Nicolas.



Bug#877297: [Debian-lego-team] Bug#877297: libnxt: usb:v03EBp* too inclusive, leads to false positive matches

2021-10-01 Thread Petter Reinholdtsen
[Nicolas Schodet]
> I think there is no need to check, the product ID is included verbatim
> in the libnxt code source:
>
>   { 0x03EB, 0x6124 }, /* SAM-BA */

OK, very good.  Btw, when will the NXT go into this mode?  Is there a
point in listing it as one of the NXT IDs at all?

-- 
Vennlig hilsen
Petter Reinholdtsen



Bug#877297: [Debian-lego-team] Bug#877297: libnxt: usb:v03EBp* too inclusive, leads to false positive matches

2021-10-01 Thread Nicolas Schodet
* Petter Reinholdtsen  [2021-09-30 10:49]:
> [Nicolas Schodet]
> > I think so, could you check you have the same product id on your NXT?
> I guess, but am not quite sure how to check.  Do you have a recipe?

I think there is no need to check, the product ID is included verbatim
in the libnxt code source:

  { 0x03EB, 0x6124 }, /* SAM-BA */

> >> Alternative, perhaps that USB ID should not be listed in the appstream
> >> metainfo file?  I suspect I got the ID from one of the udev entries in
> >> one of the other lego related packages:
> > What are the consequences when several packages use the same
> > identifier?
> The appstream information is used to present package information to
> those that are looking for what to install, typically in graphical
> software helpers.  The only user of the hardware information that I am
> aware of, is the isenkram system I wrote, which will trigger every time
> it see some new hardware inserted into the machine, look up packages
> claiming support for this hardware and pop up a prompt suggesting to
> install these packages.  It can also look up already present hardware
> and identify firmware packages requested by the kernel.
> So if several packages use the same identifier, several packages will be
> proposed to the user.
> > I do not think there will be many SAM-BA in the wild, unless you are
> > working with a SAM91 dev board. What would be the consequence for
> > someone working with such a board?
> The consequence is that isenkram will propose to install lego related
> packages for this bord, which will confuse the user and not really help
> them in any way.

I think your patch is OK, a developer working on a (old) microcontroller
will not be too confused by a prompt to install libnxt in my opinion.

Nicolas.



Bug#877297: [Debian-lego-team] Bug#877297: libnxt: usb:v03EBp* too inclusive, leads to false positive matches

2021-09-30 Thread Petter Reinholdtsen


[Nicolas Schodet]
> I think so, could you check you have the same product id on your NXT?

I guess, but am not quite sure how to check.  Do you have a recipe?

>> Alternative, perhaps that USB ID should not be listed in the appstream
>> metainfo file?  I suspect I got the ID from one of the udev entries in
>> one of the other lego related packages:
>
> What are the consequences when several packages use the same
> identifier?

The appstream information is used to present package information to
those that are looking for what to install, typically in graphical
software helpers.  The only user of the hardware information that I am
aware of, is the isenkram system I wrote, which will trigger every time
it see some new hardware inserted into the machine, look up packages
claiming support for this hardware and pop up a prompt suggesting to
install these packages.  It can also look up already present hardware
and identify firmware packages requested by the kernel.

So if several packages use the same identifier, several packages will be
proposed to the user.

> I do not think there will be many SAM-BA in the wild, unless you are
> working with a SAM91 dev board. What would be the consequence for
> someone working with such a board?

The consequence is that isenkram will propose to install lego related
packages for this bord, which will confuse the user and not really help
them in any way.

-- 
Happy hacking
Petter Reinholdtsen



Bug#877297: [Debian-lego-team] Bug#877297: libnxt: usb:v03EBp* too inclusive, leads to false positive matches

2021-09-30 Thread Nicolas Schodet
* Petter Reinholdtsen  [2021-09-29 17:13]:
> [Nicolas Schodet]
> > Actually, the NXT in flash mode is using the Atmel ROM bootloader which
> > uses 0x03eb:0x6124. Every devices using the SAM-BA bootloader on Atmel
> > AT91SAM chips will use this identifiers.
> Right.  So perhaps this patch is a better one?

> pere@minerva:~/src/lego-mindstorm/libnxt-git$ git diff
> diff --git a/debian/libnxt.metainfo.xml b/debian/libnxt.metainfo.xml
> index fd9f148..9593780 100644
> --- a/debian/libnxt.metainfo.xml
> +++ b/debian/libnxt.metainfo.xml
> @@ -12,6 +12,6 @@ intelligent brick at a relatively low level.
>
>
>  usb:v0694p0002d*
> -usb:v03EBp*
> +usb:v03EBp6124d*
>
>  

I think so, could you check you have the same product id on your NXT?

> Alternative, perhaps that USB ID should not be listed in the appstream
> metainfo file?  I suspect I got the ID from one of the udev entries in
> one of the other lego related packages:

What are the consequences when several packages use the same identifier?

I do not think there will be many SAM-BA in the wild, unless you are
working with a SAM91 dev board. What would be the consequence for
someone working with such a board?

Nicolas.



Bug#877297: [Debian-lego-team] Bug#877297: libnxt: usb:v03EBp* too inclusive, leads to false positive matches

2021-09-29 Thread Petter Reinholdtsen
[Nicolas Schodet]
> Actually, the NXT in flash mode is using the Atmel ROM bootloader which
> uses 0x03eb:0x6124. Every devices using the SAM-BA bootloader on Atmel
> AT91SAM chips will use this identifiers.

Right.  So perhaps this patch is a better one?

pere@minerva:~/src/lego-mindstorm/libnxt-git$ git diff
diff --git a/debian/libnxt.metainfo.xml b/debian/libnxt.metainfo.xml
index fd9f148..9593780 100644
--- a/debian/libnxt.metainfo.xml
+++ b/debian/libnxt.metainfo.xml
@@ -12,6 +12,6 @@ intelligent brick at a relatively low level.
   
   
 usb:v0694p0002d*
-usb:v03EBp*
+usb:v03EBp6124d*
   
 

Alternative, perhaps that USB ID should not be listed in the appstream
metainfo file?  I suspect I got the ID from one of the udev entries in
one of the other lego related packages:

% grep -irl 03eb */debian
libnxt/debian/libnxt.metainfo.xml
libnxt/debian/libnxt.udev
nbc/debian/nbc.udev
nxt-firmware/debian/nxt-firmware.metainfo.xml
t2n/debian/t2n.udev
%

-- 
Vennlig hilsen
Petter Reinholdtsen



Bug#877297: [Debian-lego-team] Bug#877297: libnxt: usb:v03EBp* too inclusive, leads to false positive matches

2021-09-28 Thread Nicolas Schodet
* Petter Reinholdtsen [2021-09-27 10:09]:
> I had a look in /var/lib/usbutils/usb.ids to figure out what the ID is
> registered for.  As far as I can tell it is not connected to any 
> USB device in the USB ID database.  Perhaps it is a good idea to get
> both IDs registered there?  The ID in question is supposed to be the NXT
> in 'flash mode'.  Not quite sure when that happen and if it is supposed
> to have a unique ID in that mode.

Actually, the NXT in flash mode is using the Atmel ROM bootloader which
uses 0x03eb:0x6124. Every devices using the SAM-BA bootloader on Atmel
AT91SAM chips will use this identifiers.

Nicolas.