IoT Gateway for Raspberry Pi problem

46 views
Skip to first unread message

Dave MacRae

unread,
Mar 29, 2021, 7:48:20 AM3/29/21
to PrivateEyePi
Hi,

I have an IoT Gateway for Raspberry Pi 10 PIN attached to a Raspberry Pi Zero W.

When I try to test the device  don't get the expected response:

pi@pitemp:~/src/rf_tools $ python rf_config.py 01 HELLO
SENT     : 01HELLO
NO REPLY
pi@pitemp:~/src/rf_tools $ python serial_mon.py
JemRF Serial Monitor 2.0
Press ctrl-c to exit
^CTrue

I have (I think) followed all the recommended steps in preparing the PI.
    Used raspi-config to set up the Serial port correctly.
    Disabled Bluetooth
    Disabled hciuart which was accessing the TTY
    /dev/ttyAMA0 looks OK
        pi@pitemp:~ $ ls -l /dev/ttyA*
        crw-rw---- 1 root dialout 204, 64 Mar 29 12:22 /dev/ttyAMA0

Any advice on where to look next?

Thanks

Dave





Gadjet Nut

unread,
Mar 29, 2021, 8:15:53 AM3/29/21
to Dave MacRae, PrivateEyePi
See here for some troubleshooting tips: 



On Mar 29, 2021, at 7:48 AM, Dave MacRae <da...@macrae.org.uk> wrote:

Hi,
--
You received this message because you are subscribed to the Google Groups "PrivateEyePi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to privateeyepi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/privateeyepi/a50c1fbb-9d7b-4df5-86f8-7f9b5be0ba87n%40googlegroups.com.

Dave MacRae

unread,
Mar 29, 2021, 8:18:53 AM3/29/21
to PrivateEyePi
Went through all those, no joy although I'm not sure how to "
  • Do a loop-back test to test if the port is working
"

Thanks

Dave

Dave MacRae

unread,
Mar 30, 2021, 9:29:23 AM3/30/21
to PrivateEyePi
Further investigations:

If I remove the IoT Gateway from the Pi Zero W and do the same test, I get the same "No REPLY" result.

I rebuilt a Pi 3A, configured as suggested and I get exactly the same results.

This leads me to one of two conclusions:

1) There is still some fundamental configuration item that I'm missing.
2) The IoT Gateway is faulty/DOA.

Any suggestions are welcome.

Thanks

Dave

Gadjet Nut

unread,
Apr 1, 2021, 5:50:56 PM4/1/21
to PrivateEyePi
The loopback test would rule out a config issue and point to the 2nd conclusion.

Gadjet Nut

unread,
Apr 1, 2021, 5:58:24 PM4/1/21
to PrivateEyePi
Here are some details on a loopback test:

Install a jumper between RX and TX (see attached).

Then run this code that sends some data to the TX pin that goes directly to the RX pin and get displayed on the screen. If the data is displayed on the screen then you know the transmit and receive on the serial port is working.



import serial

sPortToUse = "/dev/ttyAMA0"
sTest = "This data was sent to the serial port ".encode('utf-8')
sReceive = b""
iBytesSent = 0
serialPort = serial.Serial(sPortToUse, 9600, timeout = 2)
serialPort.flushOutput()
serialPort.flushInput()
if serialPort.open:
    print("Opened port", sPortToUse)
    iBytesSent = serialPort.write(sTest)
    print ("Sent", iBytesSent, "bytes")
    sReceive = serialPort.readline()
    print (sReceive.decode('utf-8'))
else:
    print("Port", sPortToUse, "failed to open")
serialPort.close()

If the serial port is working you will see the following:

('Opened port', '/dev/ttyAMA0')
('Sent', 38, 'bytes')
This data was sent to the serial port


IMG_8581 (2).JPG

Dave MacRae

unread,
Apr 2, 2021, 8:53:21 AM4/2/21
to PrivateEyePi
Hi,

That worked. I got the results as expected.

Does that suggest the gateway is DOA?

Thanks

Dave

Gadjet Nut

unread,
Apr 2, 2021, 8:56:37 AM4/2/21
to Dave MacRae, PrivateEyePi
Looks like it yes. We’ll be in touch. 
You received this message because you are subscribed to a topic in the Google Groups "PrivateEyePi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/privateeyepi/k74nY1nZXts/unsubscribe.
To unsubscribe from this group and all its topics, send an email to privateeyepi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/privateeyepi/d1a6222f-b20d-46b3-b407-0845ad21b3e4n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages