Red dot in Web socket sent message, cannot copy what is it? - websocket

I'm looking in Chrome dev tools at a WS connections for a chat app and all sent messages have a red dot. I cannot copy the red dot, it is on the second line with new line active. Never seen this in a WS connection.
What is this red dot?

Related

Huawei Cdma Modem, How can send sms via C# App OR AT command

I've huawei EC156 cdma modem, I tried to send SMS via AT commands with many commands, But always received response "command not support".
I have used the following commands:
1- AT+CMGS
2- AT + GWWC
Also, I didn't find any C# Libraries dealing with cdma modems.
You definitely need to check the AT commands user manual of your device and check their syntax.
AT+CMGS has two different modes:
in PDU mode its syntax is AT+CMGS=<PDU>
in text mode it is AT+CMGS=< dest phone number>
In both cases AT+CMGS is wrong, and operation not supported is the error you get for a wrong syntax (after setting verbose error mode with AT+CMEE=2).
There are plenty of questions showing the correct AT commands sequence required to send an SMS, for example this one.
I summarize that sequence here briefly:
Some things ti check before starting:
Make sure that the SIM is inserted
Make sure that the PIN code has been correctly inserted (by issuing AT+CPIN? you have to receive the READY response)
Make sure that the device is correctly registered to the network (by issuing AT+CREG? you have to receive the +CREG: 0,1 response)
Then:
Switch to text mode by issuing AT+CMGF=1
Tell to the device the phone number you want send the SMS to, by issuing AT+CMGS=<PHONE NUMBER>. The device will output the > prompt character
Write your text
Close the SMS by providing the Ctrl-Z character (0x1A ASCII code)
On success, the response +CMGS: <N> will be displayed, with N in the range 0-255 meaning the progressive ID of sent messages

AT+CMGS - Can not excape text input mode

I am using PuTTY to connect to an industrial cellular router , to send SMS via AT-Commands.
In PuTTY, I select Telnet and connect to the IP-Address of the router on port 23:
Router loging: root
Password: ****
# gsmat ATE1 // turn echo on
OK
# gsmat AT+CMGF=1 // switch to text mode (0 = PDU mode)
OK
# gsmat AT+CMGS=\"0664XXXXXXXX" // "tel. number"
> Test message [ENTER] // new line (expected)
> [Ctrl-Z] // nothing happens, also with Alt+0026, etc.
> [Ctrl-D]
> -sh: syntax error: unterminated quoted string
#
I normaly the SMS should send on Ctrl+Z (according to documentation, forums, etc.), but nothing happens.
So i tried the following:
ASCII code: [Alt+0026] for substitute (Ctrl+Z), nothing happens, also with Hex: 0x1A
Copy and past [SUB] from Notepad++, nothing happens (copy and paste normal text into PuTTY works fine)
[Ctrl-Y] as suggested in some forum, maybe because german keyboard layout (also nothing happens)
[Ctrl-D], syntax error, input escapes, but of course sending failes
I also tried different tools like Hyperterminal, SSH from CMD, Hercules tool, ...
Has anyone an other idea how to escape this text input mode in this situation?
My goal is to send an SMS autmatically via an C# service and there I just add (char)26 to my input and it works.
inputString = message.Length > 160 ? message.Substring(0, 160) : message;
inputString += (char)26;
connector.Write(inputString);
Any suggestions are appreciated
Screenshot: PuTTY connection settings
Screenshot: PuTTY terminal input
What I do is send SMS via PDU mode. It's a little more effort, but much better for automatic SMS sending.
According to several Internet sources, such as this one CTRL+Z is a shortcut that makes you
Put whatever you are running into a suspended background process. Type fg to restore it
which seems exactly what you are experiencing: CTRL+Z character is actually never sent, and that's the reason why the modem never sends its response.
As far as I know, sending ASCII 0x1A (decimal 26) should be correctly recognized by PuTTY. But since you already tried it there must be some other issue, and a different attempt has to be done.
Fortunately, process suspend feature can be disabled: as shown in PuTTY user guide that functionality is called Keyboard sends Telnet special commands.
In order to disable it:
Open PuTTy Configuration
Category Connection -> Telnet
Unflag Keyboard sends Telnet special commands option
It seems the problem is associated with the SMSC number.
AT+CSCA="+SMSC number"\r\n solved the problem

JMeter TCPSampler - how to handle a custom protocol with a periodic keep alive?

I am relatively new to JMeter however I have been doing Performance testing for almost a decade.
I am working with a proprietary TCP protocol that sends a keep alive periodically - through the existing TCP connection.
I am struggling to understand how I can fork the JMeter 'thread group' to handle a TCP Keep alive received over the same TCP session.
Any ideas?
Thank you brainstrust!
edit: I'm using the TCPsampler and have read the help page. I'll try to provide some more detail shortly about what's happening and how the protocol is written.
edit2: Unfortunately because it's a propriety protocol I cannot reveal the exact nature of the protocol itself but it's largely irrelevant to the problem I'm facing.
Basically, I use the 1st TCP sampler to 'start/authenticate' the session with the server. This is configured the following options:
1. TCPClient classname: LengthPrefixedBinaryTCPClientImpl (my protocol is implemented this standard way)
2. Re-use connection ON.
3. Close connection OFF.
4. Set NoDelay OFF.
5. SO_Linger: nothing
6. Text to send: my hex code for the protocol (this is correct)
I get the response from the first TCP request and then I want to start interacting, however in the session, the server sends a keep alive mid-stream, so occassionally when I send a request, I get an unexpected keep alive response instead (it's an open stream of data).
This is what I would like to solve.
I attempted to use a recursive test fragment, so that on KeepAlive response, it would send the request again however one cannot recurse the test fragments (it throws a Java error on Run attempt).
I hope this gives more context! Thank you for your patience (I'm a newbie SO user!)
Please check the below options if it helps with you sceario:-
If "Re-use connection" is selected, connections are shared between
Samplers in the same thread, provided that the exact same host name
string and port are used. Different hosts/port combinations will use
different connections, as will different threads. If both of "Re-use
connection" and "Close connection" are selected, the socket will be
closed after running the sampler. On the next sampler, another socket
will be created. You may want to close a socket at the end of each
thread loop.
If an error is detected - or "Re-use connection" is not selected - the
socket is closed. Another socket will be reopened on the next sample.
The following properties can be used to control its operation:
tcp.status.prefix text that precedes a status numbertcp.status.suffix
text that follows a status numbertcp.status.properties name of
property file to convert status codes to messagestcp.handler Name of
TCP Handler class (default TCPClientImpl) - only used if not specified
on the GUI
For more details:-https://jmeter.apache.org/usermanual/component_reference.html#TCP_Sampler

Telnet client negotiation not working properly

I am designing telnet client, which negotiates telnet options. I send desired commands to server, and process server's requests and responses. But at least color terminal identification has no effect: remote Linux server continues sending data without color ESC sequences until I explicitly tell it (through its dialog) that my client supports color.
However windows telnet and hyperterminal is being fed by the color information just after telnet negotiation, and I am looking for what they do I do not. Here's what I see:
telnet
hyperterminal
I see that server performs 255 cursor right and 255 cursor down, and then requests cursor position report, and client reports ESC [ 24;80R (which is correct), and just after this server starts color communication.
Here's what my client does
It does not have ESC [ R command supported, and does not respond for reporting cursor position. I must say that server seem to wait for several seconds for something exactly at the time when it performs these right/down cursor movements.
If it the issue why I do not have color data from the server, or there's something else you can see in the operation of my client?
Interesting that I have a video of another client which also is not expected to support ESC R command, but I see server starts sending ESC color codes after negotiation. So I have a feeling that it may not be this cursor report command issue.
Answer: after implementation of the "report position" response of the client to the server, server sends ESC color sequences now. Thus this functionality was vital for the general client-server handshaking.

Chrome Developer Tools: How to Read the Network Panel?

I am trying to make sense of the Chrome Developer Tools when I run performence tests on my websites. If you select Network on the tools meny it will look like this:
Then if I select the performance file I will have this information:
My question is this:
What is the meaning of DNS Lookup, Connecting, Sending, Waiting and Receving? What is happening between the server, network and browser at each stage?
On the first image, the red line reads "Load event fired" and the blue one reads "DOMContent event fired". What is the meaning of this and why is it the DOMContent event is fired after all the content has been loaded?
Answering part II:
The Blue line (DOM content loaded event): It happens when the browser finished parsing the main document.
The Red line (Load event): It happens when the browser finished retrieving all the resources required by the main document.
After the red line: Here you will see loading of asynchronous and cached resources required by the main document and by other resources.
I'm not sure if this is a good fit for SO as this is a network question more than a programming question but I'll answer the parts I can...
DNS Lookup
When you connect to a website, it has to look up the IP from the DNS. For example, your computer will contact a DNS asking if it knows where "google.com" is. If it does, it'll give you an IP. If it doesn't, it'll either give you the IP of another DNS or it will contact that DNS itself (I'm not sure which implementation applies where) until eventually you end up with the IP of the host you're looking for.
Connecting
Time it takes to connect with that IP. I'm not sure of the details here.
Sending
After connecting, you send the request to the server. It can be a request to view a page or submit data or anything.
Waiting
After sending your request, you wait for the server to respond to it. It can be busy or might take a while to process whatever you requested.
Receiving
Once the server has processed your request, it'll send data back to you.
Here is a description by Google:
https://developers.google.com/web/tools/chrome-devtools/network/reference

Resources