Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-10-02 Thread Tomasz CEDRO
On Mon, Oct 2, 2017 at 1:40 AM, Ian Lepore  wrote:
> On Mon, 2017-10-02 at 00:05 +0200, Tomasz CEDRO wrote:
>> On Sun, Oct 1, 2017 at 10:59 PM, Ian Lepore  wrote:
>> > On Sun, 2017-10-01 at 22:20 +0200, Tomasz CEDRO wrote:
>> > > On Sun, Oct 1, 2017 at 9:38 PM, Ian Lepore 
>> > > wrote:
>> > > > On Sun, 2017-10-01 at 20:59 +0200, Tomasz CEDRO wrote:
>> > > > > On Sun, Oct 1, 2017 at 8:23 PM, Ian Lepore 
>> > > > > wrote:
>> > > > > > On Sun, 2017-10-01 at 20:17 +0200, Tomasz CEDRO wrote:
>> > > > > > > [...old stuff...]
>> > > > > I have verified on uath device (more on that below) and it
>> > > > > turns
>> > > > > out
>> > > > > $cdev works fine.. but it returns /dev/usb/X.Y.Z not the
>> > > > > /dev/cuaU0
>> > > > > which does not work with this "gobi_loader" utility which
>> > > > > requires
>> > > > > /dev/cuaU0 (CDC / serial port device)... any clues how to
>> > > > > replace
>> > > > > $cdev with cuaUX? :-)
>> > > > >
>> > > > > Regarding the UATH, I have TP-LINK TL-WN822N Ver2.0 based on
>> > > > > Atheros
>> > > > > 9002[1] and it seems to work with modified
>> > > > > /dev/devd/uath.conf
>> > > > > but
>> > > > > the
>> > > > > uathload returns "Operation not permitted" when executed as
>> > > > > root
>> > > > > and
>> > > > > during boot..
>> > > > >
>> > > > > [1] https://wikidevi.com/wiki/TP-LINK_TL-WN822N_v2
>> > > > >
>> > > > Hmmm.  I think we need to key off the tty 'attach' event
>> > > > instead of
>> > > > the
>> > > > devfs 'create' event.  The tty attach for a usb device is the
>> > > > one
>> > > > event
>> > > > that has all the info we need in one message.  This is assuming
>> > > > the
>> > > > device name in dmesg on attach is u3g0 or u3g1 or whatever.
>> > > >
>> > > > attach 100 {
>> > > > device-name "(u3g)[0-9]+";
>> > > > match "vendor"  "0x04da";
>> > > > match "product" "0x250e";
>> > > > action "/usr/local/bin/gobi_loader /dev/cua$ttyname
>> > > > /boot/firmware/gobi/";
>> > > > };
>> > > >
>> > > > The way I arrived at this conclusion was to first look in the
>> > > > devd
>> > > > source to figure out/remind myself that devd creates variables
>> > > > from
>> > > > all
>> > > > the tag=value tuples it finds in the events coming from the
>> > > > kernel.
>> > > >  Then I connected to devd using netcat so I could watch the
>> > > > events
>> > > > as
>> > > > they happen:
>> > > >
>> > > >   nc -U /var/run/devd.pipe
>> > > >
>> > > > then I plugged in a usb-serial adapter (I have no u3g stuff),
>> > > > which
>> > > > creates a whole lot of events.  The last one was the tty
>> > > > attach:
>> > > >
>> > > > +uplcom0 at bus=1 hubaddr=1 port=1 devaddr=2 interface=0
>> > > > ugen=ugen1.2
>> > > > vendor=0x067b product=0x2303 devclass=0x00 devsubclass=0x00
>> > > > devproto=0x00 sernum="" release=0x0300 mode=host intclass=0xff
>> > > > intsubclass=0x00 intprotocol=0x00 ttyname=U0 ttyports=1 on
>> > > > uhub1
>> > > >
>> > > > The '+' means it's an attach, the "device-name" variable is set
>> > > > from
>> > > > the space-delimited word after the +, and then vars are created
>> > > > from
>> > > > all the tag=value tuples between 'at' and 'on'.  So that gives
>> > > > us
>> > > > the
>> > > > info to match product and vendor, and ttyname is the suffix to
>> > > > append
>> > > > to /dev/cua to make the cdev name.
>> > > >
>> > > > -- Ian
>> > > Awsome! That works!! Thank you Ian!! Thank you for pointing out
>> > > how
>> > > that was achieved! :-)
>> > >
>> > > Is there any way to echo something out to the console to notify
>> > > user
>> > > that firmware is being updated? This takes some time and it would
>> > > be
>> > > nice to see something happens in the background.. I cannot see
>> > > anything with action "logging blah"; maybe no need for that?
>> > >
>> > I think you can use logger(1) in the action, like:
>> >
>> >   action "logger -p kern.crit Loading firmware to cua$ttyname ;
>> > /usr/local/bin/gobi_loader etc etc"
>> >
>> > The 'kern.crit' should be a high enough priority to ensure it comes
>> > out
>> > on the console, but it depends on syslog.conf of course.  If
>> > gobi_loader outputs a nice message it could be piped to logger(1)
>> > instead of putting the message in the command.
>> >
>> > -- Ian
>> Logger works with syslog which is loaded after modules and firmware,
>> this is why I could not see the message.. but additional action with
>> /bin/echo seems to do the job :-)
>>
>> Thank you guys! You are the best! FreeBSD ROX!!! =)
>>
>> https://github.com/freebsd/freebsd/pull/115
>>
>
> echo probably won't work when devices attach after rc scripts are done.
>  Try "logger -s", that sends the output to syslog and stderr, it might
> cover both situations.
>
> -- Ian

Logging updated, works as expected, thanks Ian! It should be all fine now :-)

https://github.com/freebsd/freebsd/pull/115

