Smarter Serial Communications with WiSer

Arduino Electronics Internet of Things Maker News
Smarter Serial Communications with WiSer

Surely youโ€™ve been there: you need to capture serial output from a microcontroller or other device, so you reach for a PL2303 or CP210x or FT232RL-based USB-to-TTL serial cable (if you can remember where you put the damn thing after you last used it!) andโ€ฆrealize you donโ€™t have the drivers installed on the computer you are using. After digging around on weird sites to find the particular not-latest-vintage driver version that works best on your OS (unless youโ€™re running Linux, where they all just work!), you do the TX/RX/GND dance, then realize youโ€™ve got TX/RX backwards, then realize that in fact you havenโ€™t, it just wasnโ€™t working before for some reason, but is now. Then you move back to your desk from your workbench and realize thereโ€™s no space for the board here and no way to power it, soโ€ฆyou juggle your laptop in your one hand back at the bench while trying to read the serial output that brought you here in the first place. At least thatโ€™s how you used to โ€“ hopefully now, you are not just older, but also have WiSer.

WiSer is a pair of open-source, wireless serial dongles, which aim to eliminate all of the hassles relayed above, and many more. For starters, there are no drivers required: just plug the WiSer-USB host into your USB-C port, and you are good to go on Windows, macOS, Linux, or even Android. The WiSer-TTL client can then be powered by USB-C, header pins, or castellated pins (if you pop the case off). From there, the pair act like a normal serial cable; an LED indicates their connection, and Tx/Rx activity is indicated by corresponding LEDs on each end throughout the session. To be more accurate though, they act like a normal serial cable, sans the cable itself โ€“ meaning your project can be sitting on your workbench, while you and your computer monitor it from your desk โ€“ an ESP32-S2-based Wi-Fi connection between them allows distances of up to 20 meters (line-of-site in ideal conditions) between your target.

To put the WiSer pair through their paces, I connected the host to my GPD Pocket 3, fired up PuTTY, andย  connected the client to the ground and serial pins (GPIO 14 and 15) on a Raspberry Pi 400. The reason for selecting this target is that Iโ€™d not need to write custom firmware in order to test the serial functionality as with an Arduino or similar, and the fully-fledged computer would give me a lot more visibility in the case of any issues, rather than trying to figure out what was going on with a serial-monitoring solutionโ€ฆwithout having serial to debug it. I wrote a quick Python script to output โ€œhello from WiSerโ€ and then an incrementing integer value on the Pi serial, and thenโ€ฆnothing happened. Too many unknowns, probably โ€“ maybe my script is wrong, or I didnโ€™t do all of the things required on a Pi 4 to enable serial communication? Maybe the dongles arenโ€™t paired, even though the LEDs suggest a connection is being made? So I grabbed a PL2303-based cable andโ€ฆwasted a ton of time trying to find drivers for Windows 11, with no luck. Then I grabbed an FT232RL-based cable, installed the drivers, andโ€ฆgot some garbled serial output. I restarted the script and Putty, per the old turning-it-off-and-on adage, andโ€ฆit suddenly started working! Yay! So now that we know Putty, the script, the Piโ€™s serial port etc. are working, letโ€™s swap our cable forโ€ฆWiSerโ€™s lack of cable! And it worked perfectly! Iโ€™m not even sure why it didnโ€™t the first time โ€“ probably a mix-up with that old TX/RX dance or something not quite connected or initialized in the right order โ€“ but it immediately started working perfectly with no cables, and I started doing that magicianโ€™s-trick-style waving of arms to demonstrate to myself that there were no strings attached! I then began wandering around to see what the range was like, and managed a good 20-30ft line-of-sight before โ€œhello from Wiserโ€ started dropping sequential digits. Using something other than just RX/TX at 115200 baud 8-N-1 could probably have provided a better outcome there too, but this was sufficient for my initial shakedown.

WiSer is one of those tools that you never knew you needed, but canโ€™t imagine living without once you have it. Iโ€™m already thinking of all of the exciting use cases it will enable, like monitoring sensor data from a wearable device using an Android phone (via USB-OTG and the UsbTerminal app)! Plus, ya know, just getting some quick serial output on a computer youโ€™ve not already installed every USB-to-TTL driver known to humankind on! Magic!!

WiSer is currently crowdfunding on Crowd Supply.

Tagged

David bought his first Arduino in 2007 as part of a Roomba hacking project. Since then, he has been obsessed with writing code that you can touch. David fell in love with the original Pebble smartwatch, and even more so with its successor, which allowed him to combine the beloved wearable with his passion for hardware hacking via its smartstrap functionality. Unable to part with his smartwatch sweetheart, David wrote a love letter to the Pebble community, which blossomed into Rebble, the service that keeps Pebbles ticking today, despite the company's demise in 2016. When he's not hacking on wearables, David can probably be found building a companion bot, experimenting with machine learning, growing his ever-increasing collection of dev boards, or hacking on DOS-based palmtops from the 90s.

Find David on Mastodon at @ishotjr@chaos.social or these other places.

View more articles by David Groom
Discuss this article with the rest of the community on our Discord server!

ADVERTISEMENT

FEEDBACK