Debugging serial communication

As I mentioned in the cellular thread, I’m having a whole lot of difficulty with my cellular module. I can send commands to it via it’s serial interface, but I am unable to receive anything. Is there anything I can do to test this? Not being a hardware guy I don’t really know where to start. any pointers would be great!

I would take this directly to seeed, but they’re down and this is the only other place I know of.

There is a new update driver that was posted on codeplex just yesterday. We are about to test and add to SDK.

Im pretty sure it’s not the driver. I am just not getting any data back over the serial interface at all. I have debugged this pretty thoroughly by hacking away at the driver itself (and even developing my own mini-driver for testing)

I will test the latest one, but I still don’t think that is it.

It is easy to test, connect RX to TX (loopback) and send a string and see if you get it back.

Hmmm…

Going off of: http://gadgeteer.codeplex.com/wikipage?title=Socket%20Type%20K

Connecting pin 4 (TX) to pin 5 (RX) would cause a loopback, but if I send a signal down pin 4 (TX) wouldn’t that just interpret the TX signal as an RX at the code level, and not actually loopback through the device itself? I don’t see how that actually tests RX, but rather TX, which I already know works, because I can send text/sms commands through that reach my regular cell phone just fine.

Welp, after some more trial and error and examination of documentation, I ripped apart one of my ribbon cables to troubleshoot this some more.

I stuck my voltmeter on pin 10 (ground) and pin 6 (RTS, module can send data) and powered up… 3.25 volts! just as I would expect… then about 3-5 seconds after power up it drops to 0.02v and never goes back to 3.3v again;

Pin 7 never loses the 3.3v which seems to fit with my “can only send, but not receive” symptoms.

Is this something I can control in the software? or even hardware? Can I just feed pin 6 3.3v to enable the RX channel or will that break something?

[EDIT]

Swapped out my spider with my hydra, and now im getting 3.3v on pin 6! but still no data incoming over the serial pipe :frowning: I’m very confused

Try another serial socket

@ Boogeyman
feeling your pain on this one…thankfully i’m not seeing the same problems as you with my cellular board. If it would be any help, I could test it for you if you are in the UK in the midlands on my Fez.

As you have said in the other threads the breakpoint you set in the CellularRadio code would definitely have come back with something. Gus’s suggestion sounds good, swapping the com port. Would that just be a case of changing the properties in the device manager?

Do not use the cell drivers to determine if your serial port is working. The driver itself may have problems.

I switched over the socket to a “U” type and removed the hardware flow control requirement. I can still send texts, but I’m still getting nothing back over the serial line. See debug output below


The debugging target runtime is loading the application assemblies and starting execution.
Ready.

'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\mscorlib.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Native.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Hardware.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Graphics.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.TinyCore.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\System.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Hardware.Usb.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\System.Xml.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Hardware.SerialPort.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Net.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\System.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Touch.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Ink.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Gadgeteer\Core\Assemblies\.NET Micro Framework 4.1\le\Gadgeteer.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Net.Security.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\System.Net.Security.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\System.Http.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Modules\Joystick\NETMF 4.1\le\GTM.GHIElectronics.Joystick.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\GHI Electronics\GHI OSH NETMF v4.1 SDK\Assemblies\le\GHIElectronics.OSH.NETMF.Hardware.dll'
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Sean\Downloads\CellularRadio-source code(1)\CellularRadio-source code\CellularRadio\bin\Release\NETMF\le\GTM.Seeed.CellularRadio.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Mainboards\FEZHydra\NETMF 4.1\le\GHIElectronics.Gadgeteer.FEZHydra.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Sean\Downloads\CellularRadio-source code(1)\CellularRadio-source code\CellularRadioTest\bin\Release\le\CellularRadioTest.exe', Symbols loaded.
The thread '<No Name>' (0x2) has exited with code 0 (0x0).
Using mainboard GHIElectronics-FEZHydra version 1.0
Program Started
(Sleeping 50 seconds)
CellularRadio : Turning ON
CellularRadio : Turning module on
CellularRadio : SENT: AT

CellularRadio : SENT: AT+CMGF=1

CellularRadio : SENT: AT+CSDH=0

CellularRadio : SENT: AT+CPBS="SM"

CellularRadio : SENT: AT+CPMS="SM"

CellularRadio : SENT: AT+CNMI=2,1,0,1,0

CellularRadio : SENT: AT+COLP=1

CellularRadio : SENT: AT+CGREG=1

CellularRadio : SENT: AT+CREG=1

The thread '<No Name>' (0x4) has exited with code 0 (0x0).
BUTTON BEGIN
CellularRadio : SENT: AT+CPIN?

CellularRadio : SENT: AT+CREG?

SendSms Returned: 0
BUTTON END

I am not trusting the driver one bit. As I mentioned, I even hacked up my own miniature version for testing.

Two main boards, a few revisions of the driver and now multiple socket types are all showing the same thing. I think this unit must be defective.

I’ve just run into this with my Spider.

I build an adaptor from the extender module to my XBee.

I followed this circuit:
http://www.ghielectronics.com/downloads/Gadgeteer/Module/XBee%20sch.pdf

And connected it to this:
http://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Regulated-v10.pdf

I only connected TX, RX, +5V and Ground but I plugged it into socket 8 which doesn’t have flow control.

I can see the data I send to the XBee leave the port and can see the response on my logic analyser but the response never gets processed by the serial port. (Specifically, Gadgeteer.Interfaces.Serial.DataReceived never gets fired.)

Can you please tun this test without any xbee or any module? Just connect a wire from TX ot RX and check that way.

While writing the test, I noticed my mistake - I was sending the serial command in the ProgramStarted() method and blocking while I waited for the response.

The loop-back test worked when I put the send in a timer.

Thanks.

I ordered a new cellular unit from GHI instead of Seeed. Very speedy delivery! This new unit with the same exact code works fine so that definitely confirms the first module was defective somehow. Now just to get a refund (or at least an exchange) from Seeed. Been 4 days since they last responded :confused:

Thanks for the help! Time to drill into this driver now :slight_smile: