# Dmesg & usb printer config



## dalpets (Sep 1, 2019)

In the course of installing a Brother HL-2250DN printer in 11.2 I need to install the printer device listed in dmesg that is the symbolic link to the usb printer device in /dev/usb.

Could you please advise exactly which dmesg line/lines below need to replace `add path 'usb/X.Y.Z' mode 0660 group cups` file in the /etc/devfs.rules file.

```
Root mount waiting for: usbus0
uhub0: 22 ports with 22 removable, self powered
Root mount waiting for: usbus0
ugen0.2: <Brother HL-2250DN series> at usbus0 (???)
Root mount waiting for: usbus0
ugen0.3: <Microsoft Microsoft Basic Optical Mouse v2.0> at usbus0
ugen0.4: <Logitech USB Keyboard> at usbus0
ukbd0 on uhub0
ukbd0: <USB Keyboard> on usbus0
kbd2 at ukbd0
random: unblocking device.
em0: link state changed to UP
ulpt0 on uhub0
ulpt0: <Brother HL-2250DN series, class 0/0, rev 2.00/1.00, addr 1> on usbus0 (???}
ulpt0: using bi-directional mode (???)
ums0 on uhub0 (???)
ums0: <Microsoft Microsoft Basic Optical Mouse v2.0, class 0/0, rev 1.10/1.99, addr 2> on usbus0
ums0: 3 buttons and [XYZ] coordinates ID=0
uhid0 on uhub0
uhid0: <USB Keyboard> on usbus0
pid 2689 (tracker-miner-fs), uid 1001: exited on signal 11 (core dumped)
pid 3249 (gjs-console), uid 1001: exited on signal 11
```
Thanks for your help


----------



## bjs (Sep 1, 2019)

I maybe wrong here but I would try


```
add path dev/ulpt mode 0660 group cups
```


----------



## dalpets (Sep 1, 2019)

bjs said:


> I maybe wrong here but I would try
> 
> 
> ```
> ...


Thanks for your input but the extra requirement for the XYZ  dmesg(8) conversion is apparently needed in addition to the dev/ulpt mode 0660 code you suggested
For clarification see the NOTE in;  



_View: https://www.youtube.com/watch?v=Bu13jNyE7J8_


----------



## bjs (Sep 1, 2019)

Okay... What is the output of


```
ll /dev/usb
```


----------



## bookwormep (Sep 1, 2019)

In my experience with CUPS, the `dmesg`line with ugenX.Y is associated to the usb/X.Y.Z syntax you would use on the /etc/devfs.rules. "Z" is almost always "zero". So:


```
add path 'usb/0.2.0' mode 0660 group cups
```

EDIT: Also, don't forget to enable devfs.rules in /etc/rc.conf.


----------



## dalpets (Sep 2, 2019)

bjs said:


> Okay... What is the output of
> 
> 
> ```
> ...




```
$ ll /dev/usb
total 2
dr-xr-xr-x  2 root  wheel     -  512 Sep  2 20:29 ./
dr-xr-xr-x  8 root  wheel     -  512 Sep  2 20:29 ../
crw-------  1 root  operator  - 0x2a Sep  2 20:29 0.1.0
crw-------  1 root  operator  - 0x51 Sep  2 20:29 0.1.1
crw-rw----  1 root  cups      - 0x6e Sep  2 20:29 0.2.0
crw-------  1 root  operator  - 0x70 Sep  2 20:29 0.2.1
crw-------  1 root  operator  - 0x71 Sep  2 20:29 0.2.2
crw-------  1 root  operator  - 0x72 Sep  2 20:29 0.3.0
crw-------  1 root  operator  - 0x74 Sep  2 20:29 0.3.1
crw-------  1 root  operator  - 0x75 Sep  2 20:29 0.4.0
crw-------  1 root  operator  - 0x77 Sep  2 20:29 0.4.1
crw-------  1 root  operator  - 0x78 Sep  2 20:29 0.4.2
$
```


----------



## bjs (Sep 2, 2019)