-- 
CeDeROM, SQ7MHZ, 

Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-10-01 Thread Ian Lepore
On Mon, 2017-10-02 at 00:05 +0200, Tomasz CEDRO wrote:
> On Sun, Oct 1, 2017 at 10:59 PM, Ian Lepore  wrote:
> > 
> > On Sun, 2017-10-01 at 22:20 +0200, Tomasz CEDRO wrote:
> > > 
> > > On Sun, Oct 1, 2017 at 9:38 PM, Ian Lepore 
> > > wrote:
> > > > 
> > > > 
> > > > On Sun, 2017-10-01 at 20:59 +0200, Tomasz CEDRO wrote:
> > > > > 
> > > > > 
> > > > > On Sun, Oct 1, 2017 at 8:23 PM, Ian Lepore 
> > > > > wrote:
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > On Sun, 2017-10-01 at 20:17 +0200, Tomasz CEDRO wrote:
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > [...old stuff...]
> > > > > I have verified on uath device (more on that below) and it
> > > > > turns
> > > > > out
> > > > > $cdev works fine.. but it returns /dev/usb/X.Y.Z not the
> > > > > /dev/cuaU0
> > > > > which does not work with this "gobi_loader" utility which
> > > > > requires
> > > > > /dev/cuaU0 (CDC / serial port device)... any clues how to
> > > > > replace
> > > > > $cdev with cuaUX? :-)
> > > > > 
> > > > > Regarding the UATH, I have TP-LINK TL-WN822N Ver2.0 based on
> > > > > Atheros
> > > > > 9002[1] and it seems to work with modified
> > > > > /dev/devd/uath.conf
> > > > > but
> > > > > the
> > > > > uathload returns "Operation not permitted" when executed as
> > > > > root
> > > > > and
> > > > > during boot..
> > > > > 
> > > > > [1] https://wikidevi.com/wiki/TP-LINK_TL-WN822N_v2
> > > > > 
> > > > Hmmm.  I think we need to key off the tty 'attach' event
> > > > instead of
> > > > the
> > > > devfs 'create' event.  The tty attach for a usb device is the
> > > > one
> > > > event
> > > > that has all the info we need in one message.  This is assuming
> > > > the
> > > > device name in dmesg on attach is u3g0 or u3g1 or whatever.
> > > > 
> > > > attach 100 {
> > > > device-name "(u3g)[0-9]+";
> > > > match "vendor"  "0x04da";
> > > > match "product" "0x250e";
> > > > action "/usr/local/bin/gobi_loader /dev/cua$ttyname
> > > > /boot/firmware/gobi/";
> > > > };
> > > > 
> > > > The way I arrived at this conclusion was to first look in the
> > > > devd
> > > > source to figure out/remind myself that devd creates variables
> > > > from
> > > > all
> > > > the tag=value tuples it finds in the events coming from the
> > > > kernel.
> > > >  Then I connected to devd using netcat so I could watch the
> > > > events
> > > > as
> > > > they happen:
> > > > 
> > > >   nc -U /var/run/devd.pipe
> > > > 
> > > > then I plugged in a usb-serial adapter (I have no u3g stuff),
> > > > which
> > > > creates a whole lot of events.  The last one was the tty
> > > > attach:
> > > > 
> > > > +uplcom0 at bus=1 hubaddr=1 port=1 devaddr=2 interface=0
> > > > ugen=ugen1.2
> > > > vendor=0x067b product=0x2303 devclass=0x00 devsubclass=0x00
> > > > devproto=0x00 sernum="" release=0x0300 mode=host intclass=0xff
> > > > intsubclass=0x00 intprotocol=0x00 ttyname=U0 ttyports=1 on
> > > > uhub1
> > > > 
> > > > The '+' means it's an attach, the "device-name" variable is set
> > > > from
> > > > the space-delimited word after the +, and then vars are created
> > > > from
> > > > all the tag=value tuples between 'at' and 'on'.  So that gives
> > > > us
> > > > the
> > > > info to match product and vendor, and ttyname is the suffix to
> > > > append
> > > > to /dev/cua to make the cdev name.
> > > > 
> > > > -- Ian
> > > Awsome! That works!! Thank you Ian!! Thank you for pointing out
> > > how
> > > that was achieved! :-)
> > > 
> > > Is there any way to echo something out to the console to notify
> > > user
> > > that firmware is being updated? This takes some time and it would
> > > be
> > > nice to see something happens in the background.. I cannot see
> > > anything with action "logging blah"; maybe no need for that?
> > > 
> > I think you can use logger(1) in the action, like:
> > 
> >   action "logger -p kern.crit Loading firmware to cua$ttyname ;
> > /usr/local/bin/gobi_loader etc etc"
> > 
> > The 'kern.crit' should be a high enough priority to ensure it comes
> > out
> > on the console, but it depends on syslog.conf of course.  If
> > gobi_loader outputs a nice message it could be piped to logger(1)
> > instead of putting the message in the command.
> > 
> > -- Ian
> Logger works with syslog which is loaded after modules and firmware,
> this is why I could not see the message.. but additional action with
> /bin/echo seems to do the job :-)
> 
> Thank you guys! You are the best! FreeBSD ROX!!! =)
> 
> https://github.com/freebsd/freebsd/pull/115
> 

echo probably won't work when devices attach after rc scripts are done.
 Try "logger -s", that sends the output to syslog and stderr, it might
cover both situations.

