dudewheresmycode
Posts: 16
Joined: Thu Aug 16, 2012 5:28 am

Issue with serial communication via GPIO (RPi and RockBlock)

Fri May 29, 2015 10:11 pm

I'm trying to integrate the RockBlock Iridium modem with my Raspberry PI.

I’m having an issue reading messages off the serial device with the SBD node.js library provided by Rock7 (http://www.veri.fi/iridiumsbd.tar.gz). It seems to work fine when using the USB to UART cable, however when wiring directly to the GPIO header on the PI (following the steps in the tutorial at http://www.makersnake.com/rockblock/) I can’t seem to read the messages. The serial connection to the modem seems OK. I can initiate, send messages, and receive ring alerts and signal quality, but once the message is downloaded, I can’t seem to read it.

http://cloud.ndmweb.com/sbd-nodejs-output.txt
The full output and error I’m receiving with the node.js library using direct header connections.

User avatar
joan
Posts: 15110
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Issue with serial communication via GPIO (RPi and RockBl

Fri May 29, 2015 10:30 pm

What's the difference between AT+SBDRT and AT+SBDRB? Are they doing the same thing?

dudewheresmycode
Posts: 16
Joined: Thu Aug 16, 2012 5:28 am

Re: Issue with serial communication via GPIO (RPi and RockBl

Fri May 29, 2015 11:48 pm

I'm assuming one is for reading binary and other other is for plain text. However, I'm not well versed in AT commands or serial communication. I did noticed in the node.js library it seems one function

Code: Select all

readBinaryMessage
uses AT+SBDRB and another function

Code: Select all

readMessage
uses AT+SBDRT. Neither commands work when using direct UART via GPIO headers. I get an undefined body variable using the readMessage command, rather then a buffer error.

https://www.rock7.com/downloads/IRDM_IS ... ct2012.pdf
AT Command Reference Says:
+SBDRB - Short Burst Data: Read Binary Data from ISU
+SBDRT - Short Burst Data: Read a Text Message from the ISU

dudewheresmycode
Posts: 16
Joined: Thu Aug 16, 2012 5:28 am

Re: Issue with serial communication via GPIO (RPi and RockBl

Fri May 29, 2015 11:54 pm

I did notice this tip from Rock7, which may be related and will try tonight.
If you are using the SBDRT command, and the modem appears to 'hang' when you issue the command, it is probably due to flow control configuration. The default state for the RockBLOCK and RockBLOCK+ units has flow control turned ON in the modem. When running in 3-wire serial mode, flow control should be turned OFF, which will ensure you get responses to your requests.

Use the command AT&K0 at the start of your command sequence. This turns flow control off, and should solve the problem.

dudewheresmycode
Posts: 16
Joined: Thu Aug 16, 2012 5:28 am

Re: Issue with serial communication via GPIO (RPi and RockBl

Sat May 30, 2015 1:43 am

That did it. For anyone else with the issue, just set the flow control to off, before the readBinaryMessage() function in the iridium.js node module.

Return to “Interfacing (DSI, CSI, I2C, etc.)”