Okay... Do you see it??? Your answer is right there and in bookwormep's edited code block...


----------



## dalpets (Sep 2, 2019)

bjs said:


> Okay... Do you see it??? Your answer is right there and in bookwormep's edited code block...


Yep, 

```
crw-rw---- 1 root cups - 0x6e Sep 2 20:29 0.2.0
```
Thanks to both to you & bookwormep for your help


----------



## dalpets (Sep 11, 2019)

My printer, Brother 2250DN will not print, and is only recognised at bootup. A window pops up when I try to print but it does not contain my printer, as provided for there. This printer has been working in the past , with Ubuntu if I remember correctly.

my current /etc/devfs.rules reads as follows

```
[system=10]
add path 'unlpt*' mode 0660 group cups
add path 'ulpt*' mode 0660 group cups
add path 'lpt*' mode 0660 group cups
add path 'usb/0.2.0' mode 0660 group cups
[local rules=5]
add path 'cd*' mode 0660 group operator
```
My /etc/rc.conf reads as follows

```
hostname="FreeBSD"
ifconfig_em0="DHCP"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
sysrc dbus_enable="YES"
sysrc hald_enable="YES"
sysrc gdm_enable="YES"
sysrc gnome_enable="YES"
dbus_enable="YES"
hald_enable="YES"
gdm_enable="YES"
gnome_enable="YES"
# devfs.rules_enable="YES"
cupsd_enable="YES"
devfs_system_ruleset="system"
```
I have also installed hplip v3.17.11_5 without really knowing if it is supported by freebsd. When I attempt to start a configuration The HP Status Service advises that it is unable to start because there is no system tray. In any event the hplip version it is trying to use is an old version 2.

Any help would be appreciated to get this printer working


----------



## T-Daemon (Sep 11, 2019)

Not related to the problem, you have useless entries in rc.conf, they can be removed.

```
sysrc dbus_enable="YES"
sysrc hald_enable="YES"
sysrc gdm_enable="YES"
sysrc gnome_enable="YES"
```



dalpets said:


> ... is only recognised at bootup.


Can you be more specific, do you want to say the printer is not recognised after boot powered on?


dalpets said:


> A window pops up when I try to print but it does not contain my printer, as provided for there.


To which program does the pop up window belong, from where are you trying to print?


----------



## SirDice (Sep 11, 2019)

T-Daemon said:


> you have useless entries in rc.conf,


They're not useless though, they're actually quite dangerous. They'll get executed a couple of dozen times during boot, every time rc.conf is sourced from one of the system's rc(8) scripts. And that happens a lot. 


> they can be removed.


They *must* be removed.

Never, ever, put commands in rc.conf. They will cause all sorts of weird and wonderful interactions and may break the whole system. The rc.conf file should only contain variables, nothing else.


----------



## dalpets (Sep 11, 2019)

T-Daemon said:


> Not related to the problem, you have useless entries in rc.conf, they can be removed.
> 
> ```
> sysrc dbus_enable="YES"
> ...


----------



## dalpets (Sep 11, 2019)

*This was the pop up
"http://localhost:631 is requesting your username and password. The site says: “CUPS”"*
I was messing up the root/passwd requirement of the 631 site.


----------



## SirDice (Sep 11, 2019)

Frequently Asked Questions - CUPS.org
					






					www.cups.org


----------



## dalpets (Oct 12, 2019)

SirDice said:


> Frequently Asked Questions - CUPS.org
> 
> 
> 
> ...


As a new user I was using the i386 format & I could see my WORKING brother 2250DN printer in the local host :631 dropdown gui using cups 2.2.12. Now that I have moved to AMD64 the printer is not appearing in the dropdown window. Is there an explanation for this? I know there is a later version (2.3.0) but I don't see a FBSD version for my printer?
dmesg sees the printer but that's all?
ulpt0 on uhub0
ulpt0: <Brother HL-2250DN series, class 0/0, rev 2.00/1.00, addr 2> on usbus0
ulpt0: using bi-directional mode
Any help would be helpful. Thanks.


----------

