I have an issue where i have connected my linux server to a serial port. There is a continous flow of data from serial port which comes through epabx.
In Minicom i get first call's data and from second call it goes offline.
I dont see any data.
Can some one help me on this.
Thanks for all the help given by you. Finally i have got the error solved.
God knows how i started getting the data.
But still i am listing the steps i performed to get correct data.
Sometimes data from serial port wont be capturing in the processing form application.
It may be because of the following issues.
1.Serial port not connected properly.
2.Serial port cable not working.
3.Some pins on serial port are damaged or connection lost.
Note: For above all reasons contact the client person or person in charge of epabx systems.
4.Data not getting displayed on hypertiminal.
This is a common issue in linux which uses minicom as hyperterminal.
Sol: Check the version of the minicom before running it on linux. If the version is minocom 2.1 then some process would be blocking the incoming data.
Uninstall minicom 2.1 and reinstall minicom 2.0
It is said that gate 8 process would block the incoming data.
minicom may be responding to control characters in your data. I'd recommend something simple but effective like
od -t x1 -t a /dev/ttySomething
to dump your data in both hex and as text.
You should also check that your port settings are correct i.e. bitrate, parity, stop bits, flow-control. Sometimes, when your settings are not correct, you will end up with weird results. Also, you need to check that your protocol is only sending texts as Carl mentioned.
Related
I want to connect the UART-Port of our central heater to my ProxMox-Server (LXC - Debian) over Web with Virtual Serial Port.
I bought this: https://www.aliexpress.com/item/4000945033185.html and connected it to the central heater and is reachable in the local network.
Since I have never done something in this direction I'm not exactly sure how to set up the connection and I hope someone can help me.
In the Web-Interface of the device, I can set up different protocols (see screenshot).
Thank you for your help.
You need to know more about what the heater is writing and expecting on the serial port. Did you select the right serial baud rate for it?
Have you read the EE-10 IOT_Device_Series_Software_Funtion_20200623 guide (in Downloads tab)? One possibility for further debug is to select the telnetd mode and connect from Linux with telnet to the IP address of the device, default port 23. (Ensure your Linux firewall allows this).
It seems it should ask for login and password, as in the web page. Then you might get an EPORT> prompt which is the EE-10 cli. Enter Exit to enter transparent mode when what you type is sent directly to the heater, and what you see comes from the heater.
I've been using the following format for sending AT commands from the Application processor (AP) to the modem subsystem:
cat /dev/smd7 &
echo -e "ati\r" > /dev/smd7
It has always worked but I never realized where's /dev/smd7 port coming from. After looking up online, looks like it's referring to the port used by Radio Interface Layer (RIL), but how does one confirm it?
I have lately started getting timeout issues and I'm starting to wonder if the port may be incorrect or might have changed
read error: Network dropped connection on reset
Note that AP is running linux
Edit:
Looks like the modem keeps rebooting hence the read error. But it seems to happen after running the two commands above
I'm trying to connect to a BTLE device from Linux from C++ with BlueZ.
Connecting to most devices works fine, but there is a special device which times out with 90% probability. From a standard Android smartphone the connection to this particular device works as intended.
For #Emil's advice in my other question (thanks!) I've setup a Link Layer sniffer tool for further investigation.
During the sniff period I tried connecting to the device(Destination) from both device(Good) and device(Bad).
Device(Good) is working perfectly - it connected
Device(Bad) is not working - timed out
Now I have a Link Layer data of both device connection trials and there is one significant difference between their trials:
Device(Good)'s LL Data for its CONNECT_REQ uses 500 for Timeout value (which is 625ms) while Device(Bad)'s LL Data in CONNECT_REQ uses 42 (which is 52.5ms).
I think Device(Destination)'s response is normally (mostly) arriving between those two, ie after 52.5ms and below 625ms, but sometimes it arrives in less than 52.5ms, and then also BlueZ can connect to it finally.
Is there any possibility to change this Timeout property for CONNECT_REQ in BlueZ? Maybe with setsockopt by any chance?
Or this is something hardcoded into kernel, even for bluetooth adapters attached to USB?
I have connected Huawei USB UMTS modem (E220) to my Linux box, i.e. RaspberryPi.
Now I get 2 ttyUSB port available to communicate to it, where I use ttyUSB0 to establish mobile Internet connection and ttyUSB1 for other tasks, like sending and receiving SMSes, checking status and error codes, make modem configurations, etc.
At regular intervals (2secs) I get this AT command on port ttyUSB1:
^DSFLOWRPT:n,n,n,n,n,n,n
which I fully understand (link: thanks to the user user ginggs from http://mybroadband.co.za). Less frequently I also get ^BOOT command, looking like this:
^BOOT:12659389,0,0,0,58
Can someone explain what those numbers in ^BOOT mean? Can I make notifications/warnings in ^DSFLOWRPT and ^BOOT be less/more verbose (something like "errors on/off")?
[edit]
Added link for understanding the ^DSFLOWRPT command.
In AT Command Interface Specification, Huawei mention that ^BOOT unsolicited command only for the Huawei specified client, nothing specific.
You can disable all unsolicited result by the following AT command:
AT^CURC=0
To enable it back just change 0 to 1:
AT^CURC=1
I'm trying to make an application level firewall for Linux , but for now i could only tell stuff like ip address , port number.
Is it possible to know which program send the packet ? If i don't need to place a kernel module.
Thanks !
Not at this time. The three cases:
input paath: The socket lookup has not been done yet by the time xtables runs
forward path: There obviously is no local socket
(local) output path: Neither the process info nor the socket info is passed onto nf_queue, though there was a patch proposed but has not received much attention.
I think it may be possible to use a netfilter mark on the packet (in a rule which runs before the NFQUEUE) and retrieve it with nfq_get_nfmark. I've not tried it and I don't know if it would work.