-- Ian
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to 

Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-10-01 Thread Tomasz CEDRO
On Sun, Oct 1, 2017 at 10:59 PM, Ian Lepore  wrote:
> On Sun, 2017-10-01 at 22:20 +0200, Tomasz CEDRO wrote:
>> On Sun, Oct 1, 2017 at 9:38 PM, Ian Lepore  wrote:
>> >
>> > On Sun, 2017-10-01 at 20:59 +0200, Tomasz CEDRO wrote:
>> > >
>> > > On Sun, Oct 1, 2017 at 8:23 PM, Ian Lepore 
>> > > wrote:
>> > > >
>> > > >
>> > > > On Sun, 2017-10-01 at 20:17 +0200, Tomasz CEDRO wrote:
>> > > > >
>> > > > >
>> > > > > [...old stuff...]
>> > > I have verified on uath device (more on that below) and it turns
>> > > out
>> > > $cdev works fine.. but it returns /dev/usb/X.Y.Z not the
>> > > /dev/cuaU0
>> > > which does not work with this "gobi_loader" utility which
>> > > requires
>> > > /dev/cuaU0 (CDC / serial port device)... any clues how to replace
>> > > $cdev with cuaUX? :-)
>> > >
>> > > Regarding the UATH, I have TP-LINK TL-WN822N Ver2.0 based on
>> > > Atheros
>> > > 9002[1] and it seems to work with modified /dev/devd/uath.conf
>> > > but
>> > > the
>> > > uathload returns "Operation not permitted" when executed as root
>> > > and
>> > > during boot..
>> > >
>> > > [1] https://wikidevi.com/wiki/TP-LINK_TL-WN822N_v2
>> > >
>> > Hmmm.  I think we need to key off the tty 'attach' event instead of
>> > the
>> > devfs 'create' event.  The tty attach for a usb device is the one
>> > event
>> > that has all the info we need in one message.  This is assuming the
>> > device name in dmesg on attach is u3g0 or u3g1 or whatever.
>> >
>> > attach 100 {
>> > device-name "(u3g)[0-9]+";
>> > match "vendor"  "0x04da";
>> > match "product" "0x250e";
>> > action "/usr/local/bin/gobi_loader /dev/cua$ttyname
>> > /boot/firmware/gobi/";
>> > };
>> >
>> > The way I arrived at this conclusion was to first look in the devd
>> > source to figure out/remind myself that devd creates variables from
>> > all
>> > the tag=value tuples it finds in the events coming from the kernel.
>> >  Then I connected to devd using netcat so I could watch the events
>> > as
>> > they happen:
>> >
>> >   nc -U /var/run/devd.pipe
>> >
>> > then I plugged in a usb-serial adapter (I have no u3g stuff), which
>> > creates a whole lot of events.  The last one was the tty attach:
>> >
>> > +uplcom0 at bus=1 hubaddr=1 port=1 devaddr=2 interface=0
>> > ugen=ugen1.2
>> > vendor=0x067b product=0x2303 devclass=0x00 devsubclass=0x00
>> > devproto=0x00 sernum="" release=0x0300 mode=host intclass=0xff
>> > intsubclass=0x00 intprotocol=0x00 ttyname=U0 ttyports=1 on uhub1
>> >
>> > The '+' means it's an attach, the "device-name" variable is set
>> > from
>> > the space-delimited word after the +, and then vars are created
>> > from
>> > all the tag=value tuples between 'at' and 'on'.  So that gives us
>> > the
>> > info to match product and vendor, and ttyname is the suffix to
>> > append
>> > to /dev/cua to make the cdev name.
>> >
>> > -- Ian
>> Awsome! That works!! Thank you Ian!! Thank you for pointing out how
>> that was achieved! :-)
>>
>> Is there any way to echo something out to the console to notify user
>> that firmware is being updated? This takes some time and it would be
>> nice to see something happens in the background.. I cannot see
>> anything with action "logging blah"; maybe no need for that?
>>
>
> I think you can use logger(1) in the action, like:
>
>   action "logger -p kern.crit Loading firmware to cua$ttyname ;
> /usr/local/bin/gobi_loader etc etc"
>
> The 'kern.crit' should be a high enough priority to ensure it comes out
> on the console, but it depends on syslog.conf of course.  If
> gobi_loader outputs a nice message it could be piped to logger(1)
> instead of putting the message in the command.
>
> -- Ian

Logger works with syslog which is loaded after modules and firmware,
this is why I could not see the message.. but additional action with
/bin/echo seems to do the job :-)

Thank you guys! You are the best! FreeBSD ROX!!! =)

https://github.com/freebsd/freebsd/pull/115

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-10-01 Thread Ian Lepore
On Sun, 2017-10-01 at 22:20 +0200, Tomasz CEDRO wrote:
> On Sun, Oct 1, 2017 at 9:38 PM, Ian Lepore  wrote:
> > 
> > On Sun, 2017-10-01 at 20:59 +0200, Tomasz CEDRO wrote:
> > > 
> > > On Sun, Oct 1, 2017 at 8:23 PM, Ian Lepore 
> > > wrote:
> > > > 
> > > > 
> > > > On Sun, 2017-10-01 at 20:17 +0200, Tomasz CEDRO wrote:
> > > > > 
> > > > > 
> > > > > [...old stuff...]
> > > I have verified on uath device (more on that below) and it turns
> > > out
> > > $cdev works fine.. but it returns /dev/usb/X.Y.Z not the
> > > /dev/cuaU0
> > > which does not work with this "gobi_loader" utility which
> > > requires
> > > /dev/cuaU0 (CDC / serial port device)... any clues how to replace
> > > $cdev with cuaUX? :-)
> > > 
> > > Regarding the UATH, I have TP-LINK TL-WN822N Ver2.0 based on
> > > Atheros
> > > 9002[1] and it seems to work with modified /dev/devd/uath.conf
> > > but
> > > the
> > > uathload returns "Operation not permitted" when executed as root
> > > and
> > > during boot..
> > > 
> > > [1] https://wikidevi.com/wiki/TP-LINK_TL-WN822N_v2
> > > 
> > Hmmm.  I think we need to key off the tty 'attach' event instead of
> > the
> > devfs 'create' event.  The tty attach for a usb device is the one
> > event
> > that has all the info we need in one message.  This is assuming the
> > device name in dmesg on attach is u3g0 or u3g1 or whatever.
> > 
> > attach 100 {
> > device-name "(u3g)[0-9]+";
> > match "vendor"  "0x04da";
> > match "product" "0x250e";
> > action "/usr/local/bin/gobi_loader /dev/cua$ttyname
> > /boot/firmware/gobi/";
> > };
> > 
> > The way I arrived at this conclusion was to first look in the devd
> > source to figure out/remind myself that devd creates variables from
> > all
> > the tag=value tuples it finds in the events coming from the kernel.
> >  Then I connected to devd using netcat so I could watch the events
> > as
> > they happen:
> > 
> >   nc -U /var/run/devd.pipe
> > 
> > then I plugged in a usb-serial adapter (I have no u3g stuff), which
> > creates a whole lot of events.  The last one was the tty attach:
> > 
> > +uplcom0 at bus=1 hubaddr=1 port=1 devaddr=2 interface=0
> > ugen=ugen1.2
> > vendor=0x067b product=0x2303 devclass=0x00 devsubclass=0x00
> > devproto=0x00 sernum="" release=0x0300 mode=host intclass=0xff
> > intsubclass=0x00 intprotocol=0x00 ttyname=U0 ttyports=1 on uhub1
> > 
> > The '+' means it's an attach, the "device-name" variable is set
> > from
> > the space-delimited word after the +, and then vars are created
> > from
> > all the tag=value tuples between 'at' and 'on'.  So that gives us
> > the
> > info to match product and vendor, and ttyname is the suffix to
> > append
> > to /dev/cua to make the cdev name.
> > 
> > -- Ian
> Awsome! That works!! Thank you Ian!! Thank you for pointing out how
> that was achieved! :-)
> 
> Is there any way to echo something out to the console to notify user
> that firmware is being updated? This takes some time and it would be
> nice to see something happens in the background.. I cannot see
> anything with action "logging blah"; maybe no need for that?
> 

