Serial begin with ssc-32

I emailed Andrey, the author of the first router bot thread on the forum. I hope he can help you…

I appreciate it gratefully.

The project end point really isn’t important in determing why touching a jumper between a tx pin and an rx changes something from not working to working. I’d keep the trouble shooting limited to the below two components and using the “ver” as the test string.

a - WRT54GL router.
c - SSC-32.

I think the rx pin on the router is floating, possibly interfering with the router’s ability to read incomming data. Might explain the pages of jibberish seen in previous post, but now apparently corrected.

questions:

1.) does the router have a UART with an input buffer, or does the router use some type of “bit catching” routine within the Linux program?

2). what is the measured voltage between the tx and rx pins prior to and after the jumper touch? Does putting the multimeter between the pins to measure voltage have the same effect as using the jumper to reset the rx line?

3). What is the voltage between the tx/rx lines and ground, both before and after the jumper touch?

4). Assuming the jumper touch between the pins has enabled the data input from the ssc-32, what event preceedes the next required jumper touch (router reboot, data send/request to the ssc-32, data send/request to the Arduino, etc,).

multimeter between… same effect:
No! It happens like a kind of “data flushing”. I.e. (sorry that I mention it again) Arduino just by connecting pins works ok, but for SSC-32, I “flush” some stacked data on the router as Simply shorting is NOT ENOUGH:

  1. I short RX-TX of router (with nothing in between them, on the bread-board)
  2. I have two consoles opened and lunched into the router by ssh, in one of them I issue:
    cat < /dev/tts/1
  3. in the next I issue:
    echo ‘hello’ > /dev/tts/1
  4. I get this screen shot, in which there is a lot of empty space, so that I cut out the space (1, 2, 3 and 4 parts output).
  5. I ctrl+c and “clear” my screens, setup regular pinout (SSC-32 SERIAL PORT<----> WRT54GL SERIAL PORT) and issue:
    a) in one console: cat < /dev/tts/0
    b) in the other one: echo ‘A’ > /dev/tts/0
    c) I get this screen shot (consider the empty space still exist):

    as you see, I get right respond now from the ssc-32. Those 0 and 1 are coming from the TCRT5000L-infrared-reflector connected to ‘A’ on the ssc-32. When I rotate the coded-wheel on which the sensor is fixed, it switches to 1, where white is, i.e. working as expected. You see, after this process everything works fine, but why should I need it with ssc-32, where arduino does not need it? the logic to me in this case is the communication is started in the firmware of ssc-32 in a way that caused this. Where in the arduino I have my simple sketch as you saw, and it doesn’t need shorting the router TX-RX. I know I may be wrong in this, but nothing else comes to my mind. I did now this experiment more than 20 times in these days, and every time it behaves the same way with both my routers having different firmware (WhiteRussian, Kamikaze) and using different ports (serial 0, serial 1). I tried everything I could think of, but I am also going to once do this experiment with a PIC16F877a to see what happens.

(I’m preparing answers for your other questions too).

:bulb:

For the first time since you have started this thread I finally understand what you are meaning when you say you short tx and rx together on the router. So it wasn’t a loop back test, you aren’t unplugging anything, you are just shorting them on the breadboard with EVERYTHING STILL CONNECTED. :open_mouth:

If the SSC-32 receives a query it WILL transmit a response. Nothing on the outside world would have any effect on the SSC-32’s right, permission, or ability, to bang these values out the serial port. For some reason the router is treating the reply from the SSC-32 differently than your processor.

Well, I misled you.

It indeed is a loop back:

  1. I have:
    ssc-32________________router
    RX…TX
    TX…volt-divider…RX
    Gnd…Gnd
    and it is NOT functioning (I query ‘A’ and I don’t receive any answer)

  2. I open up this wiring, and in a different and free part of the bread board:
    router____________router-itself
    RX…TX

  3. I issue a simple echo in this loop back:
    echo ‘hello’ > /dev/tts/0

  4. I get a bunch of stacked data.

  5. I return to the same wiring in (1).

  6. I repeat the query with ssc-32:
    echo ‘A’ > /dev/tts/0

  7. I get the right respond! from now on everything will work ok.

Please don’t be frustrated with me, if my English is not good enough to let me to give as accurate info as needed. I am trying hard!

This is Mike, the SSC-32 developer. Jim asked me to chime in with ideas on this.

If I understand the above description, the following sequence occurs:

  1. Initially, the terminal window does not show any reply from the SSC-32 to queries;
  2. The SSC-32 is disconnected from the circuit;
  3. The router’s TX and RX are shorted together (invisible to the SSC-32);
  4. Some messages are sent from the router, and appear in the terminal window due to the loopback;
  5. The TX/RX short is removed;
  6. The SSC-32 is reconnected;
  7. Now the terminal window shows replies from the SSC-32.

Did I understand correctly?

In the above sequence, all the SSC-32 sees is that it is disconnected and reconnected. It doesn’t know about the shorted TX/RX, since that was only done on the router side.

The router, on the other hand, does see the short between TX and RX. It seems more likely to me that the above sequence causes a change to the router’s behavior than the SSC-32’s.

The behavior when you substitute an Arduino instead of the SSC-32 is still a mystery. I can think of 2 things that are different between the Arduino test and the SSC-32 test:

  • The response from the Arduino is different (returns “a is read!\n” rather than ‘0’ or ‘1’)
  • The timing of the response is different

In order to have a valid comparison, I would recommend changing the Arduino sketch to return exactly the same thing the SSC-32 does, just a single byte ‘0’ without a newline. The timing is harder to match exactly since we don’t know how long the Arduino takes to send its reply. But you can adjust the SSC-32 timing using the R1 and R2 settings to see if that has an effect.

The ultimate troubleshooting tool for an issue like this is a two-channel scope or a logic analyzer. Do you have the ability to directly observe the signals between the router and SSC-32?

Mike

Proud to have the help from the developer of this wonderful device.
Many thanks to Jim and others of Lynxmotion for the GREAT support they always maintain.

Absolutely.

I agree, and I’m very eager to know what this change is, that does not exist for Arduino. In a short time I’ll do this with a standard PIC to get free of the bootloader of Arduino too, toward a simpler setup.

This is part of the program I am developing to control the bot with Arduino. I altered it as you instructed, but at the first time I used “println()”, then removed it and repeated again. On the screen shot you see the Arduino sketch after removing “println()”. The neckEncoderPin is connected to a TCRT5000 sensor which is faced to a coded-wheel. I rotated the wheel by hand to get the 0 and 1’s. It is the neck of my robot.

Unfortunately I don’t have oscilloscope but I can ask from people who have it. Please instruct me and I’ll provide the technical information you need. (this will take some time, but I’m responsible and do all what needed to solve this thread).

I’ve suggested some trouble shooting with the router that might prove informative, but till it is done I’ll just speculate that the router rx line is floating high causing the router to have issues. The state of the arduino tx and ssc-32 tx when they start and operate may be different. If the arduino tx goes low (to ground) when it starts to transmit and between high bits, the router will be able to see the change in voltages. If the ssc-32 tx is at high impedance between bits with nothing to remove the voltage, the router rx line may stay high preventing the router from seeing any change in voltage. The touching of the tx and rx lines together probably makes some type of electrical change on either the router tx or rx lines (or both) that allows the router to see data and start its data collection. Not knowing anything about how the router serial port works or how the programming on the router imports the bits makes everything just a guess. I suggested putting a high resistance resistor on the router rx line to keep it low when not receiving data, but don’t know if it ever got tested.

Zoomkat, thank you for your support.
I didn’t forget about those question to measure rx/tx, I’ll soon publish information obtained.

For the moment, I’d like to mention that I have bought parts in double: two SSC-32, two routers, etc. so that to use for troubleshooting purposes. After this problem started, I opened a “brand new” router and tried it. So if the idea that rx line is floating high is right, then it is a design problem, as both routers have it. I can hardly believe such a design issue in WRT54GL (easily could be catched by the design team or revealed soon by professional users). Also, I tried with both serial ports of 0 and 1 in both routers and this yet with both my ssc-32 (I don’t have two arduino).

I tried to implement a software serial port to understand how Arduino handles the communication better, but failed. Source of information:
arduino.cc/en/Tutorial/SoftwareSerial
I modified it so that to have two serial ports, to get commands from router with one port (ordinary one) and send them to ssc-32 (by software port).
Do you think that a standard PIC must behave the same as Arduino in this setup, or SSC-32?

Could you please tell me exactly what “high resistance” (volt?-amp?) to obtain to try this idea?
I will do all of these tests, but I more support the above mentioned idea of Mike:

  • The timing of the response is different.

You would connect a high value resistor between the router rx line and the router ground. I would try a resistor value of 47k ohms or higher to prevent the rx line from developing a voltage charge on it. The higher the resistance, the less the impact on the rx communications.

Ok, but I still don’t see where to place this 47k ohm resistor in my voltage divider. You can see my voltage divider wiring in my answer to one of your posts in the first page. Could you please tell me, exactly where to put it? As I think it is not right to take 12k one out!

I’ve modified your pix below to show a 47k ohm resistor placed between the router rx line and the router ground.

Um, that’s just put the 47k and the 18k in parallel. Not likely to change anything.

Yes, after a second look, the rx is always tied to ground thru the 18k resistor, so the 47k probably won’t make any difference. I also notice tx0, tx1, rx0, and rx1, so I’m not really sure how he has this thing wired up. Is the arduino also connected to tx1/rx1, or is it tied to tx0/rx0? Which tx/rx pins are shorted to make the setup work? A lot of questions haven’t been answered, so I think I’ll take a rest on this one.

I mentioned before: I always “completely” replace one with the other, as Arduino is playing a role of toubleshooter only. I just repeat exactly the same scenario, with one or the other.

Well, the other thing to try is connect the 47k resistor between the tx and ground on the router like below. When your router boots up, there is electrical activity on the router tx line as indicated by the led activity on the ssc-32. This may be causing some issue.

Are these all TTL lines on the routers? Just checking.

Alan KM6VV

Router is functioning on LVTTL, but SSC-32 on TTL.

3.3v? Open collector? or totem-pole?

Alan KM6VV