1

My project is a intranet application working as an offline captive portal. This part i have working.

However, I need to add a thermal network printer that does not have USB or Bluetooth. I would like to plug the printer directly into my Raspberry Pi 3's eth0 socket, receive a static IP so that my application can send jobs to the printer.

I do NOT need anyone connected to the hotspot to use the printer, just a direct connection from the Pi to the printer so that the application can print receipts.

Is this possible?

It would be awesome if the printer could get the same IP everytime :)

My attempt at a configuration...

/etc/network/interfaces

auto lo
iface lo inet loopback

iface eth0 inet manual
iface wlan0 inet manual

auto br0
iface br0 inet static
bridge_ports eth0 wlan0
address 192.168.2.1
netmask 255.255.255.0

/etc/dnsmasq.conf

bogus-priv
server=/localnet/192.168.2.1
local=/localnet/
address=/#/192.168.2.1
interface=br0
domain=localnet
dhcp-range=192.168.2.10,192.168.2.254,1h
dhcp-option=3,192.168.2.1
dhcp-option=6,192.168.2.1
dhcp-authoritative

thanks and much appreciated

  • ethernet connected to ethernet ... pretty sure it'll work – Jaromanda X Feb 23 '18 at 3:33
  • Yes it can be done and it is the "old style" to get it working vs the "new style" with dynamic IP and mDNS and to use a name instead of static IP. – MatsK Feb 23 '18 at 7:07
  • 1
    thank you @MatsK!! i had no idea what mDNS was or that it even existed. that was the hint i needed. i am going to try this [raspberrypi.org/forums/viewtopic.php?t=18207] and report back later :) – Mike Kangas Feb 23 '18 at 13:23
  • I'm looking for an answer. All network printer I know can be setup with a fixed ip address either through its local config menu or with its web interface. Is this also possible with your thermal printer? This would simplify a solution. – Ingo Feb 28 '18 at 8:58
0

i got this to work. once my printer was connected. (for my printer i use telnet) i then telnet into the admin interface and gave it a static ip. and then with a static ip i setup a printer through cups with the ip i assigned it.

/etc/network/interfaces

auto eth0
allow-hotlug eth0
iface eth0 inet static
address 192.168.3.1
netmask 255.255.255.0

/etc/dnsmasq.d/dnsmasq.eth0.conf

interface=eth0
listen-address=192.168.3.1
bind-interfaces
dhcp-range=192.168.3.10,192.168.3.254,12h

(note: my Pi is also a hotspot. in order to listen on multiple interfaces i needed to delete dnsmasq.conf and put my interface configurations into the /etc/dnsmsq.d directory. my pi accepts connections on eth0 for the printer and wlan0 for the hotspot. but, if have an /etc/dnsmasq.conf file, you may put this in that file)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.