Re: [9fans] applying a patch on 9front

2023-02-01 Thread Chris Gorman
Hi jimerickso,

I'm a bit of a newbie when it comes to plan9, so you've run into
something I haven't seen yet.  Sorry I can't be of more help.  My
experience was that I couldn't get the system to recognise and
authenticate the wifi so it would connect to the network at boot.  I
modified my plan9.ini with

ether0=type=iwl essid=MYESSID debug=1
wpapsk=WPAPASSWORD

For some reason this failed to authenticate and connect my machine to
my localnet.

I could however run the following once my machine was up and the wifi worked.

bind -a '#l1' /net
echo 'key proto=wpapsk essid=MYESSID !password=WPAPASSWORD' >> /mnt/factotum/ctl
aux/wpa -2p -s MYESSID /net/ether1
ip/ipconfig ether /net/ether1

At any rate we should probably move this to the 9front email list if
we need to discuss it further.

Best regards,

Chris


On Wed, Feb 1, 2023 at 1:55 PM  wrote:
>
> thank you kindly chris gorman! i got the patch to apply and got it to connect 
> at boot. but when it connects rio wont start. when it doesn't connect rio 
> starts. not sure what to do.
> 9fans / 9fans / see discussions + participants + delivery options Permalink

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T7978718c750df254-M589548e2962b93688925892d
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] applying a patch on 9front

2023-02-01 Thread Chris Gorman
HI jimerickso,

To get the patch to apply on my system, I used

cd /sys/src/9/pc
cat $home/etheriwl.c.diff | ape/patch -p5

Then you need to copy iwm-7265-17 from the openbsd firmware blobs and
put it into /lib/firmware, then build your kernel.

This will configure the iwm-7265-17 firmware blob to load with an
ac-7265.  Unfortunately, not all ac-7265's require this particular
blob.  I have another one that requires the iwm-7265D-29.  It also
identifies itself with the same pci id, 0x095a, so there is no way to
differentiate which firmware to load at the moment.  You have to know
what firmware the ac-7265 needs and then code etheriwl.c to suit.

Good luck and I hope you get your wireless working.  I kind of gave up
on mine as I couldn't get it to work at boot, but if you get it
working let me know.

Best regards,

Chris


On Wed, Feb 1, 2023 at 8:05 AM  wrote:
>
> i am trying to patch etheriwl.c on 9front. the patch is available on this 
> list under the topic "modification of etheriwl.c for intel ac 7265". however 
> i can not get the patch to apply. how do i do this? i have tried both 
> 'git/import' and 'ape/patch' to no avail. any help would be appreciated. 
> thanks for your time.
>
> 9fans / 9fans / see discussions + participants + delivery options Permalink

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T7978718c750df254-M6d0484c20d9c05d3f5b17605
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Modification of etheriwl.c for AC 7265 ethernet card

2022-11-25 Thread Chris Gorman
On Fri, Nov 25, 2022 at 9:47 AM  wrote:
>
> Quoth Chris Gorman :
> > Hello All,
> >
> > I needed to add a pci vid/did to etheriwl.c to get my wifi card
> > working.  I'm sending the patch to the mailing list, but if folks know
> > of a better place for this info, let me know and I will re post it.
> > The card I have is an Intel AC-7265 and I am running 9front.
>
> typically, the 9front list is where the 9front
> patches go: 9fr...@9front.org; applied this one,
Sorry for posting to the wrong list.  I will redirect my emails in the
future.  Thanks for applying the patch for me.
>
>
> > Now that I have my card working, I would like to have it connect at
> > boot. I have the following commands to run.
> >
> > bind -a '#l1' /net
> > echo 'key proto=wpapsk essid=ESSID !password=PASSWORD' >> /mnt/factotum/ctl
> > aux/wpa -2p -s ESSID /net/ether1
> > ip/ipconfig ether /net/ether1
> >
> > I was wondering where to put these commands.  Should they go into
> > /bin/termrc or is there a more suitable place?
> >
> > Thanks in advance,
> >
>
> you can put it in plan9.ini, something like:
>
> ether1=type=iwl
> essid=ESSID
> wpapsk=PASSWORD
Thanks, just giving this a go.

Take care,

Chris
> 

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T75cc68ba157fecd6-M96f1148ad8ba905615c44b58
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


[9fans] Modification of etheriwl.c for AC 7265 ethernet card

2022-11-25 Thread Chris Gorman
Hello All,

I needed to add a pci vid/did to etheriwl.c to get my wifi card
working.  I'm sending the patch to the mailing list, but if folks know
of a better place for this info, let me know and I will re post it.
The card I have is an Intel AC-7265 and I am running 9front.