I think you can use logger(1) in the action, like:

  action "logger -p kern.crit Loading firmware to cua$ttyname ;
    /usr/local/bin/gobi_loader etc etc"

The 'kern.crit' should be a high enough priority to ensure it comes out
on the console, but it depends on syslog.conf of course.  If
gobi_loader outputs a nice message it could be piped to logger(1)
instead of putting the message in the command.

-- Ian

___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-10-01 Thread Tomasz CEDRO
On Sun, Oct 1, 2017 at 9:38 PM, Ian Lepore  wrote:
> On Sun, 2017-10-01 at 20:59 +0200, Tomasz CEDRO wrote:
>> On Sun, Oct 1, 2017 at 8:23 PM, Ian Lepore  wrote:
>> >
>> > On Sun, 2017-10-01 at 20:17 +0200, Tomasz CEDRO wrote:
>> > >
>> > > [...old stuff...]
>> I have verified on uath device (more on that below) and it turns out
>> $cdev works fine.. but it returns /dev/usb/X.Y.Z not the /dev/cuaU0
>> which does not work with this "gobi_loader" utility which requires
>> /dev/cuaU0 (CDC / serial port device)... any clues how to replace
>> $cdev with cuaUX? :-)
>>
>> Regarding the UATH, I have TP-LINK TL-WN822N Ver2.0 based on Atheros
>> 9002[1] and it seems to work with modified /dev/devd/uath.conf but
>> the
>> uathload returns "Operation not permitted" when executed as root and
>> during boot..
>>
>> [1] https://wikidevi.com/wiki/TP-LINK_TL-WN822N_v2
>>
>
> Hmmm.  I think we need to key off the tty 'attach' event instead of the
> devfs 'create' event.  The tty attach for a usb device is the one event
> that has all the info we need in one message.  This is assuming the
> device name in dmesg on attach is u3g0 or u3g1 or whatever.
>
> attach 100 {
> device-name "(u3g)[0-9]+";
> match "vendor"  "0x04da";
> match "product" "0x250e";
> action "/usr/local/bin/gobi_loader /dev/cua$ttyname 
> /boot/firmware/gobi/";
> };
>
> The way I arrived at this conclusion was to first look in the devd
> source to figure out/remind myself that devd creates variables from all
> the tag=value tuples it finds in the events coming from the kernel.
>  Then I connected to devd using netcat so I could watch the events as
> they happen:
>
>   nc -U /var/run/devd.pipe
>
> then I plugged in a usb-serial adapter (I have no u3g stuff), which
> creates a whole lot of events.  The last one was the tty attach:
>
> +uplcom0 at bus=1 hubaddr=1 port=1 devaddr=2 interface=0 ugen=ugen1.2
> vendor=0x067b product=0x2303 devclass=0x00 devsubclass=0x00
> devproto=0x00 sernum="" release=0x0300 mode=host intclass=0xff
> intsubclass=0x00 intprotocol=0x00 ttyname=U0 ttyports=1 on uhub1
>
> The '+' means it's an attach, the "device-name" variable is set from
> the space-delimited word after the +, and then vars are created from
> all the tag=value tuples between 'at' and 'on'.  So that gives us the
> info to match product and vendor, and ttyname is the suffix to append
> to /dev/cua to make the cdev name.
>
> -- Ian

Awsome! That works!! Thank you Ian!! Thank you for pointing out how
that was achieved! :-)

Is there any way to echo something out to the console to notify user
that firmware is being updated? This takes some time and it would be
nice to see something happens in the background.. I cannot see
anything with action "logging blah"; maybe no need for that?

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-10-01 Thread Ian Lepore
On Sun, 2017-10-01 at 20:59 +0200, Tomasz CEDRO wrote:
> On Sun, Oct 1, 2017 at 8:23 PM, Ian Lepore  wrote:
> > 
> > On Sun, 2017-10-01 at 20:17 +0200, Tomasz CEDRO wrote:
> > > 
> > > [...old stuff...]
> I have verified on uath device (more on that below) and it turns out
> $cdev works fine.. but it returns /dev/usb/X.Y.Z not the /dev/cuaU0
> which does not work with this "gobi_loader" utility which requires
> /dev/cuaU0 (CDC / serial port device)... any clues how to replace
> $cdev with cuaUX? :-)
> 
> Regarding the UATH, I have TP-LINK TL-WN822N Ver2.0 based on Atheros
> 9002[1] and it seems to work with modified /dev/devd/uath.conf but
> the
> uathload returns "Operation not permitted" when executed as root and
> during boot..
> 
> [1] https://wikidevi.com/wiki/TP-LINK_TL-WN822N_v2
> 

Hmmm.  I think we need to key off the tty 'attach' event instead of the
devfs 'create' event.  The tty attach for a usb device is the one event
that has all the info we need in one message.  This is assuming the
device name in dmesg on attach is u3g0 or u3g1 or whatever.

attach 100 {
device-name "(u3g)[0-9]+";
match "vendor"  "0x04da";
match "product" "0x250e";
action "/usr/local/bin/gobi_loader /dev/cua$ttyname 
/boot/firmware/gobi/";
};

The way I arrived at this conclusion was to first look in the devd
source to figure out/remind myself that devd creates variables from all
the tag=value tuples it finds in the events coming from the kernel.
 Then I connected to devd using netcat so I could watch the events as
they happen:

  nc -U /var/run/devd.pipe

then I plugged in a usb-serial adapter (I have no u3g stuff), which
creates a whole lot of events.  The last one was the tty attach:

+uplcom0 at bus=1 hubaddr=1 port=1 devaddr=2 interface=0 ugen=ugen1.2
vendor=0x067b product=0x2303 devclass=0x00 devsubclass=0x00
devproto=0x00 sernum="" release=0x0300 mode=host intclass=0xff
intsubclass=0x00 intprotocol=0x00 ttyname=U0 ttyports=1 on uhub1

The '+' means it's an attach, the "device-name" variable is set from
the space-delimited word after the +, and then vars are created from
all the tag=value tuples between 'at' and 'on'.  So that gives us the
info to match product and vendor, and ttyname is the suffix to append
to /dev/cua to make the cdev name.

-- Ian
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-10-01 Thread Tomasz CEDRO
On Sun, Oct 1, 2017 at 8:23 PM, Ian Lepore  wrote:
> On Sun, 2017-10-01 at 20:17 +0200, Tomasz CEDRO wrote:
>> On Sun, Oct 1, 2017 at 7:21 PM, Hans Petter Selasky 
>> wrote:
>> >
>> > On 10/01/17 19:09, Tomasz CEDRO wrote:
>> > >
>> > >
>> > > On Sun, Oct 1, 2017 at 6:40 PM, Ian Lepore 
>> > > wrote:
>> > > >
>> > > >
>> > > > On Sun, 2017-10-01 at 18:33 +0200, Tomasz CEDRO wrote:
>> > > > >
>> > > > >
>> > > > > On Wed, Sep 27, 2017 at 8:32 AM, Hans Petter Selasky > > > > > asky.org
>> > > > > >
>> > > > > >
>> > > > > > wrote:
>> > > > > >
>> > > > > > On 09/27/17 00:37, Ian Lepore wrote:
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > On Wed, 2017-09-27 at 00:30 +0200, Hans Petter Selasky
>> > > > > > > wrote:
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > On 09/27/17 00:11, Tomasz CEDRO wrote:
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > https://github.com/freebsd/freebsd/pull/115
>> > > > > > > > >
>> > > > > > > > > :-)
>> > > > > > > > >
>> > > > > > > > The devd.conf rule should match more than just vendor
>> > > > > > > > and
>> > > > > > > > product:
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > +# Load GOBI 2000/3000 U3G QDL modem firmware on attach
>> > > > > > > > / boot.
>> > > > > > > > +# Note: This requires additional "gobi_loader" utility
>> > > > > > > > to be
>> > > > > > > > installed,
>> > > > > > > > +#   as well as valid QDL driver firmware files placed
>> > > > > > > > in
>> > > > > > > > /boot/firmware/gobi.
>> > > > > > > > +#   If modem does not accept valid firmware try
>> > > > > > > > gobi_loader
>> > > > > > > > -2000
>> > > > > > > > switch.
>> > > > > > > > +#   Please adjust modem VID/PID to match your device
>> > > > > > > > supported
>> > > > > > > > by
>> > > > > > > > u3g
>> > > > > > > > module.
>> > > > > > > > +#attach 100 {
>> > > > > > > > +#  match "vendor" "0x04da";
>> > > > > > > > +#  match "product" "0x250e";
>> > > > > > > > +#  action "/usr/local/sbin/gobi_loader /dev/cuaU0
>> > > > > > > > /boot/firmware/gobi/";
>> > > > > > > > +#};
>> > > > > > > >
>> > > > > > > > Else patch looks good.
>> > > > > > > >
>> > > > > > > > --HPS
>> > > > > > >
>> > > > > > > Hard-coding /dev/cuaU0 cannot possibly be right.
>> > > > > > >
>> > > > > > > -- Ian
>> > > > > > >
>> > > > > > These three lines are missing:
>> > > > > >
>> > > > > >  match "system"  "DEVFS";
>> > > > > >  match "subsystem"   "CDEV";
>> > > > > >  match "type""CREATE";
>> > > > > >
>> > > > > >
>> > > > > > --HPS
>> > > > > Thanks! Updated! :-)
>> > > > >
>> > > > > https://github.com/freebsd/freebsd/pull/115
>> > > > >
>> > > > If this is to be an example, it should be correct.  Please
>> > > > replace the
>> > > > "cuaU0" with "$cdev".  (See /etc/devd/uath.conf for an
>> > > > example).
>> > > >
>> > > > -- Ian
>> > >
>> > > Thanks Ian! Is it okay now? I have moved this example to
>> > > dedicated
>> > > /etc/devd/u3g.conf file, and added u3g load to
>> > > /etc/devd/usb.conf.. if
>> > > syntax is okay I will verify on my laptop..
>> > >
>> > > https://github.com/freebsd/freebsd/pull/115
>> > >
>> > Looks good to me. Don't forget to MFC!
>> >
>> > --HPS
>> /etc/devd/u3g.conf:
>>
>> notify 100 {
>>  match "system" "USB";
>>  match "subsystem" "DEVICE";
>>  match "type" "ATTACH";
>>  match "vendor" "0x04da";
>>  match "product" "0x250e";
>>  action "/usr/local/bin/gobi_loader /dev/$cdev /boot/firmware/gobi/";
>> };
>>
>> This does not work when /dev/$cdev is used.. but it works when
>> /dev/cuaU0 is used. Ian, could you please advise? :-)
>>
>
> Hmmm, then I'd have to surmise that everything in /etc/devd/uath.conf
> will fail the same way.
>
> I noticed earlier the events mentioned were
>
>  match "system"  "DEVFS";
>  match "subsystem"   "CDEV";
>  match "type""CREATE";
>
> and I would expect $cdev to have the right value on a CDEV/CREATE
> event, but not necessarily on a DEVICE/ATTACH event.
>
> -- Ian

I have verified on uath device (more on that below) and it turns out
$cdev works fine.. but it returns /dev/usb/X.Y.Z not the /dev/cuaU0
which does not work with this "gobi_loader" utility which requires
/dev/cuaU0 (CDC / serial port device)... any clues how to replace
$cdev with cuaUX? :-)

Regarding the UATH, I have TP-LINK TL-WN822N Ver2.0 based on Atheros
9002[1] and it seems to work with modified /dev/devd/uath.conf but the
uathload returns "Operation not permitted" when executed as root and
during boot..

