-
Notifications
You must be signed in to change notification settings - Fork 19
Raspberry Pi Connection Stability
An issue was raised regarding the stability of the connection between Raspberry Pis and the Instax SP-2. (https://github.com/jpwsutton/instax_api/issues/13), the following is a response from user @partynikko who found a resolution for this problem.
Hi 👋
TLDR; Read this: https://www.raspberrypi.org/forums/viewtopic.php?p=1506297#p1506297_
Just wanted to share my solution to fixing my networking issues that are similar to what you are experiencing.
So I've built a photo booth project using an Instax Share SP2. It's being powered by a Raspberry Pi 4 (running Raspbian) and I encountered big issues quite early regarding connecting to the printer and keeping the connection stable. I rarely got connected and if I managed to do so, I either got disconnected or got the connection timeout or "No route to host". I got so tired of this as my Mac and Windows were working fine and I realised the problem has to do something with the RPi.
After a lot of research I found out that the network driver of the Raspbian distro has some issues that a person has fixed with his own driver. I installed it, rebooted and suddenly I could connected, stay connected and print images reliably. If you are experiencing these issues and want the drivers, see this link at the beginning of this post.
My next challenge was that I had to run 2 WiFis - one for connecting to the printer and one for connecting to the interwebz. I solved this by using a USB dongle with WiFi. Now the issue arose of how to route the traffic depending on what I wanted to do. If no routing is present, we might try to connect to the printer via the interface that is connected to the interwebz, hence it will timeout or "No route to host". I solved this (with the help of a friend with good network skills) by supplying a static IP address to the interface that was connected to the Instax printer with a route and add a route for that interface and address of the printer network.
The static IPv4 I chose was 192.168.37.103 and I supplied the address of the printer (192.168.0.251) as the router to this interface. I then also run the following:
$ sudo ip route add 192.168.0.0/24 dev <INTERFACE-NAME>
I could now be connected to the printer and another WiFi at the same time with reliable printing functionality. I ran my photo booth at a conference this weekend with around 150 images printed with the printer during a period of 9 hours. I could even replace the film without turning off nor restarting the printer. It just kept staying connected no matter what and had no hiccups what so ever.
I'd say those are pretty good results for an awesome reverse engineered module. Thanks for the job you've put down into this!