MakerSnake / pyRockBlock

pyRockBLOCK provides super-simple commands enabling you to send and receive messages with just a few lines of code; without having to worry about the nitty-gritty of messing around with Serial Ports, AT commands, signal strength, calculating checksums, retry strategies or making the perfect coffee (only joking, it doesn’t do the latte, err doesn’t do the latter!).
32 stars 23 forks source link

rockBlock code #2

Open ahmedjazeera11 opened 2 years ago

ahmedjazeera11 commented 2 years ago

@rhyshorner, I am using this code to send data of temperature sensor through rockblock 9602. I installed your library. when I try to run the code. it doesn’t do anything. could you point to me what I suppose to change. by the way I am using USB to TTL Serial Adapter. thanks

rhyshorner commented 2 years ago

Have you tried communicating directly through some serial shell, like putty? you'll need to use your com port as the "Serial line" and 19200 as the "Speed".

its a good way of determining if you have, at least, a connection, if you do get a connection try sending "AT" and seeing if it returns an "OK"

ahmedjazeera11 commented 2 years ago

but I am using raspberry pi 4

ahmedjazeera11 commented 2 years ago

if I use screen /dev/pttyUSB0 19200. is communicating and works fine and gives me ‘OK’. but if I use your code nathing happens.

rhyshorner commented 2 years ago

Excellent you know you've connected everything right and you have 2 way comms with the module.

Its actually MakerSnake's code, I just raised the issue a couple of years ago about using with python3. There is a good guide at; http://makersnake.com/remote-controlled-weather-station/rockblock/index.html

alternatively you could use Adafruits CircuitPython library; https://learn.adafruit.com/using-the-rockblock-iridium-modem/raspberry-pi-example

ahmedjazeera11 commented 2 years ago

thank you for your response. I will check those links.