[1] https://wikidevi.com/wiki/TP-LINK_TL-WN822N_v2

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to 

Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-10-01 Thread Ian Lepore
On Sun, 2017-10-01 at 20:17 +0200, Tomasz CEDRO wrote:
> On Sun, Oct 1, 2017 at 7:21 PM, Hans Petter Selasky 
> wrote:
> > 
> > On 10/01/17 19:09, Tomasz CEDRO wrote:
> > > 
> > > 
> > > On Sun, Oct 1, 2017 at 6:40 PM, Ian Lepore 
> > > wrote:
> > > > 
> > > > 
> > > > On Sun, 2017-10-01 at 18:33 +0200, Tomasz CEDRO wrote:
> > > > > 
> > > > > 
> > > > > On Wed, Sep 27, 2017 at 8:32 AM, Hans Petter Selasky  > > > > asky.org
> > > > > > 
> > > > > > 
> > > > > > wrote:
> > > > > > 
> > > > > > On 09/27/17 00:37, Ian Lepore wrote:
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > On Wed, 2017-09-27 at 00:30 +0200, Hans Petter Selasky
> > > > > > > wrote:
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > On 09/27/17 00:11, Tomasz CEDRO wrote:
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > https://github.com/freebsd/freebsd/pull/115
> > > > > > > > > 
> > > > > > > > > :-)
> > > > > > > > > 
> > > > > > > > The devd.conf rule should match more than just vendor
> > > > > > > > and
> > > > > > > > product:
> > > > > > > > 
> > > > > > > > 
> > > > > > > > +# Load GOBI 2000/3000 U3G QDL modem firmware on attach
> > > > > > > > / boot.
> > > > > > > > +# Note: This requires additional "gobi_loader" utility
> > > > > > > > to be
> > > > > > > > installed,
> > > > > > > > +#   as well as valid QDL driver firmware files placed
> > > > > > > > in
> > > > > > > > /boot/firmware/gobi.
> > > > > > > > +#   If modem does not accept valid firmware try
> > > > > > > > gobi_loader
> > > > > > > > -2000
> > > > > > > > switch.
> > > > > > > > +#   Please adjust modem VID/PID to match your device
> > > > > > > > supported
> > > > > > > > by
> > > > > > > > u3g
> > > > > > > > module.
> > > > > > > > +#attach 100 {
> > > > > > > > +#  match "vendor" "0x04da";
> > > > > > > > +#  match "product" "0x250e";
> > > > > > > > +#  action "/usr/local/sbin/gobi_loader /dev/cuaU0
> > > > > > > > /boot/firmware/gobi/";
> > > > > > > > +#};
> > > > > > > > 
> > > > > > > > Else patch looks good.
> > > > > > > > 
> > > > > > > > --HPS
> > > > > > > 
> > > > > > > Hard-coding /dev/cuaU0 cannot possibly be right.
> > > > > > > 
> > > > > > > -- Ian
> > > > > > > 
> > > > > > These three lines are missing:
> > > > > > 
> > > > > >  match "system"  "DEVFS";
> > > > > >  match "subsystem"   "CDEV";
> > > > > >  match "type""CREATE";
> > > > > > 
> > > > > > 
> > > > > > --HPS
> > > > > Thanks! Updated! :-)
> > > > > 
> > > > > https://github.com/freebsd/freebsd/pull/115
> > > > > 
> > > > If this is to be an example, it should be correct.  Please
> > > > replace the
> > > > "cuaU0" with "$cdev".  (See /etc/devd/uath.conf for an
> > > > example).
> > > > 
> > > > -- Ian
> > > 
> > > Thanks Ian! Is it okay now? I have moved this example to
> > > dedicated
> > > /etc/devd/u3g.conf file, and added u3g load to
> > > /etc/devd/usb.conf.. if
> > > syntax is okay I will verify on my laptop..
> > > 
> > > https://github.com/freebsd/freebsd/pull/115
> > > 
> > Looks good to me. Don't forget to MFC!
> > 
> > --HPS
> /etc/devd/u3g.conf:
> 
> notify 100 {
>  match "system" "USB";
>  match "subsystem" "DEVICE";
>  match "type" "ATTACH";
>  match "vendor" "0x04da";
>  match "product" "0x250e";
>  action "/usr/local/bin/gobi_loader /dev/$cdev /boot/firmware/gobi/";
> };
> 
> This does not work when /dev/$cdev is used.. but it works when
> /dev/cuaU0 is used. Ian, could you please advise? :-)
> 

Hmmm, then I'd have to surmise that everything in /etc/devd/uath.conf
will fail the same way.

I noticed earlier the events mentioned were

         match "system"  "DEVFS";
         match "subsystem"   "CDEV";
         match "type""CREATE";

and I would expect $cdev to have the right value on a CDEV/CREATE
event, but not necessarily on a DEVICE/ATTACH event.

-- Ian
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-10-01 Thread Tomasz CEDRO
On Sun, Oct 1, 2017 at 7:21 PM, Hans Petter Selasky  wrote:
> On 10/01/17 19:09, Tomasz CEDRO wrote:
>>
>> On Sun, Oct 1, 2017 at 6:40 PM, Ian Lepore  wrote:
>>>
>>> On Sun, 2017-10-01 at 18:33 +0200, Tomasz CEDRO wrote:

 On Wed, Sep 27, 2017 at 8:32 AM, Hans Petter Selasky 
> wrote:
>
> On 09/27/17 00:37, Ian Lepore wrote:
>>
>>
>>
>> On Wed, 2017-09-27 at 00:30 +0200, Hans Petter Selasky wrote:
>>>
>>>
>>>
>>> On 09/27/17 00:11, Tomasz CEDRO wrote:




 https://github.com/freebsd/freebsd/pull/115

 :-)

