Use USB printer over TCP/IP - printing

I have an application that sends ZPL print jobs via TCP/IP to a client in the network (I can configure IP and Port). I have only a USB printer available that is attached to a client. How can I send print job to the client with the USB printer, and let this client print the job with the USB printer?
Sending to the client is not the problem, I just configure the IP and some Port. But how can the client print this via the USB printer?

There are a couple of methods to do this. They all require a app on the system that the USB printer is attached to. You can send the ZPL to a generic raw driver. You can also use an SDK to send the ZPL to the USB printer. If it's a Zebra printer, we have a Java and a .NET based SDK that can do this. For a complete answer, it would be really helpful if you mentioned the platform/OS the printers will be connected to and the language the 'client' app will be written in.

Related

Capturing packets using wireshark of an IoT device

I have an IoT device that connects to my wifi router using wifi. There is a limitation of capturing network logs on the device itself so I thought to capture it using Wireshark.
I am using windows 10 and downloaded the latest version of Wireshark. Now that my laptop and my IoT device connect to the same network through the same router, I am not able to capture the packets in and out from my IoT device.
I put the filer as ip.addr == {ip of the IoT device). But it shows nothing.
Is it possible to capture these packets using a laptop using Wireshark?
Let me know, please.
Thanks
Akhilesh
Is it possible to capture these packets using a laptop using Wireshark?
Yes, but your capture setup is almost certainly incorrect. In a nutshell, you need to be able to capture packets in monitor mode, and you're not doing that. Whether it's possible to do so using the WiFi card on your laptop is unknown, because not all cards support monitor mode on Windows.
Since it's impractical to provide an answer that simply repeats information already provided elsewhere, I'll refer you to the following sites for more detailed information:
The Wireshark WLAN (IEEE 802.11) capture setup wiki page
Jasper Bongertz's blog about Wireless Capture on Windows
See also my answer to this question, which basically provides the same information.

Internet connection problem from different network for NodeMCU ESP8266 which I am using for IOT home automation

Would anyone like to help me with this problem please?
how to connect/control Nodemcu esp8266 wi-fi module from different network for control iot devices from outside of any home/ house?
Internet connection problem from different network for NodeMCU ESP8266 which I am using for IOT home automation.
Actually, in case of an class project, I have used some code (also coppied some code and took help from some website) from internet and also used Blynk for controll my ESP8266.
But not i want to make a personal app by which app I can control my devices outside from my home.
I have already connected with my WI-FI router with my home network!!
It worked well,
But i don't know how to do the same thing from different netwrok.
If possible I think anyone can help me....
Thank you.
To everyone.
This has been answered in greater detail on both the Arduino and Internet of Things StackExchange sites. In summary:
For safety, it is difficult to start a connection to a device on another local network. Devices on WiFi networks are protected from the Internet by a firewall, which is normally configured to return responses to requests sent by the devices, but block all unsolicited messages. Even if the firewall allows an incoming connection on a given port, "port forwarding" or other custom configurations are needed for unexpected messages to reach one of the multiple devices on the network (the devices usually share the same public IP address of the network and external systems' messages cannot reach the right local address without forwarding by the router).
Any device exposed to unsolicited requests like this is at risk of being attacked and can pose a risk to other systems on the network. It is thus safer to leave the firewall the same and instead make the device subscribe to an external webserver, which acts as a mailbox for incoming messages. Then, you can send requests to the server from anything with an internet connection, and the server will store them and relay them to the ESP8266 whenever the ESP asks. MQTT protocol using a server-side broker program like Mosquitto and a client like PubSubClient on your ESP8266 could work for this sort of publish-subscribe model, and MQTT tutorials and explanations are available both on both tool sites and Stack sites.
You can use Arduino IDE to program ESP8266 device.
https://randomnerdtutorials.com/how-to-install-esp8266-board-arduino-ide/
After installing ESP8266 in Arduino IDE. You need to connect ESP8266 with WiFi router(which have internet connected). Once your device is connected with a WiFi router. you can MQTT protocol to communicate with the server. You can use the following library in Arduino to implement MQTT client in ESP8266. ESP8266 is used to send and receive data from a different network. ESP8266 is subscribed to a particular topic. You can publish data to that topic from different MQTT client.
https://github.com/Imroy/pubsubclient
Use the Following link to get more familiar with MQTT protocol
https://www.hivemq.com/blog/mqtt-essentials-part-1-introducing-mqtt
You can use MQTTfx desktop application to send and receive data from NodeMcu(ESP8266).
MQTT basic diagram for understanding

Control what services are published by Avahi?

I've configured a print server on Raspbian (Jessie) using CUPS, SAMBA and Avahi to publish a USB printer to iOS devices. It works fine except when it comes time to actually print, the printer isn't found. (even after selecting the printer in the Printer Options dialog in iOS.)
I believe this is either related to 1) multiple services with the same name being published by Avahi 2) some kind of timeout between printer selection and printing or 3) the address of the printer changing somehow at each access.
In order to explore the first problem, I'd like to try to disable all but the _ipp._tcp. service for the printer. (simply by sharing a printer in CUPS, I get a Printer#Server over _ipp._tcp., _ipps._tcp. and _printer._tcp.)

Printing from iOS Application using CUPS

Has anyone tried printing using CUPS from iOS/Objective-C application?
I have an iOS application that is printing on 1 POS printer from multiple devices and when printer is busy, I am having issues. I am thinking I can build a print server in Linux using CUPS and send print request from all iOS devices to a common print server.
Any ideas/suggestions on the approach? I have setup EPSON T88v Printer on Linux Box and CUPS is working fine. Now from iOS will it be AirPrint or some other way to send request to the CUPS printer.
It depends on if the POS system is using the IOS printing api or it is sending directly to a printer over a tcp connection.
If it is using the IOS Printing API you can print to it from the app.
You can print from an iPad to a cups printer directly. The cups printer has to be discoverable and shared on the network (cups configuration). To verify that your cups printer is functioning correctly I would try to print from notes on the iPad to the newly created printer. If that is functioning than you can try the POS system. I would guess that the POS system is printing directly to the printer through a tcp connection using the proprietary esc/pos language in which case you will not be able to redirect it to a cups printer.

Arduino print commands

I am currently connecting my Arduino Uno with the Wi-Fi shield and everything is going great. Where does the print commands (such as WiFi.localIP() or Serial.print() ) print?
I searched and can't find them. I try to access with my web browser to my IP address, but nothing's working.
Serial.print() will print to the serial interface regardless of whether the Wi-Fi shield is connected or not. This is particularly useful for debugging. These characters WILL NOT go out over the Wi-Fi connection.
To print characters to a connected WiFi client (when using the Arduino as a server), look at the example Wi-Fi Web Server.
Notice how the HTTP response is built up line by line. If you're trying to connect to your Arduino through your web browser, you can follow the format in the example and replace it with the necessary text or HTML you want to see in the browser.

Resources