Re: How to request a specific IP address from DHCP server

2021-01-19 Thread Allan Streib
Radek  writes:

> I don't have an access to the DHCP server side. That's the problem and
> I'm trying to find a way to have the same IP address at any time. The
> client is permanently connected to the network.

Can you configure a permanent IP address in the client configuration
(hostname.if file) that is outside the range that DHCP allocates, but
still on the same network?

Allan



Re: How to request a specific IP address from DHCP server

2021-01-19 Thread Radek
> You're using the wrong tool for the job, use an address reservation
> bound to the client MAC on the DHCP server instead.
I don't have an access to the DHCP server side. That's the problem and I'm 
trying to find a way to have the same IP address at any time. The client is 
permanently connected to the network. 

> configuration changes at the server end.
Nobody touches the server end.

On Tue, 19 Jan 2021 21:05:21 +
Peter Kay  wrote:

> On Tue, 19 Jan 2021 at 20:57, Radek  wrote:
> >
> > Hi,
> > I can't manage to request a specific IP address from DHCP server.  It is 
> > just a testing lab, the requiested IP address (.104) isn't used by any 
> > other client. What I'm doing wrong?
> You're using the wrong tool for the job, use an address reservation
> bound to the client MAC on the DHCP server instead.
> 
> Whether or not requesting an address client side works, at any time it
> could fail due to a change in leases allocated to other clients, or
> configuration changes at the server end. If a specific IP is needed,
> use reservations instead.
> 
> PK
> 


-- 
Radek



Re: How to unlock a serial port

2021-01-19 Thread Nick Holland

On 1/19/21 4:35 PM, Adam Thompson wrote:

