Application and device behaviors
Recording observations about the behavior of various applications and devices.
- AXIS Cameras
- Sharing a DYMO LabelWriter 450 Twin Turbo using CUPS and SAMBA
- InsyncHQ - InSync and InSync-Headless
AXIS Cameras
Testing done 7/9/2021 with two AXIS M2026-LE MkII cameras running firmware version 8.40.3.
What do we learn from this testing?
At times, the AXIS Device Manager doesn't properly detect one or more cameras connected to the network. The AXIS IP Utility so far has not failed in detecting cameras. There are alternate ways to detect and access these cameras.
Behavior on boot
- The netd service manages assigning IP addresses to the Ethernet interface:
- If the device is configured to use DHCP, the IP address 192.168.0.90/24 is assigned to the Ethernet interface and the DHCP client is started. If a DHCP response is received from a DHCP server, the IP address received is replaces the 192.168.0.90/24 address, along with all other DHCP options received from the server. If no DHCP response is received from a DHCP server, the 192.168.0.90/24 IP address remains instantiated on eth0 and the DHCP client continues to send DHCP requests.
- If the device is configured with a specified static IP address, that static IP address is instantiated on the Ethernet interface eth0.
- The zeroconf-ip service claims a link-local IP address in the range 169.254.0.0/16 and instructs the netd service to add this as a secondary IP address on the Ethernet interface eth0. This IP address is always accessible on the device, unless the ZeroConf service gets disabled.
AXIS IP Utility
The AXIS IP Utility uses MDNS requests to discover cameras on the network. These MDNS requests are responded to by the Bonjour service running on the camera. If the Bonjour service is disabled, no response will be given.
Multiple UDP requests with different PTR queries are sent to the multicast address 224.0.0.251. The following requests were sent from the test computer to the diagnostic network with two cameras attached.
-
10.77.69.2 224.0.0.251 MDNS Standard query 0x0000 PTR _axis-nvr._tcp.local, "QM" question
-
10.77.69.2 224.0.0.251 MDNS Standard query 0x0000 PTR _axis-bwsc._tcp.local, "QM" question PTR _axis-video._tcp.local, "QM" question
Cameras respond to the queries by sending an MDNS response to the 224.0.0.251 multicast address. The following are the responses from the two cameras connected to the diagnostic test network:
-
169.254.93.22 224.0.0.251 MDNS Standard query response 0x0000 PTR AXIS M2026-LE Mk II - B8A44F0A98A1._axis-video._tcp.local TXT, cache flush A, cache flush 169.254.93.22 A, cache flush 192.168.0.91 SRV, cache flush 0 0 80 axis-b8a44f0a98a1.local NSEC, cache flush AXIS M2026-LE Mk II - B8A44F0A98A1._axis-video._tcp.local NSEC, cache flush axis-b8a44f0a98a1.local
-
169.254.190.127 224.0.0.251 MDNS Standard query response 0x0000 PTR AXIS M2026-LE Mk II - B8A44F1136E5._axis-video._tcp.local TXT, cache flush A, cache flush 169.254.190.127 A, cache flush 10.77.69.198 SRV, cache flush 0 0 80 axis-b8a44f1136e5.local NSEC, cache flush AXIS M2026-LE Mk II - B8A44F1136E5._axis-video._tcp.local NSEC, cache flush axis-b8a44f1136e5.local
You can see that both camera responses shown above list all of the IP addresses instantiated on the camera.
AXIS Device Manager (ADM)
The AXIS Device Manager uses MDNS requests and SSDP requests to discover cameras on the network.
Using the ADM to configure a device makes more changes than just assigning the IP address. I believe multiple services are disabled, but this is still to be tested.
- more content to come
Alternate detection methods
Windows ARP Cache
Running "arp -a" on a Windows computer will display the arp cache. The link-local IP addresses instantiated by the ZeroConf service of recently booted cameras should be visible in the ARP list.
Packet sniffing using Wireshark
Wireshark can be used to observe broadcast/multicast traffic generated by cameras (especially prevalent during the initial boot) as well as ongoing DHCP requests if the camera is connected to a network lacking a DHCP server.
:end
Sharing a DYMO LabelWriter 450 Twin Turbo using CUPS and SAMBA
I wanted to if I could use a Raspberry Pi Zero W 1.1 to be a wireless USB print server for my DYMO LabelWriter 450 Twin Turbo. Here's what I learned and how to make it work. These steps should be the same regardless of server or operating system (Debian, Raspbian, Ubuntu, etc.).
Raspberry Pi
Install software
sudo apt install cups samba printer-driver-dymo
# add a user on the pi to the lpadmin group
# this is what you'll use to login to the cups web interface for adding the printer
sudo usermod -a -G lpadmin pi
sudo cupsctl --remote-any
sudo systemctl restart cups
Configure Samba
Edit /etc/samba/smb.conf and make sure the printers and print$ sections match what is shown below. You can make the print$ section writable if you need to be able to remotely manage print drivers.
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = yes
read only = yes
create mask = 0700
# Windows clients look for this share name as a source of downloadable printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = yes
Add the printer to CUPS
- Login to the CUPS service using the URL https://[ip_address]:631/admin
- Click Add Printer
- Do what is needed to add the printer.
Adding the printer to Windows
Add device - fail
I tried adding the printer using the Windows Add device option. It didn't go so well. The printer adds properly, and I can print to it from Windows, but DYMO Connect will not use the printer. Windows creates a WSD-[UUID] IPP type port and the driver maps correctly, but I never was able to get it to print successfully. It would just give an error. Doing a packet capture, I never actually saw Windows send data to the print server when trying to send a print job.
Add device - Add manually - fail then success after rename
I tried adding the printer using the Windows Add manually method by specifying the IPP URL as the printer name. It successfully adds the printer, and I can successfully send a test page job from Windows, but DYMO Connect either crashes when loading or shows the printer as disconnected. Windows appears to add a "\\" in front of the printer name. If I rename the printer using PowerShell, because I couldn't find any other way to rename it, DYMO Connect will then print successfully.
PowerShell Add-Printer Command - pure success
Below is the command used to add the printer to a Windows 11 computer that already has the DYMO Connect software installed. Everything worked perfectly.
Add-Printer -Name "DYMO LabelWriter 450 Twin Turbo on piZeroW_91" `
-PortName "http://[ip_address]:631/printers/DYMO_LabelWriter_450_Twin_Turbo" `
-DriverName "DYMO LabelWriter 450 Twin Turbo"
Adding the printer to OSX
After installing the DYMO Label Software, an Add Network Printer dialog is displayed. Just close it and open go to the OSX printer settings. The printer just showed up in the list and just worked. Lol
DYMO Connect Software
The DYMO Connect software will only show a printer as available if the driver used by the printer is one of their supported drivers.
InsyncHQ - InSync and InSync-Headless
Installing insync using modern key management
The vendor's instructions for installing via the apt package manager use the deprecated apt-key package manager. The installation instructions below use current methods of leveraging the signing key without the vulnerabilities of loading a vendors key into the main apt key ring.
# import the key to your local keyring
gpg --keyserver keyserver.ubuntu.com --recv-keys ACCAF35C
# export the key in ascii armored format to a local file
gpg --armor --export ACCAF35C > insynchq-ubuntu.asc
# move the file to a system location
sudo mv insynchq-ubuntu.asc /usr/share/keyrings/
# create the apt sources file for insync
sudo cat <<EOF > /etc/apt/sources.list.d/insync.list
deb [signed-by=/usr/share/keyrings/insynchq-ubuntu.asc] http://apt.insync.io/ubuntu `cat /etc/os-release | grep UBUNTU_CODENAME | cut -d = -f 2` non-free contrib
EOF
# update apt
sudo apt update
# install insync
sudo apt install insync
If for some reason you don't have access to gpg, here's the actual insync-ubuntu.asc file contents:
cat <<EOF > insync-ubuntu.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFBNZQMBCADhvMmAAuYnB1rxzvGzz3rdYDT9pg6QCSI7gqTrimVS+SqkTVnj
Qh+ot849Vgfww50FMsNVTMX3QZVjJ/8/LrlZRLoiowBp9emH+Cvpmc+jjsBZJeuB
Urd2WzG1FZ1fx821UHmN8xr6JYq1ppuA9am5eI8ks2nGnc5UssEUWGWEnXcR4Q1y
AdcB1WvCz7GTEkQkf+aDJS3mbLp9nEMNd4C/U9B60Jp5Yerm+eaZL296VvSodQ2l
croqkbXZumsdVYE4FZJf88FKVXJc4QHpeMlJ0OVI+1cDXoFlGTlxkh6ofa27w1UR
2Fz70nf+fYxwnAFHL4irkIlsO/Rt8qodb1dBABEBAAG0JEluc3luY2hxIEluYyA8
c2VydmljZXNAaW5zeW5jaHEuY29tPokBVAQTAQoAPgIbLwIeAQIXgAULCQgHAwUV
CgkICwUWAgMBABYhBK7rlOnFo7VOz6SmaqaERwysyvNcBQJmqMYaBQkd4C8XAAoJ
EKaERwysyvNcvBUH/1XY2AEGE++q0CEQxXU/TSculeZhWJR/HS7/zw/p5ZHXmfVu
s7JLg/6Ge0W3+Btb8wpX9oEPvUKfz1H5CjSkQgoXRWItZTt0m0g92WLdfPwkXq91
US10hqA/S0t7fIjaJUr4DzsCtloR4oj/A+jDhIQVKMxtE5l+Roi4noUjxLCNXuwL
fYdd5A77EmMUZ0qBs2M6t7ypsKg1f106L1XHAO0bt9QPaOhOk6JNP45ao2KSH8sD
JRADUmtCUxHljyCVDSX/QHxjLF3rjJNSDfyCrlTdyQl47Pr4tKWJhm1u7yPCJ7/w
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+E
YzDlKJ4JDyetm6Z20CspCRCmhEcMrMrzXCRJCACm0Ri93g6K1WB1FpcDIj0UU1/8
Z9XGT83WWaHfd6Bp2xVNyFOUo9QnMZmRUZVf64feYeUvoZnR0zcFofvLvY8bMCZY
Scn/rTPw8V6wraZsFxsIE96B5d1IfCDPxb8MGEG27Dm6WjEg65JeyeU9K7un4hyK
4jhjvYeKAVDG4PEAfrvLBiYc0TlSwPqhhnVB3uvEHZwpfBjobFGgaPTnYBEjXeql
6+QhJqHQrUGbfWDzyuVv8FuEzMNW0PTvZEEpeOdFHRqOo6My7erDprr/dzegyFvs
VqdHWsArPrPM102WLHgeooXihxqgDqg4KheAr1sHeGnTVG0Ow7E9RWg2ZUqF
=RWiJ
-----END PGP PUBLIC KEY BLOCK-----
EOF
insync-headless and umask
insync-headless autoruns using cron
#end