>>> The devd.conf rule should match more than just vendor and
>>> product:
>>>
>>>
>>> +# Load GOBI 2000/3000 U3G QDL modem firmware on attach / boot.
>>> +# Note: This requires additional "gobi_loader" utility to be
>>> installed,
>>> +#   as well as valid QDL driver firmware files placed in
>>> /boot/firmware/gobi.
>>> +#   If modem does not accept valid firmware try gobi_loader
>>> -2000
>>> switch.
>>> +#   Please adjust modem VID/PID to match your device supported
>>> by
>>> u3g
>>> module.
>>> +#attach 100 {
>>> +#  match "vendor" "0x04da";
>>> +#  match "product" "0x250e";
>>> +#  action "/usr/local/sbin/gobi_loader /dev/cuaU0
>>> /boot/firmware/gobi/";
>>> +#};
>>>
>>> Else patch looks good.
>>>
>>> --HPS
>>
>>
>> Hard-coding /dev/cuaU0 cannot possibly be right.
>>
>> -- Ian
>>
> These three lines are missing:
>
>  match "system"  "DEVFS";
>  match "subsystem"   "CDEV";
>  match "type""CREATE";
>
>
> --HPS

 Thanks! Updated! :-)

 https://github.com/freebsd/freebsd/pull/115

>>>
>>> If this is to be an example, it should be correct.  Please replace the
>>> "cuaU0" with "$cdev".  (See /etc/devd/uath.conf for an example).
>>>
>>> -- Ian
>>
>>
>> Thanks Ian! Is it okay now? I have moved this example to dedicated
>> /etc/devd/u3g.conf file, and added u3g load to /etc/devd/usb.conf.. if
>> syntax is okay I will verify on my laptop..
>>
>> https://github.com/freebsd/freebsd/pull/115
>>
>
> Looks good to me. Don't forget to MFC!
>
> --HPS

/etc/devd/u3g.conf:

notify 100 {
 match "system" "USB";
 match "subsystem" "DEVICE";
 match "type" "ATTACH";
 match "vendor" "0x04da";
 match "product" "0x250e";
 action "/usr/local/bin/gobi_loader /dev/$cdev /boot/firmware/gobi/";
};

This does not work when /dev/$cdev is used.. but it works when
/dev/cuaU0 is used. Ian, could you please advise? :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-10-01 Thread Hans Petter Selasky

On 10/01/17 19:09, Tomasz CEDRO wrote:

On Sun, Oct 1, 2017 at 6:40 PM, Ian Lepore  wrote:

On Sun, 2017-10-01 at 18:33 +0200, Tomasz CEDRO wrote:

On Wed, Sep 27, 2017 at 8:32 AM, Hans Petter Selasky 

Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-10-01 Thread Tomasz CEDRO
On Sun, Oct 1, 2017 at 6:40 PM, Ian Lepore  wrote:
> On Sun, 2017-10-01 at 18:33 +0200, Tomasz CEDRO wrote:
>> On Wed, Sep 27, 2017 at 8:32 AM, Hans Petter Selasky > > wrote:
>> >
>> > On 09/27/17 00:37, Ian Lepore wrote:
>> > >
>> > >
>> > > On Wed, 2017-09-27 at 00:30 +0200, Hans Petter Selasky wrote:
>> > > >
>> > > >
>> > > > On 09/27/17 00:11, Tomasz CEDRO wrote:
>> > > > >
>> > > > >
>> > > > >
>> > > > > https://github.com/freebsd/freebsd/pull/115
>> > > > >
>> > > > > :-)
>> > > > >
>> > > > The devd.conf rule should match more than just vendor and
>> > > > product:
>> > > >
>> > > >
>> > > > +# Load GOBI 2000/3000 U3G QDL modem firmware on attach / boot.
>> > > > +# Note: This requires additional "gobi_loader" utility to be
>> > > > installed,
>> > > > +#   as well as valid QDL driver firmware files placed in
>> > > > /boot/firmware/gobi.
>> > > > +#   If modem does not accept valid firmware try gobi_loader
>> > > > -2000
>> > > > switch.
>> > > > +#   Please adjust modem VID/PID to match your device supported
>> > > > by
>> > > > u3g
>> > > > module.
>> > > > +#attach 100 {
>> > > > +#  match "vendor" "0x04da";
>> > > > +#  match "product" "0x250e";
>> > > > +#  action "/usr/local/sbin/gobi_loader /dev/cuaU0
>> > > > /boot/firmware/gobi/";
>> > > > +#};
>> > > >
>> > > > Else patch looks good.
>> > > >
>> > > > --HPS
>> > >
>> > > Hard-coding /dev/cuaU0 cannot possibly be right.
>> > >
>> > > -- Ian
>> > >
>> > These three lines are missing:
>> >
>> > match "system"  "DEVFS";
>> > match "subsystem"   "CDEV";
>> > match "type""CREATE";
>> >
>> >
>> > --HPS
>> Thanks! Updated! :-)
>>
>> https://github.com/freebsd/freebsd/pull/115
>>
>
> If this is to be an example, it should be correct.  Please replace the
> "cuaU0" with "$cdev".  (See /etc/devd/uath.conf for an example).
>
> -- Ian

Thanks Ian! Is it okay now? I have moved this example to dedicated
/etc/devd/u3g.conf file, and added u3g load to /etc/devd/usb.conf.. if
syntax is okay I will verify on my laptop..

https://github.com/freebsd/freebsd/pull/115

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-10-01 Thread Ian Lepore
On Sun, 2017-10-01 at 18:33 +0200, Tomasz CEDRO wrote:
> On Wed, Sep 27, 2017 at 8:32 AM, Hans Petter Selasky  > wrote:
> > 
> > On 09/27/17 00:37, Ian Lepore wrote:
> > > 
> > > 
> > > On Wed, 2017-09-27 at 00:30 +0200, Hans Petter Selasky wrote:
> > > > 
> > > > 
> > > > On 09/27/17 00:11, Tomasz CEDRO wrote:
> > > > > 
> > > > > 
> > > > > 
> > > > > https://github.com/freebsd/freebsd/pull/115
> > > > > 
> > > > > :-)
> > > > > 
> > > > The devd.conf rule should match more than just vendor and
> > > > product:
> > > > 
> > > > 
> > > > +# Load GOBI 2000/3000 U3G QDL modem firmware on attach / boot.
> > > > +# Note: This requires additional "gobi_loader" utility to be
> > > > installed,
> > > > +#   as well as valid QDL driver firmware files placed in
> > > > /boot/firmware/gobi.
> > > > +#   If modem does not accept valid firmware try gobi_loader
> > > > -2000
> > > > switch.
> > > > +#   Please adjust modem VID/PID to match your device supported
> > > > by
> > > > u3g
> > > > module.
> > > > +#attach 100 {
> > > > +#  match "vendor" "0x04da";
> > > > +#  match "product" "0x250e";
> > > > +#  action "/usr/local/sbin/gobi_loader /dev/cuaU0
> > > > /boot/firmware/gobi/";
> > > > +#};
> > > > 
> > > > Else patch looks good.
> > > > 
> > > > --HPS
> > > 
> > > Hard-coding /dev/cuaU0 cannot possibly be right.
> > > 
> > > -- Ian
> > > 
> > These three lines are missing:
> > 
> > match "system"  "DEVFS";
> > match "subsystem"   "CDEV";
> > match "type""CREATE";
> > 
> > 
> > --HPS
> Thanks! Updated! :-)
> 
> https://github.com/freebsd/freebsd/pull/115
> 