[Replying directly as well, as I believe my MTA is still blacklisted by
the OpenBSD mail server. Guess we'll find out! -Adam]

On 2021-01-17 20:09, Tilo Stritzky wrote:

On 14/01/21 17:38  Andrew Grillet wrote:

Hi

I am running OpenBSD on a T2000 (Sparc64).
I was trying to use the serial port from the primary domain, connected 
via

ssh, and my network lost the connection.
My tty00 is now locked:
jay# stty -f /dev/tty00
stty: /dev/tty00: Device busy
I do not want to reboot the primary, as the guests are running various 
live

services. I cannot find evidence of a lock file in /dev/spool/lock.
Is there a way out of this predicament?


fstat(1) is your friend here.
Note that each tty has a corresponding cua device, they're both under 
the

same lock.

tilo


I ran into this exact problem last year.  It'll be in the list archives.
According to Theo (if I understood him correctly) it's partly due to the
way BSD serial ports have always worked, i.e. in a rather
under-specified manner.
Apparently the core tty(4) code around this particular symptom hasn't
really changed at all since OpenBSD forked.

My solution was to install Linux, sorry - I never did find a way around
the problem on OpenBSD.


I'm curious what you think "this exact problem" is.  The OP replied to
me (off list) with what the problem was, and I am 99% certain that Linux
would behave the exact same way -- and if it didn't, it would be a bug
in Linux.  Hint: the error message was dead-on accurate.  The port was
busy!

I'm not going to say serial support in OpenBSD is perfect, but it works
Darned Well, and better for me than any other OS I've used.  I've used
and have in production things ranging from 8 port USB connected devices,
single port USB serial interfaces, 20 year old ISA BOCA card and of
course, native on-board serial devices.  The USB devices sometimes need
me to reboot the machine the USB port is attached to, but otherwise, Just
Works.  OpenBSD makes an excellent terminal server (and all the tools are
in base, which really makes it simple -- well, except the boca(4), as it
requires a custom kernel).

Nick.



[OT] SIM cards and "progress" [was Re: 4G mini PCI-e modem support?]

2021-01-19 Thread Stuart Longland

On 12/1/21 6:39 pm, Stuart Henderson wrote:

This combo works fine in the middle miniPCIe slot of the APU. You'll need a
full size SIM card for the SIM card slot.

That's a mini SIM! Full-sized is like a credit card, the early Motorola
GSM phones used them, they slid into the end of the phone.


That's what I used to think too… remember using a phone like that 
(Motorola MicroTAC… micro compared to other phones of its era, nothing 
micro about it today).


I seem to recall the Ericsson A1018S I was using around the turn of the 
century referred to the smaller (almost full SD-card-sized) SIM cards as 
U-SIMs.


Then I had lone of a iSquareMobility Kite for a few months (which is a 
nice bit of kit BTW), and initially thought my SIM card (what I 
understand was a U-SIM, in the older parlance) would fit.  *WRONG*.


Apparently, that is now what they call a "full-size" SIM today.  U-SIMs 
are now a little bigger than a MicroSD card… and now they've got this 
silly nano-SIM format which needs to sit in a tray that's *bigger* than 
the "full-size" SIM it replaced!


Yes, this is "progress".  Anyway, I digress, this discussion has bugger 
all to do with OpenBSD, where at least sanity prevails which is why we 
can enjoy a sub-1GB ISO image download each new release.

--
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: How to unlock a serial port

2021-01-19 Thread Adam Thompson
[Replying directly as well, as I believe my MTA is still blacklisted by 
the OpenBSD mail server. Guess we'll find out! -Adam]


On 2021-01-17 20:09, Tilo Stritzky wrote:

On 14/01/21 17:38  Andrew Grillet wrote:

Hi

I am running OpenBSD on a T2000 (Sparc64).
I was trying to use the serial port from the primary domain, connected 
via

ssh, and my network lost the connection.
My tty00 is now locked:
jay# stty -f /dev/tty00
stty: /dev/tty00: Device busy
I do not want to reboot the primary, as the guests are running various 
live

services. I cannot find evidence of a lock file in /dev/spool/lock.
Is there a way out of this predicament?


fstat(1) is your friend here.
Note that each tty has a corresponding cua device, they're both under 
the

same lock.

tilo


I ran into this exact problem last year.  It'll be in the list archives.
According to Theo (if I understood him correctly) it's partly due to the 
way BSD serial ports have always worked, i.e. in a rather 
under-specified manner.
Apparently the core tty(4) code around this particular symptom hasn't 
really changed at all since OpenBSD forked.


My solution was to install Linux, sorry - I never did find a way around 
the problem on OpenBSD.


-Adam



Re: 4G mini PCI-e modem support?

2021-01-19 Thread Theo de Raadt
Peter Kay  wrote:

> On Fri, 8 Jan 2021 at 16:47, Stefan Sperling  wrote:
> >
> > On Fri, Jan 08, 2021 at 05:13:52PM +0100, Patrick Wildt wrote:
> 
> > > There's umb(4).  It supports USB's MBIM standard.  There are some MBIM
> > > compatible chips around, one for instance is this one:
> [..]
> > I have umb(4) working on an APU1 board. It's a Sierra Wireless EM7345, the 
> > one
> > shipped with x250 Thinkpads. Installation in an APU requires a compatible 
> > M.2
> > to miniPCIe adapter. Make sure to get an adapter with the correct M.2 
> > keying.
> > If the vendor advertises GSM/UMTS/LTE modem support the adapter should work.
> > If they don't, better ask before buying.
> >
> > This combo works fine in the middle miniPCIe slot of the APU. You'll need a
> > full size SIM card for the SIM card slot. Again, an adapter will help to fit
> > a micro or nano SIM.
> >
> > You will also want LTE antennas and compatible pigtails. Using wifi antennas
> > will result in about 50% packet loss.
> 
> Much obliged, I see some of those cards are quite cheap on ebay, and I
> don't need to have the absolute latest.
> 
> Now to find antennas and pigtails to link to the card

Be careful.

Cards listed with the right model could have older firmware which don't
suppor the MBIM protocol natively, but instead the older MSM protocol.
Or they have MBIM, but it is hidden from our driver.  Thus you end up with
umsm(4) support instead of umb(4).  With umsm(4) you need to do ppp yourself,
it is not a transparent network driver.



Re: 4G mini PCI-e modem support?

2021-01-19 Thread Peter Kay
On Fri, 8 Jan 2021 at 16:47, Stefan Sperling  wrote:
>
> On Fri, Jan 08, 2021 at 05:13:52PM +0100, Patrick Wildt wrote:

> > There's umb(4).  It supports USB's MBIM standard.  There are some MBIM
> > compatible chips around, one for instance is this one:
[..]
> I have umb(4) working on an APU1 board. It's a Sierra Wireless EM7345, the one
> shipped with x250 Thinkpads. Installation in an APU requires a compatible M.2
> to miniPCIe adapter. Make sure to get an adapter with the correct M.2 keying.
> If the vendor advertises GSM/UMTS/LTE modem support the adapter should work.
> If they don't, better ask before buying.
>
> This combo works fine in the middle miniPCIe slot of the APU. You'll need a
> full size SIM card for the SIM card slot. Again, an adapter will help to fit
> a micro or nano SIM.
>
> You will also want LTE antennas and compatible pigtails. Using wifi antennas
> will result in about 50% packet loss.

Much obliged, I see some of those cards are quite cheap on ebay, and I
don't need to have the absolute latest.

Now to find antennas and pigtails to link to the card

PK



Re: auto-boot

2021-01-19 Thread Diana Eichert
Hello

Having spent way to many years working on serial devices it looks to
me like either Rcv pin has noise on it because it is floating.  If I
remember correctly you can try a resistor between rcv and ground.

diana

On Mon, Jan 18, 2021 at 2:30 AM Bastien Durel  wrote:
> Hello,
>
> I set boot.conf to this :
>
> # cat -e /etc/boot.conf
> stty com0 115200$
> set tty com0$
> set timeout 5$
> #
>
> But the router does not boot without beeing connected to a powered-up
> machine :(
>
> --
> Bastien
>
>


-- 

-

Past hissy-fits are not a predictor of future hissy-fits.
Nick Holland(06 Dec 2005)

To announce that there must be no criticism of the president,
or that we are to stand by the president, right or wrong, is not
only unpatriotic and servile, but is morally treasonable to
the American public.  - Theodore Roosevelt(1918)



Re: How to request a specific IP address from DHCP server

2021-01-19 Thread Peter Kay
On Tue, 19 Jan 2021 at 20:57, Radek  wrote:
>
> Hi,
> I can't manage to request a specific IP address from DHCP server.  It is just 
> a testing lab, the requiested IP address (.104) isn't used by any other 
> client. What I'm doing wrong?
You're using the wrong tool for the job, use an address reservation
bound to the client MAC on the DHCP server instead.

Whether or not requesting an address client side works, at any time it
could fail due to a change in leases allocated to other clients, or
configuration changes at the server end. If a specific IP is needed,
use reservations instead.

PK



Re: Quick Q: proc: table is full ?

2021-01-19 Thread Why 42? The lists account.


On Tue, Jan 19, 2021 at 05:56:16PM -, Stuart Henderson wrote:
> > What causes "proc: table is full", or better asked, what limit might I be
> > hitting?
> Perhaps kern.maxthread; check kern.nthreads.

Hi Stuart,

Aha. I think you have nailed it:
> mjoelnir:/etc 19.01 21:13:02 # sysctl kern | egrep 'max(proc|thread)'
> kern.maxproc=8192
> kern.maxthread=1950
> mjoelnir:/etc 19.01 21:13:19 # ^max^n
> sysctl kern | egrep 'n(proc|thread)'
> kern.nthreads=1736
> kern.nprocs=283

I see that, way back when, I increased kern.maxproc to 8192 in
/etc/sysctl.conf. But I didn't realise then that I might also need to
increase the maxthread value. I'll change these and see if that helps.
(Bound to!)

I find the message to be a bit misleading though: "proc: table is full"

Clearer might be something like:
"kernel: thread table full: reached limit: kern.maxthread"

Or similar. I.e. the who, the what and the why.

Thanks for the tip!

Cheers,
Robb.



How to request a specific IP address from DHCP server

2021-01-19 Thread Radek
Hi,
I can't manage to request a specific IP address from DHCP server.  It is just a 
testing lab, the requiested IP address (.104) isn't used by any other client. 
What I'm doing wrong?

$ cat /etc/hostname.vr0
-inet
dhcp

$ cat /etc/dhclient.conf
send dhcp-requested-address 192.168.1.104;

$ sh /etc/netstart vr0
vr0: 192.168.1.103 lease accepted from 192.168.1.1 (b0:48:7a:a5:86:15)

$ dhclient -v vr0
vr0: DHCPREQUEST to 255.255.255.255
vr0: DHCPACK from 192.168.1.1 (b0:48:7a:a5:86:15)
vr0: 192.168.1.103 lease accepted from 192.168.1.1 (b0:48:7a:a5:86:15)

Thanks for any help.

-- 
Radek



Re: plugging head phones does not mute speaker

2021-01-19 Thread Maurice McCarthy
Sndiod is to be the default method of controliing audio.
Run sndiod and see what sndioctl says.

doas rcctl enable sndiod
doas rcctl start sndiod
doas sndioctl

Best



Re: Quick Q: proc: table is full ?

2021-01-19 Thread Stuart Henderson
On 2021-01-19, Why 42? The lists account.  wrote:
>
> Hi All,
>
> What causes "proc: table is full", or better asked, what limit might I be
> hitting?

Perhaps kern.maxthread; check kern.nthreads.




plugging head phones does not mute speaker

2021-01-19 Thread Björn Gohla


hi all,

i have this embarrassing little problem: when i play music and plug in
head phones, the built in speakers are not muted, even though mixerctl
says so. the headphones do work correctly.

i get this output whith the head phones plugged:

inputs.dac-2:3=80,80
inputs.dac-0:1=80,80
record.adc-0:1_mute=off
record.adc-0:1=124,124
record.adc-2:3_mute=off
record.adc-2:3=124,124
record.adc-4:5_mute=off
record.adc-4:5=124,124
inputs.mic=85,85
outputs.spkr_source=dac-2:3
outputs.spkr_mute=on
outputs.spkr_eapd=on
inputs.mic2=85,85
outputs.mic2_dir=input-vr80
outputs.hp_source=dac-0:1
outputs.hp_mute=off
outputs.hp_boost=off
outputs.hp_eapd=on
record.adc-4:5_source=mic2
record.adc-2:3_source=mic2,mic
record.adc-0:1_source=mic
outputs.mic2_sense=unplugged
outputs.hp_sense=plugged
outputs.spkr_muters=hp
outputs.master=80,80
outputs.master.mute=off
outputs.master.slaves=dac-2:3,dac-0:1,spkr,hp
record.volume=124,124
record.volume.mute=off
record.volume.slaves=adc-0:1,adc-2:3,adc-4:5
record.enable=sysctl

doing a `mixerctl -t outputs.spkr_mute` separately toggles the variable,
but has no audible effect, the speaker stays active either way.

`mixerctl -t outputs.master.mute` (or pressing the built in mute button)
does work, but obviously mutes the speaker as well as the headphones.

dmesg says:

azalia0 at pci0 dev 31 function 3 "Intel 100 Series HD Audio" rev 0x21: msi
azalia0: codecs: Realtek ALC236, Intel/0x2809, using Realtek ALC236
audio0 at azalia0

the machine is a lenovo ideapad 500S.

the device used to work correctly with linux.

i'm running 6.8 GENERIC.MP#277 amd64.

did i misconfigure anything, or could this be a bug?

thanks in advance for any hints.

--
cheers,
björn



Quick Q: proc: table is full ?

2021-01-19 Thread Why 42? The lists account.


Hi All,

What causes "proc: table is full", or better asked, what limit might I be
hitting?

I wrote a quick loop to check how many processes are running i.e.
> while true   
> do
> DATE=`date +'%Y.%m.%d %H:%M:%S'`
> echo -n "${DATE}: "
> ps -AHk | wc -l
> sleep 90
> done
> 2021.01.19 12:59:21: 1821
> 2021.01.19 13:00:51: 1731
> 2021.01.19 13:02:21: 1698
> 2021.01.19 13:03:52: 1696
> ... 
I have yet to see a high of more than ~2000.

Sysctl shows me these proc values:
> kern.maxproc=8192
> kern.nprocs=283

I am the only user on the machine (Xfce Desktop and too many browser
tabs). I am a member of "staff" so I think these limits apply:
> staff:\
> :datasize-cur=8192M:\
> :datasize-max=infinity:\
> :maxproc-cur=7500:\
> :maxproc-max=1:\
> :openfiles-cur=15000:\
> :openfiles-max=2:\
> :ignorenologin:\
> :requirehome@:\
> :tc=default:

Running "limit" in my shell (zsh) shows:
> cputime unlimited
> filesizeunlimited
> datasize8192MB
> stacksize   4MB
> coredumpsizeunlimited
> memoryuse   31608MB
> memorylocked10537MB
> maxproc 7500
> descriptors 15000

Also, a related question ... that message shows up in the output of dmesg
and also gets logged to the messages file, but it isn't reported in my
Xconsole window. In there I see stuff like this:
> Console log for mjoelnir
> drm:pid64450:intel_pipe_update_start *ERROR* [drm] *ERROR* Potential atomic 
> update failure on pipe A
> uvm_mapent_alloc: out of static map entries

But no corresponding proc table full messages. Is it not considered to be
important enough to also go to this console?

Thanks in advance!

Cheers,
Robb.



Re: Usermod -G failure without error

2021-01-19 Thread Kevin Chadwick
On 1/19/21 10:59 AM, Kevin Chadwick wrote:
> Sorry, I think that I must have ran groupadd first which brought users and
> groups IDs, out of sync.

Ok, after failing to reproduce it this morning;

With admin safely jumping to 1020,

I worked it out.

groupadd elansys
useradd admin
userdel admin
groupdel elansys
useradd admin
groupadd elansys

/etc/passwd
admin:*:1018:1018::/home/admin:/bin/ksh

/etc/group
admin:*:1019:
elansyssftp:*:1018:

Shoudl userdel remove the group too?



Re: Usermod -G failure without error

2021-01-19 Thread Kevin Chadwick


> For example, does 'admin' exist in /etc/passwd?  What does "grep elansyssftp
> /etc/group" return?

I had played a little. So it shows /bin/ksh and test user etc.

/etc/passwd
admin:*:1018:1018::/home/admin:/bin/ksh

/etc/group
admin:*:1019:
elansyssftp:*:1018:test

Sorry, I think that I must have ran groupadd first which brought users and
groups IDs, out of sync.

I am guessing, the elansyssftp group seems to have gotten the same ID as admin
user, so there is no point adding it and so returns without error?

The admin group is then marooned, I guess, so I broke the user namespace system.

I see that system groups without users have dedicated IDs, so my bad.

Is there anything to improve upon?

An informational message be printed in the case of the permission already being
facilitated? Obviously the return code 0 is correct.

Alternatively, maybe when you add a group without an ID, a warning?

Or perhaps a groupadd man page CAVEAT?

Or I could just pay ultimate attention to the numbers, in the future?