tcpser
tcpser copied to clipboard
AT parser error?
Just now that i had someone reproduce some things with a real modem... i noticed i have been using an invalid "modem init" with tcpser all the time:
tcpser -r -p 6400 -S 300 -v 25232 -l 4 -tmM -i"s5=20 s0=1"
That init string does not work, a real modem would just produce an error on ats5=20 s0=1 s39=1
- if i recall correctly the register assignments (or any other commands) must be concatenated using &
, not separated by spaces. I'd expect tcpser to require this as well - ie the above string should produce an error, somehow, instead of silently work.
@go4retro Are you on vacation? :) Can you at least confirm this is a bug? Or are Modems allowed to use spaces in the string too? Would be good to have this behave as close to the real deal as possible...
A real modem won't produce an error with a space between the parameters. "&" is NOT a concatenation operator, it's a character used to specify extended commands - for example, AT&C0 (or AT &C0) in many US Robotics modems would set the carrier to high, regardless of whether or not the modem was connected. (AT&C1 would allow the carrier detect to follow what the modem state was).
My apologies. I had hoped to test out my Hayes SmartModem to verify, but have not had a chance.
But, I will say that the at strings are handled very permissively, as I do not support all the various % and & type parameters. In fact, I silently parse and ignore many of them, to cut down on the amount of tweaking folks have to do in existing apps.
A real modem won't produce an error with a space between the parameters. "&" is NOT a concatenation operator, it's a character used to specify extended commands - for example, AT&C0 (or AT &C0) in many US Robotics modems would set the carrier to high, regardless of whether or not the modem was connected. (AT&C1 would allow the carrier detect to follow what the modem state was).
I wondered about that. Sadly, my test Hayes modem went belly up when I tried it, so I need to get the other one from the stash.
A real modem won't produce an error with a space between the parameters.
That was exactly the reason for why i reported this - i used the commandline as in the above post for testing with tcpser, and then told someone to use "ats5=20 s0=1 s39=1" with his modem, and that did NOT work. And that is what i think should be avoided, ie tcpser should strictly behave as a real modem :)