If this is to be an example, it should be correct.  Please replace the
"cuaU0" with "$cdev".  (See /etc/devd/uath.conf for an example).

-- Ian

___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-10-01 Thread Tomasz CEDRO
On Wed, Sep 27, 2017 at 8:32 AM, Hans Petter Selasky  wrote:
> On 09/27/17 00:37, Ian Lepore wrote:
>>
>> On Wed, 2017-09-27 at 00:30 +0200, Hans Petter Selasky wrote:
>>>
>>> On 09/27/17 00:11, Tomasz CEDRO wrote:


 https://github.com/freebsd/freebsd/pull/115

 :-)

>>> The devd.conf rule should match more than just vendor and product:
>>>
>>>
>>> +# Load GOBI 2000/3000 U3G QDL modem firmware on attach / boot.
>>> +# Note: This requires additional "gobi_loader" utility to be
>>> installed,
>>> +#   as well as valid QDL driver firmware files placed in
>>> /boot/firmware/gobi.
>>> +#   If modem does not accept valid firmware try gobi_loader -2000
>>> switch.
>>> +#   Please adjust modem VID/PID to match your device supported by
>>> u3g
>>> module.
>>> +#attach 100 {
>>> +#  match "vendor" "0x04da";
>>> +#  match "product" "0x250e";
>>> +#  action "/usr/local/sbin/gobi_loader /dev/cuaU0
>>> /boot/firmware/gobi/";
>>> +#};
>>>
>>> Else patch looks good.
>>>
>>> --HPS
>>
>>
>> Hard-coding /dev/cuaU0 cannot possibly be right.
>>
>> -- Ian
>>
>
> These three lines are missing:
>
> match "system"  "DEVFS";
> match "subsystem"   "CDEV";
> match "type""CREATE";
>
>
> --HPS

Thanks! Updated! :-)

https://github.com/freebsd/freebsd/pull/115

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-09-27 Thread Hans Petter Selasky

On 09/27/17 00:37, Ian Lepore wrote:

On Wed, 2017-09-27 at 00:30 +0200, Hans Petter Selasky wrote:

On 09/27/17 00:11, Tomasz CEDRO wrote:


https://github.com/freebsd/freebsd/pull/115

:-)


The devd.conf rule should match more than just vendor and product:


+# Load GOBI 2000/3000 U3G QDL modem firmware on attach / boot.
+# Note: This requires additional "gobi_loader" utility to be
installed,
+#   as well as valid QDL driver firmware files placed in
/boot/firmware/gobi.
+#   If modem does not accept valid firmware try gobi_loader -2000
switch.
+#   Please adjust modem VID/PID to match your device supported by
u3g
module.
+#attach 100 {
+#  match "vendor" "0x04da";
+#  match "product" "0x250e";
+#  action "/usr/local/sbin/gobi_loader /dev/cuaU0
/boot/firmware/gobi/";
+#};

Else patch looks good.

--HPS


Hard-coding /dev/cuaU0 cannot possibly be right.

-- Ian



These three lines are missing:

match "system"  "DEVFS";
match "subsystem"   "CDEV";
match "type""CREATE";


--HPS
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-09-26 Thread Tomasz CEDRO
Its all commented out, just an example on how to configure "this kind
of device".. not really mandatory but nice to have I thought :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-09-26 Thread Ian Lepore
On Wed, 2017-09-27 at 00:30 +0200, Hans Petter Selasky wrote:
> On 09/27/17 00:11, Tomasz CEDRO wrote:
> > 
> > https://github.com/freebsd/freebsd/pull/115
> > 
> > :-)
> > 
> The devd.conf rule should match more than just vendor and product:
> 
> 
> +# Load GOBI 2000/3000 U3G QDL modem firmware on attach / boot.
> +# Note: This requires additional "gobi_loader" utility to be
> installed,
> +#   as well as valid QDL driver firmware files placed in 
> /boot/firmware/gobi.
> +#   If modem does not accept valid firmware try gobi_loader -2000
> switch.
> +#   Please adjust modem VID/PID to match your device supported by
> u3g 
> module.
> +#attach 100 {
> +#match "vendor" "0x04da";
> +#match "product" "0x250e";
> +#action "/usr/local/sbin/gobi_loader /dev/cuaU0
> /boot/firmware/gobi/";
> +#};
> 
> Else patch looks good.
> 
> --HPS

Hard-coding /dev/cuaU0 cannot possibly be right.

-- Ian
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-09-26 Thread Hans Petter Selasky

On 09/27/17 00:11, Tomasz CEDRO wrote:

https://github.com/freebsd/freebsd/pull/115

:-)



The devd.conf rule should match more than just vendor and product:


+# Load GOBI 2000/3000 U3G QDL modem firmware on attach / boot.
+# Note: This requires additional "gobi_loader" utility to be installed,
+#   as well as valid QDL driver firmware files placed in 
/boot/firmware/gobi.

+#   If modem does not accept valid firmware try gobi_loader -2000 switch.
+#   Please adjust modem VID/PID to match your device supported by u3g 
module.

+#attach 100 {
+#  match "vendor" "0x04da";
+#  match "product" "0x250e";
+#  action "/usr/local/sbin/gobi_loader /dev/cuaU0 /boot/firmware/gobi/";
+#};

Else patch looks good.

--HPS
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module

2017-09-26 Thread Tomasz CEDRO
https://github.com/freebsd/freebsd/pull/115

:-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"