Trying to call curl CMDs, device responding but without useful data
Tried over USB and over WiFi with IP address (192.168.44.1) same results Device firmware version 4.16/s2
Sending cmd:
curl http://192.168.88.1/cgi-bin/cmd
Response:
{"status": "err: unknown cmd"}
Sending cmd: curl http://192.168.88.1/cgi-bin/cmd=get_info Response:
<HTML><HEAD><TITLE>404 Not Found</TITLE></HEAD>
<BODY><H1>404 Not Found</H1>
The requested URL was not found
</BODY></HTML>
Sending cmd:
curl http://192.168.88.1/cgi-bin/upload
Response:
{"status": "err: filename or length empty"}
What I am trying to achieve it's communication with the printer over the API to use in my APP Thanks for advice
curl http://192.168.88.1/cgi-bin/cmd=get_info is incomplete,
The correct version: curl http://192.168.88.1/cgi-bin/cmd?cmd=get_info
And the upload should specify a file, e.g.: curl -F "[email protected]" http://192.168.44.1/cgi-bin/upload
The file 0.mbd should exist in current path.
Thanks for your fast response
I've tried
curl http://192.168.88.1/cgi-bin/cmd?cmd=get_info
I am receiving
zsh: no matches found: http://192.168.88.1/cgi-bin/cmd?cmd=get_info
But in the browser over local WiFi and over wired USB printer is available over WEB UI
As well after connecting the printer over USB to MAC (Catalina 10.15.7) I found that internet connection even after disconnection becomes tricky
Is the device making system network reconfiguration on connection somehow?
Note that 192.168.44.1 is used when connecting the printer using wifi, and 192.168.88.1 is used when connecting using usb.
Before using curl, you can try ping the printer's ip.
You may also try restarting the printer if you encounter problems connecting.
When your computer connects to the printer, it will use the parameters provided by the printer such as dhcp. If disconnection does not restore the network, try reconnecting to your default router (disconnect first).
Yes, I understnad the differences between IP addresses in USB and WiFi connections Ping command works fine
ping 192.168.44.1
PING 192.168.44.1 (192.168.44.1): 56 data bytes
64 bytes from 192.168.44.1: icmp_seq=0 ttl=64 time=3.256 ms
64 bytes from 192.168.44.1: icmp_seq=1 ttl=64 time=15.519 ms
64 bytes from 192.168.44.1: icmp_seq=2 ttl=64 time=30.968 ms
64 bytes from 192.168.44.1: icmp_seq=3 ttl=64 time=9.710 ms
I found that after I am turning on printer and it's setted to connect to my router to be have access from local network few devices in my network including laptop from which I am still able to ping printer loosing internet access After turning printer off internet access returning back to normal state
Unfortunately still not getting valid responses using cgi curl requests Maybe I need to try update latest firmware to the printer? (A little confused because seems like my FW version is the latest one 4.16/s2)
Try this: https://github.com/ohmyzsh/ohmyzsh/issues/31
P.S. it works fine without quote in bash.