Now that I have my card working, I would like to have it connect at
boot. I have the following commands to run.

bind -a '#l1' /net
echo 'key proto=wpapsk essid=ESSID !password=PASSWORD' >> /mnt/factotum/ctl
aux/wpa -2p -s ESSID /net/ether1
ip/ipconfig ether /net/ether1

I was wondering where to put these commands.  Should they go into
/bin/termrc or is there a more suitable place?

Thanks in advance,

Chris

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T75cc68ba157fecd6-Me43fb15b1e16e7c45ce076dd
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
--- /sys/src/9/pc/etheriwl.c.orig
+++ /sys/src/9/pc/etheriwl.c
@@ -,6 +,7 @@
 			family = 7000;
 			fwname = "iwm-7260-17";
 			break;
+		case 0x95a:	/* Wireless AC 7265 */
 		case 0x95b:	/* Wireless AC 7265 */
 			family = 7000;
 			fwname = "iwm-7265-17";


Re: [9fans] use of plumber for new rule

2022-10-20 Thread Chris Gorman
Hi again Umbraticus,

Sorry for spamming you today.  But I wanted to let you know your
command works and I had made a typo implementing it.
>
> This solution has acme load up the dvi file to edit.  I want to
> display the image rendered by page, but after it has been passed
> through dvips.  So either
>
> plumb start window kertex/dvips $wdir/$0 '|' page
>
> or
>
> plumb start window kertex/dvips $wdir/$0 '|' page -w
>
> or
>
> plumb start window kertex/dvips $wdir/$0 '|' plumb -id image
>
> have this work for me.  The first one opens a small window, rather
> than the full page that is loaded once I have converted the file to a
> postscript file.  This can be adjusted to the full window rendering
> with the use of page -w, but I can see the initial window that dvips
> loaded in the background.  The plumb -id image solution loads up the
> initial window, runs dvips and then resizes the window with the output
> from the repiping.  Not too sure which solution is the ideal one, but
> it's currently working with the pipe to plumb -id.  I'm probably not
> explaining myself well enough.  I ideally want the result from
> running.
>
> kertex/dvips  | page -w
>
> which I think I should get running 'plumb start rc -c 'kertex/dvips
> '$wdir'/'$0' | page -w', but for some reason it doesn't work. :(

The final plumb command became,

data matches '([a-zA-Z¡-�0-9_\-.,/]+)\.(dvi|DVI)'
arg isfile $0
plumb start rc -c 'kertex/dvips -q '$wdir'/'$0' | page -w'

My only addition to what you suggested was to run dvips with -q to
suppress the stdout output.  Thanks for the help today.

Take care,

Chris

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tce7385fe52c532d6-M89d36b357efea549a8b62c02
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] use of plumber for new rule

2022-10-20 Thread Chris Gorman
Hello again Umbraticus,

Thanks for your email.

On Thu, Oct 20, 2022 at 1:01 PM  wrote:
>
> I think you probably want:
>
> plumb start rc -c 'kertex/divps '$wdir'/'$0' | page -w'

This solution has acme load up the dvi file to edit.  I want to
display the image rendered by page, but after it has been passed
through dvips.  So either

plumb start window kertex/dvips $wdir/$0 '|' page

or

plumb start window kertex/dvips $wdir/$0 '|' page -w

or

plumb start window kertex/dvips $wdir/$0 '|' plumb -id image

have this work for me.  The first one opens a small window, rather
than the full page that is loaded once I have converted the file to a
postscript file.  This can be adjusted to the full window rendering
with the use of page -w, but I can see the initial window that dvips
loaded in the background.  The plumb -id image solution loads up the
initial window, runs dvips and then resizes the window with the output
from the repiping.  Not too sure which solution is the ideal one, but
it's currently working with the pipe to plumb -id.  I'm probably not
explaining myself well enough.  I ideally want the result from
running.

kertex/dvips  | page -w

which I think I should get running 'plumb start rc -c 'kertex/dvips
'$wdir'/'$0' | page -w', but for some reason it doesn't work. :(

Best,

Chris

> 
> umbraticus

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tce7385fe52c532d6-Mcd186ac9d272297cc3db913f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] use of plumber for new rule

2022-10-20 Thread Chris Gorman
A small improvement on the last solution to my problem.

> data matches '([a-zA-Z¡-�0-9_\-.,/]+)\.(dvi|DVI)'
> arg isfile $0
> plumb start window kertex/dvips $wdir/$0 '|' page
>
This solution opens a default sized window and I need to resize it to
see the .dvi.  Instead of a pipe to page, I now use a pipe to plumb
-id image.  This makes a full sized window.  The last line becomes

plumb start window kertex/dvips $wdir/$0 '|' plumb -id image

Chris

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tce7385fe52c532d6-Mc29d1e5d7b39cd973f7d33eb
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] use of plumber for new rule

2022-10-20 Thread Chris Gorman
Thank you Umbraticus!

On Thu, Oct 20, 2022 at 4:56 AM  wrote:
>
> Here's my rule for manpages:
>
> data matches (.+)\(([0-9])\)
> arg isfile /sys/man/$2/$1
> plumb start rc -c 'man -t '$2' '$1' | plumb -id image'
>
> which replumbs the cmd output to the image port; then:
>
> dst is image
> plumb to image
> plumb client rc -c 'window -r 380 0 1600 900 ''echo -n page >/dev/label; bind 
> /dev/mordor /dev/label; page -i -p180 -m64'''
>
> either sends it to any existing page instance
> or else starts a new one to send it to.
> Worth noting I am using 9front's version of page,
> which listens on the image port; can't recall if the original
> listens on the postscript port in a similar way: probably.
> If you just want to pop open a new window with
> your dvi each time you can use a plumb start rule
> that does whatever you want; something like:
>
> data matches '([a-zA-Z¡-�0-9_\-.,/]+)\.(dvi|DVI)'
> arg isfile $0
> plumb start window kertex/dvips $0 '|' page
>

This solution works near perfectly for me.  I needed to add a $wdir
before the filename, but otherwise it works!  To be clear, my rule is
now...

data matches '([a-zA-Z¡-�0-9_\-.,/]+)\.(dvi|DVI)'
arg isfile $0
plumb start window kertex/dvips $wdir/$0 '|' page

> There are other workflows too, if what you want is a tight
> loop for editing a document and seeing the new version.
> Some people use a watch(1) program that runs a command
> whenever a given file changes. I prefer to tie the file write
> and doc gen to a single command using (9front) sam's ^ cmd,
> which sends its output to sam's command window:
>
> ^echo w; window troff $% '|' page
>
> The last shell command is remembered, so subsequent
> write'n'reviews are a simple ^ thereafter.

Very nice suggestion.  I will try to put this one in my bag of tricks.

>
> umbraticus

Thank you again.

Take care,

Chris


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tce7385fe52c532d6-M62d39a71195ef5c3462e8b42
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


[9fans] use of plumber for new rule

2022-10-19 Thread Chris Gorman
Hello all,

I am trying to implement a rule that will display dvi files in plumber.  There 
are currently two rules that cover dvi files.  Neither will allow for rendered 
displaying via a mouse 3 click in acme.  This does work for ps and pdf files, 
so I would like to change it to allow for dvi's as well.  My thought is to pass 
this through a pipe from dvips to page.  I have built and installed kertex 
thanks to Thierry Laronde.  In a terminal all I have to call is kertex/dvips 
 | page.  Unfortunately the logic escapes me on how to do this 
properly with the plumber.  

I have the following blocks that pertain to the implementation of pdf / ps 
viewing.

typeis  text
datamatches '[a-zA-Z¡-�0-9_\-.,/]+'
datamatches 
'([a-zA-Z¡-�0-9_\-.,/]+)\.(ps|PS|eps|EPS|pdf|PDF|dvi|DVI|doc|DOC|epub|EPUB|cb[tz]|CB[TZ])'
arg isfile  $0
plumb   to  postscript
plumb   start   page -w $file

typeis  text
datamatches '[a-zA-Z¡-�0-9_\-.,/]+'
datamatches 
'([a-zA-Z¡-�0-9_\-.,/]+)\.(ps|PS|eps|EPS|pdf|PDF|dvi|DVI|doc|DOC|epub|EPUB|cb[tz]|CB[TZ])'
arg isfile  $0
plumb   to  postscript
plumb   start   page -w $file

dst is  image
plumb   to  image
plumb   client  page -wi

dst is  postscript
arg isfile  $data
plumb   start   page -w $data

These were the settings set by the system.  I have hacked around with them, but 
can't seem to get a solution and I am sadly not versed  enough with plumb(6).   
Does anyone have a hint or idea on how I might accomplish my goal?  Reading man 
plumb pages as I await a reply.

Thanks in advance,

Chris Gorman









--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tce7385fe52c532d6-M5f805c1f59ac39c459fe847d
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription