Keyboard Shortcuts
Likes
- Nodered-Hamradio
- Messages
Search
Re: How To : ser2net - Serial to Network Media Converter with a Raspberry Pi
toggle quoted message
Show quoted text
On Fri, Dec 23, 2022 at 10:36 PM Kyle K <kylekrieg@...> wrote:
|
How To : ser2net - Serial to Network Media Converter with a Raspberry Pi
Thought I'd share some my experiences with setting up the ser2net service on my raspberry pi to act like a USB/serial to network media converter.
I installed the ser2net service with one command : sudo apt-get install ser2net The config file is located at /etc/ser2net.yaml.? I removed almost all of the default config and started from scratch.? If you do this, save the original with sudo cp /etc/ser2net.yaml /etc/ser2net.yaml_old. %YAML 1.1
---
# This is a ser2net configuration file, tailored to be rather
# simple.
#
# Find detailed documentation in ser2net.yaml(5)
# A fully featured configuration file is in
# /usr/share/doc/ser2net/examples/ser2net.yaml.gz
#
# If you find your configuration more useful than this very simple
# one, please submit it as a bugreport
?
define: &banner \r\nser2net port \p device \d [\B] (Debian GNU/Linux)\r\n\r\n
?
admin:
? ? accepter: tcp,8000
?
connection: &nr8001
? ? accepter: tcp,8001
? ? enable: on
? ? connector: serialdev,
? ? ? ? ? ? ? ?/dev/ttyACM0,
? ? ? ? ? ? ? ?38400n81,local
?
connection: &nr8002
? ? accepter: tcp,8002
? ? enable: on
? ? connector: serialdev,
? ? ? ? ? ? ? ?/dev/ttyACM1,
? ? ? ? ? ? ? ?38400n81,local
Let's break down one of the serial to network configs connection: &nr8001 - this is the name of the connection.? I used nr for Node Red and the port number accepter: tcp,8001 - this is what protocol to listen on the network side and what port number to use to make a connection to the connector.? In the example, it's listening on tcp port 8001. enable: on - this is to enable connections connector -? this is the other side of the connection ?- serialdev - specifying a serial device ?- /dev/ttyAMC1 - this is the path to the device (I would substitute the full path here, check Dave WO2X's video on how to find the full ID path) ?- 38400n81 - this is the speed, baud rate, polarity and stop bits ?- local - specifying the device is local? The man page for ser2net calls out all the different connection types (there is a lot). There is bug in the bullseye distribution Raspberry Pi config and sometimes the ser2net starts up before the networking starts up, so we need to add the following lines in the /lib/systemd/system/ser2net.service file Add these two lines in the [Unit] stanza After=network-online.target
Wants=network-online.target
pi@elayerrack:/lib/systemd/system $ more ser2net.service
[Unit]
Description=Serial port to network proxy
Documentation=man:ser2net(8)
After=network-online.target
Wants=network-online.target
?
[Service]
EnvironmentFile=-/etc/default/ser2net
ExecStart=/usr/sbin/ser2net -n -c $CONFFILE -P /run/ser2net.pid
Type=exec
Restart=on-failure
?
[Install]
WantedBy=multi-user.target
pi@elayerrack:/lib/systemd/system $
After your done editing all the files, restart the service with sudo systemctl restart ser2net.service or?sudo service ser2net restart. Issuing the command netstat -l will show you all the ports your Pi is listening on.? Look for the TCP ports specified in your ser2net.yaml config file.? You should see something like the below (but more output). Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address? ? ? ? ? ?Foreign Address? ? ? ? ?State
tcp6? ? ? ?0? ? ? 0 [::]:8002? ? ? ? ? ? ? ?[::]:*? ? ? ? ? ? ? ? ? LISTEN
tcp6? ? ? ?0? ? ? 0 [::]:8001? ? ? ? ? ? ? ?[::]:*? ? ? ? ? ? ? ? ? LISTEN
tcp6? ? ? ?0? ? ? 0 [::]:8000? ? ? ? ? ? ? ?[::]:*? ? ? ? ? ? ? ? ? LISTEN
Active UNIX domain sockets (only servers)
Now you can replace the serial nodes with TCP nodes.? For example. There is a downside.? It's a 1:1 communication path to network to serial device, or at least my experience is every device I've tried.? Unless that's an advanced setting within the connection config in the yaml file, once a device is communicating through the ser2net service via TCP, no other devices can communicate to that serial device.?? Troubleshooting : if you telnet into port 8000 (the admin port) you can monitor the TCP or serial side.? Be aware anything you type will be echoed out to the screen.? Typing help at the command prompt will get you a list of commands.? 73 Kyle AA0Z ?
|
Re: Flex Radio Selector
开云体育Alan,
? This? it the dynamic node version and work very? well thanks to your nodes. AL, K0VM On 12/22/2022 4:12 PM, Al Groff via groups.io wrote:
|
Re: Flex Radio Selector
开云体育Alan,
? My flow? is at /g/nodered-hamradio/files/%211%21%20Flows%20by%20Type/RADIOS/K0VM%20Flows/Select%201ofN%20Flex%20radios AL, K0VM On 12/22/2022 3:51 PM, Al Groff via groups.io wrote:
|
Re: Flex Radio Selector
开云体育Alan,
? Here is what my Flexd radio selector looks like. AL, K0VM On 12/22/2022 10:58 AM, Alan Blind, WA9WUD wrote: I need help testing a new Flex Radio Select Flow. |
Re: Flex Radio Selector
开云体育Just a thought, ?if I start NR ?then open SmartSDR , the flows only show connected, the client (my call) does not work. ?I do a refresh on the browser and NR restart , still no good windows 10 .? But if I start the radio and SmartSDR first then ?start NR all works great, my call is there also, now If I connect via iPhone and desktop, that does not work ? ?Flex 6600 3.3 version. I tried doing a start up Node , timestamp node ? If interested in troubleshooting I can take video with the process. On Dec 22, 2022, at 9:25 AM, Nick M via groups.io <w7nik@...> wrote:
-- Nick W7NIK? |
Re: Flex Radio Selector
toggle quoted message
Show quoted text
On Dec 22, 2022, at 8:58 AM, Alan Blind, WA9WUD <a.alan.blind@...> wrote:
-- Nick W7NIK? |
Flex Radio Selector
I need help testing a new Flex Radio Select Flow.
Previous Flex Radio selectors used gate nodes to switch the Flex Connection nodes and the Discovery Packets, with each manually configured. I took a more straightforward approach using the "Dynamic" mode built into Stephen's Flex Nodes. The available radios will broadcast their nicknames in my flow, and I use that to build a pull-down selector. ?The selected radio connects that radio to Node-Red Flex Nodes. Pushing the "Disconnect" button disconnects the radio. Only the selected Radio's Discovery Packets are seen at the Discovery Packet Out link. I only have one radio, but I tested it with a "fake" Flex radio. ?Can some of you two Flex operators test my flow? The flow is attached. Alan. WA9WUD |
Re: Injecting a Hex Value
开云体育Looks like your flows is expecting a line feed on input as Chris mentioned. Taking a look at the manual for the controller it appears you send a two byte word and get ?a two byte answer, so you might need to change the input to a fixed length of the two byte word. ? Here’s a link on working with buffers. You can follow the examples to inject the ASCII A? and have it converted to a buffer before being sent to the controller. The response should be Ax where x is the actual antenna number. https://stevesnoderedguide.com/understanding-buffers-node-red 73 Dave wo2x ? ? From: [email protected] <[email protected]> On Behalf Of Kyle K
Sent: Wednesday, December 21, 2022 5:09 PM To: [email protected] Subject: [nodered-hamradio] Injecting a Hex Value ? I've been working on this WA4MCM controller and have a few issues.? Hopefully someone can help me.? After installing a new USB port on the back of the unit and the PI actually seeing the unit, now I'm to the point of trying to get data out of it.? const bufferText = Buffer.from('A?', 'utf8') const text = bufferText.toString('hex') msg.payload = text return msg; Any ideas on what I might be doing wrong??? |
Re: Injecting a Hex Value
I'm not sure, but here is a thought. Is the serial receive node waiting for the split char? It looks like '\n' is configured but the protocol doesn't send a newline. On Wed, Dec 21, 2022, 4:08 PM Kyle K <kylekrieg@...> wrote:
|
Injecting a Hex Value
I've been working on this WA4MCM controller and have a few issues.? Hopefully someone can help me.? After installing a new USB port on the back of the unit and the PI actually seeing the unit, now I'm to the point of trying to get data out of it.?
I've got the flow basically written, but I'm having issues injecting a hex value into the device as it's not responding. Device says it's connected, and I'm using "by-id" full path per Dave's video tutorial.? Here is the info on the Hex values. I'm injecting the following with no luck. A string (A?) A buffered Hex String of hex values? Tried converting the sting to hex and injecting.? Still nothing.?? const bufferText = Buffer.from('A?', 'utf8')
const text = bufferText.toString('hex')
msg.payload = text
return msg;
Any ideas on what I might be doing wrong???73 Kyle AA0Z |
Streamdeck halts after several pushes on the buttons
开云体育Hi, ? We are having problems with the combination Stream Deck XL and Node Red on a Raspberry Pi 3b. We like to use the Stream Deck? to select beverage receive antennas and a 9 circle array. ? The Raspberry Pi has in our test situation 8 relays on GPIO ports and each relay a has a switch in Node red. To have it working with the Stream Deck ?each of these 8 switches has an http-in node and a Change node to set the Payload to 1. ? On the Stream Deck using the website plugin (GET request in background) which switches the relays fine. Works also fine when using the Rest Call 1.2 plugin. Pushing a button on the Stream Deck or the switch on my PC screen switches the relays fine. For this to work I used example flows from Alan. There is no feedback to the Stream Deck. ? The problem is that after switching (every second) between the buttons on the Stream Deck accessing the relays (through Node Red) it stops working after 12 times pushing a button when using the website plugin on the Stream Deck. Even quicker when using the Rest call plugin. Then it becomes slow after 5 or 6 buttons pushes and the Stream Deck halts. ? The switches in Node Red on the screen still work fine and pushing them a 100 times does not give any problem. When the Stream Deck halts I do not see using a Debug node anything coming in anymore from the Stream Deck. Making it all work again I change the Profile on the Stream Deck to another one and switch back and all is fine again for a few pushes. ? Updated the Stream Deck to the latest firmware (1.01) and software(6.0.1.17732). The utilization of the Stream Deck seldom goes higher the 10-15%. ? Anyone any idea how to solve this. What to check. ? Looks like a Stream Deck problem but no clue what I’m doing wrong or how to solve this. ? Your help is very much appreciated. ? 73’ Thomas and Timon PA1M & PA1T ? ? |
Re: How to change default name for FTDI USB serial node to use cable ID
开云体育Thanks Dave Great video. I added it to my site so I can use it again. 73, VE7TIT Shanta On 2022-12-18 19:42, Dave wo2x wrote:
|
Re: How to change default name for FTDI USB serial node to use cable ID
toggle quoted message
Show quoted text
On Dec 19, 2022, at 9:34 PM, Jerome K8LF <da2sv@...> wrote:
|
Re: How to change default name for FTDI USB serial node to use cable ID
? I am new to NodeRed just a few days and have my HyGain Rotor EZ-Rotor working in a dashboard.?? Thanks to contributors.??? I was able to follow your video and resolved how I would identify my RS-232 to USB adapters. ?
? 73s? /Jerome /K8LF? |
Flex Radio Auto AGC Flow.
I have been working on a flow to adjust the AGC Threshold setting automatically.
I followed Tim's paper on the topic: ? Here is a link to a You-Tub of the latest version of the ?flow in action: We have a group of "testers" giving suggestions on how to fix bug reports. ?I will upload the flow in a few days. Alan. WA9WUD |