Serial connection in place of wifi, challenges
Moderators: grovkillen, Stuntteam, TD-er
Serial connection in place of wifi, challenges
I have a Wemos d1 mini module that is struggling with wifi connectivity. There is a Raspberry Pi next to it which is doing fine. I thought I could simply hook up the Wemos to one of the Pi's USB ports and parse the serial output. I direct GPIO/UART connection does not work in my environment. I would like to use the USB connection for power and communication. This leads to two challenges:
- It seems that each plugin logs data differently. Is there a more standard way? I looked at rules to translate sensor input put it seems there is no way to write to serial. (I already use rules to create nice JSON MQTT payloads.)
- It seems the Raspberries I tried it with (with the latest buster, a tad older stretch) can't communicate with the CH340 chip. It is recognized but minicom shows no chatter. Do we still need to compile drivers or am I missing something?
Any constructive input is welcome.
- It seems that each plugin logs data differently. Is there a more standard way? I looked at rules to translate sensor input put it seems there is no way to write to serial. (I already use rules to create nice JSON MQTT payloads.)
- It seems the Raspberries I tried it with (with the latest buster, a tad older stretch) can't communicate with the CH340 chip. It is recognized but minicom shows no chatter. Do we still need to compile drivers or am I missing something?
Any constructive input is welcome.
Re: Serial connection in place of wifi, challenges
The logs were never meant to output data, but more for diagnostic needs.
But I guess what you're looking for is a new kind of controller that can output data to serial in some formatted way.
Something like this:
tasknr, pluginID, nr_values, val1, val2, val3, val4
And then either in CSV notation (e.g. ; as separator), or some other format.
But I guess what you're looking for is a new kind of controller that can output data to serial in some formatted way.
Something like this:
tasknr, pluginID, nr_values, val1, val2, val3, val4
And then either in CSV notation (e.g. ; as separator), or some other format.
Re: Serial connection in place of wifi, challenges
Yes, CSV or JSON would work. I'm ready to write something that can parse the output of my three sensors so standardized output has less priority for me. I haven't checked yet if CMDs for my RGB LED are read from the serial input but that is also something I can work around.
The bigger challenge is that serial communication via USB doesn't seem to be working with the Wemos's chip.
The bigger challenge is that serial communication via USB doesn't seem to be working with the Wemos's chip.
Re: Serial connection in place of wifi, challenges
If you try to power the ESP from an USB port on a Raspberry Pi, then I would not be surprised about it.
Try to use a powered USB hub.
The ESP may take quite a big power surge when connecting to WiFi. Wouldn't be surprised if that would set the Pi into some error state.
Re: Serial connection in place of wifi, challenges
Any chance your Wemos WiFi shows a reasonable RSSI value, but it's experiencing browser access problems (slow page loading and/or timeouts)? Or too many disconnect/reconnects?I have a Wemos d1 mini module that is struggling with wifi connectivity.
If the answer is yes, then see the tail end of this discussion:
viewtopic.php?f=6&t=7474#p42805
- Thomas
Re: Serial connection in place of wifi, challenges
Thanks for the hint but I don't think this applies. The module was working fine for several months. I now changed my wifi setup and it seems that now the signal is not strong enough. A serial connection would also help with troubleshooting
Re: Serial connection in place of wifi, challenges
Thanks for the remark. I measured it, the Pi supplies enough power for the module. I have the suspicion that it is the USB/serial interface which is causing issues.
Regrettably, I can not use a recent default image since I am using an IR sensor the plugin for which is not in the default images with the temperature and light sensors and the RGB LED I am also using. I compiled my own image in the past but my build environment abandoned me together with the hard drive it resided on. It will be a while until I can build a new one. Then I plan to use a Wemos d1 pro which should have better connectivity with its ceramic antenna.
Re: Serial connection in place of wifi, challenges [SOLVED]
I figured it out. It was rather simple. I used minicom for serial communication and one flag made the difference. I wrongly used '-d /dev/ttyUSB0' rather than '-D /dev/ttyUSB0'. Next: writing a parser and disabling wifi.
Re: Serial connection in place of wifi, challenges
Don't have a cable to connect your computer to the network permanently? That would solve many of your problems.
Re: Serial connection in place of wifi, challenges
That's a spammer.
Typical clues:
- Reply to an old topic, with a hardly on-topic reply
- Post count is very low
With the info I can see as admin:
- Email is listed on stopforumspam.com
- IP is listed on stopforumspam.com
Incentive:
- Post a reply which is not deleted by some admin
- After a while alter text in the post to link to some site to let Google think it is a reliable site
Typically I delete about 20 of those accounts per week.
Typical clues:
- Reply to an old topic, with a hardly on-topic reply
- Post count is very low
With the info I can see as admin:
- Email is listed on stopforumspam.com
- IP is listed on stopforumspam.com
Incentive:
- Post a reply which is not deleted by some admin
- After a while alter text in the post to link to some site to let Google think it is a reliable site
Typically I delete about 20 of those accounts per week.
Re: Serial connection in place of wifi, challenges
Yep, those spammers are quite predictable and extremely annoying.
Who is online
Users browsing this forum: No registered users and 21 guests