Eduardo Garcia
Forum Replies Created
-
AuthorPosts
-
November 30, 2015 at 8:57 am in reply to: Always receiving failed CRC and failed MIC packages #10158
Eduardo Garcia
ParticipantThanks Brandon!
Mysteriously the Conduit had all nodes erased this morning! But I will keep this command in mind.
Thanks!
Eduardo Garcia
ParticipantHi Brandon:
It seems that my device (Nucleo Board with the LoRaWAN-lmic-app from SemTech in mBed, available https://developer.mbed.org/teams/Semtech/code/LoRaWAN-lmic-app/) needs that we also especify the port. For example, the following code in the conduit was received correctly:
mosquitto_pub -t lora/01:02:03:04:05:06:07:08/down -m '{ "data":"aGVsbG8=", "port":6 }'
I hope this may be of use to somebody now or in the future using the same devices I am using now!
Eduardo Garcia
ParticipantBrandon:
Thank you for your reply. In the device side I seem to get a response, but it does not detect a payload. Does the mosquitto command send whatever is in the “data” parameter as the payload?
Thanks!
Eduardo Garcia
ParticipantHi Brandon:
Thanks, you are right. I did change the message to be the following:
mosquitto_pub -t lora/01:02:03:04:05:06:07:08/down -m '{ "data":"aGVsbG8=" }'
with the device EUI verified to be 01:02:03:04:05:06:07:08 as noted on node list:
Net Addr Dev EUI Joined Seq Num Up Down 1st 2nd Dropped RSSI min max avg SNR min max avg 33:33:33:32 01:02:03:04:05:06:07:08 2015-11-25T09:00:33Z 154 1173 946 923 23 0 -121 -9 -96 -16.5 13.8 -4.7
But I still do not receive anything. Is there a way to see if the Conduit has tried to send the message on the receive frames? Thanks!
November 25, 2015 at 11:42 am in reply to: Always receiving failed CRC and failed MIC packages #10141Eduardo Garcia
ParticipantIt is also still on the DB
November 25, 2015 at 11:16 am in reply to: Always receiving failed CRC and failed MIC packages #10140Eduardo Garcia
ParticipantDo you know the syntax of node remove or could you give me an example? I have tried node remove but I get a syntax error. I tried
node remove 33:33:33:33
with no luck!-Ed
November 25, 2015 at 11:09 am in reply to: Always receiving failed CRC and failed MIC packages #10138Eduardo Garcia
ParticipantHi Brandon:
I did do the
node add
again after changing address, and with the new address it is working as of now. How can I remove the node of the expired address lease? Is it adding it again?Thanks,
-Ed
Eduardo Garcia
ParticipantHi:
I noticed I mad a mistake, I should use the DevEui, which is 8 bytes in length. However, with that change I still do not receive messages on my device. My device is actin as Class A, and I am receiving messages on the Conduit correctly.
Thanks,
-Ed
November 24, 2015 at 3:14 pm in reply to: Always receiving failed CRC and failed MIC packages #10120Eduardo Garcia
ParticipantI changed my device’s address from 33:33:33:33 to 33:33:33:31 I can receive the messages. Nothing else is different! What can be the cause of this, any idea?
November 24, 2015 at 10:09 am in reply to: Always receiving failed CRC and failed MIC packages #10116Eduardo Garcia
ParticipantI also get the following:
11:8:51:418|INFO| Addr: 33:33:33:33 MIC Check: failed 11:8:51:418|WARNING| Dropping packet, Addr: 33:33:33:33 Duplicate: no 11:9:8:351|INFO| Parsing 1 rx packets 11:9:8:353|INFO| SeqNo: 00040000 PrevSeqNo: 00000000 Duplicate: no
November 13, 2015 at 10:09 am in reply to: Conduit Manual Join to SX1276 MBED (Third party device) #10001Eduardo Garcia
ParticipantHi Jason:
Thank you very much for your help! It seems that the node is now connected and I can see it with the lora-query command.
Thanks again for your fast responses, and for all your help!
November 13, 2015 at 9:39 am in reply to: Conduit Manual Join to SX1276 MBED (Third party device) #9999Eduardo Garcia
ParticipantSorry, I wrote the second command wrong. Now I type
“lora-query -t 5000 -s -n”
and I getnull ^[[ASyntax error in command "node list" Word 1
November 13, 2015 at 9:36 am in reply to: Conduit Manual Join to SX1276 MBED (Third party device) #9998Eduardo Garcia
ParticipantI tried both commands and they say that the command is not found.
November 13, 2015 at 9:29 am in reply to: Conduit Manual Join to SX1276 MBED (Third party device) #9995Eduardo Garcia
ParticipantThanks Jason, now when I do ps -A | grep lora I get
“1383 ? 00:00:03 lora-network-se”So I think that fixed the issue.
I tried to add the node and something seemed to happen. Are there any function I could use to check the nodes in the networks, datalog data or anything to check that the node is indeed in the network?Thanks again!
November 13, 2015 at 9:14 am in reply to: Conduit Manual Join to SX1276 MBED (Third party device) #9993Eduardo Garcia
ParticipantI am now trying with every code being filled with 0xFF as shown below:
nc -u localhost 6677 node add 33333333 ffffffffffffffff ffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff
I also made these changes on the SX1276. I still get connection refused.
November 13, 2015 at 9:04 am in reply to: Conduit Manual Join to SX1276 MBED (Third party device) #9992Eduardo Garcia
ParticipantI am not sure if they are running correctly: no luck connecting. Also, “ps -A | grep lora” does not return anything.
I changed the quotes you mentioned (I have no idea how they could be other characters!)
After doing this change and restarting I am getting the same log message as I posted before.
November 13, 2015 at 8:58 am in reply to: Conduit Manual Join to SX1276 MBED (Third party device) #9989Eduardo Garcia
ParticipantHere is the log from my latest server restart:
9:55:38:888|INFO| ------------------------------------------- 9:55:38:893|INFO| DB loading... 9:55:38:900|ERROR| SQL error: [no such table: schema] on first call 9:55:38:900|INFO| Database version: 0 9:55:38:900|INFO| Latest version: 5 9:55:38:901|WARNING| Creating database 9:55:38:969|INFO| Network settings not found in database, setting to current settings 9:55:39:37|INFO| Beacon is disabled
November 13, 2015 at 8:43 am in reply to: Conduit Manual Join to SX1276 MBED (Third party device) #9987Eduardo Garcia
ParticipantHi Jason:
Thank again for your ligthning fast responses!
Contents of Init script:
#!/bin/bash NAME="lora-network-server" ENABLED="yes" [ -f /etc/default/$NAME ] && source /etc/default/$NAME run_dir=/var/run/lora conf_dir=/var/config/lora conf_file=$conf_dir/lora-network-server.conf conf_db=$conf_dir/lora-network-server.db net_server=/opt/lora/lora-network-server net_server_log=/var/log/lora-network-server.log net_server_pidfile=$run_dir/$NAME.pid pkt_fwd=/opt/lora/basic_pkt_fwd pkt_fwd_log=/var/log/lora-pkt-fwd.log pkt_fwd_pidfile=$run_dir/lora-pkt-fwd.pid lora_us_id="MTAC-LORA-915" lora_eu_id="MTAC-LORA-868" read_card_info() { # product-id of first lora card lora_id=$(mts-io-sysfs show lora/product-id 2> /dev/null) lora_eui=$(mts-io-sysfs show lora/eui 2> /dev/null) # remove all colons lora_eui_raw=${lora_eui//:/} } card_found() { if [ "$lora_id" = "$lora_us_id" ] || [ "$lora_id" = "$lora_eu_id" ]; then echo "Found lora card $lora_id" return 0 else return 1 fi } do_start() { read_card_info if ! [ -f $conf_file ]; then echo "$0: $conf_file missing" exit 1 fi if ! card_found; then echo "$0: MTAC-LORA not detected" exit 1 fi echo -n "Starting $NAME: " mkdir -p $run_dir # start network server start-stop-daemon --start --background --make-pidfile \ --pidfile $net_server_pidfile --exec $net_server -- \ -c $conf_file --lora-eui $lora_eui --lora-path $run_dir --db $conf_db \ --noconsole -l $net_server_log sleep 1 # start packet forwarder start-stop-daemon --start --background --make-pidfile \ --pidfile $pkt_fwd_pidfile --exec $pkt_fwd -- \ -c $run_dir -l $pkt_fwd_log echo "OK" } do_stop() { echo -n "Stopping $NAME: " start-stop-daemon --stop --quiet --oknodo --pidfile $net_server_pidfile --retry 15 start-stop-daemon --stop --quiet --oknodo --pidfile $pkt_fwd_pidfile --retry 5 rm -f $net_server_pidfile $pkt_fwd_pidfile echo "OK" } if [ "$ENABLED" != "yes" ]; then echo "$NAME: disabled in /etc/default" exit fi case "$1" in "start") do_start ;; "stop") do_stop ;; "restart") ## Stop the service and regardless of whether it was ## running or not, start it again. do_stop do_start ;; *) ## If no parameters are given, print which are avaiable. echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac
I also tried the JSON lint. It seems it did not like the comments that the file had, so I removed them until I got no errors. Here is the conf file I am using now:
{ "db": "/var/config/lora/lora-network-server.db", "backupInterval": "21600", "lora": { "netID": "010203", "frequencyBand": "915", "frequencySubBand": 7, "rx1DatarateOffset": 0, "rx2Datarate": 12, "maxTxPower": 14, "frequencyEU": 867500000 }, "udp": { "appPortUp": 1784, "appPortDown": 1786 }, "addressRange": { "start": "00:00:00:01", "end": "FF:FF:FF:FE" }, "network": { "public": true, "leasetime": 1440, "name": "BGLORANETWORK", "passphrase": "BGLORANETWORK" }, "mqtt": { "enabled": true, "host": "127.0.0.1", "port": 1883 }, "log": { "console": true, "syslog": false, "level": 30, "path": "/var/log/lora-network-server.log" } }
I also tried stopping and starting the proccess as you suggested, but when I try to stop it tells me the following:
root@mtcdt:/var/config/lora# /etc/init.d/lora-network-server stop Stopping lora-network-server: start-stop-daemon: warning: failed to kill 1100: No such process OK root@mtcdt:/var/config/lora# /etc/init.d/lora-network-server start Found lora card MTAC-LORA-915 Starting lora-network-server: OK root@mtcdt:/var/config/lora#
I still believe the process may not be starting correctly!
Thanks!-
This reply was modified 9 years, 4 months ago by
Eduardo Garcia.
November 12, 2015 at 6:31 pm in reply to: Conduit Manual Join to SX1276 MBED (Third party device) #9976Eduardo Garcia
ParticipantSorry Jason, after changing the name I erased the contents of the log, and no other log has been created! The only thing that it said before I deleted it was that it was complaining about the name being too short. Nothing else.
I have retried everhing again (restart lora server and manual connection) to see if it would write something to the log, but no luck. The weird part is that the log was erased, and now I cannot find the file!
November 12, 2015 at 6:19 pm in reply to: Conduit Manual Join to SX1276 MBED (Third party device) #9974Eduardo Garcia
ParticipantI have changed the network name to be more than 8 characters long, and after restarting I do not get any errors on the log. I am not sure if the lora process is active, “ps -A | grep lora” returns me nothing.
I think the LMIC has not been modified for 8 channel operation (I am still new to the code), I will check into it.
“ps -A” returns me the following:
PID TTY TIME CMD 1 ? 00:00:05 init 2 ? 00:00:00 kthreadd 3 ? 00:00:00 ksoftirqd/0 5 ? 00:00:00 kworker/0:0H 6 ? 00:00:00 kworker/u2:0 7 ? 00:00:00 khelper 8 ? 00:00:00 kdevtmpfs 9 ? 00:00:00 writeback 10 ? 00:00:00 bioset 11 ? 00:00:00 crypto 12 ? 00:00:00 kblockd 13 ? 00:00:00 khubd 23 ? 00:00:00 rpciod 25 ? 00:00:00 khungtaskd 26 ? 00:00:00 kswapd0 27 ? 00:00:00 fsnotify_mark 28 ? 00:00:00 nfsiod 29 ? 00:00:00 cifsiod 62 ? 00:00:00 deferwq 74 ? 00:00:00 jffs2_gcd_mtd6 87 ? 00:00:00 udevd 195 ? 00:00:10 jffs2_gcd_mtd8 222 ? 00:00:00 kworker/u2:2 336 ? 00:00:00 udevd 337 ? 00:00:00 udevd 373 ? 00:00:00 dbus-daemon 382 ? 00:00:00 sshd 393 ? 00:00:00 syslogd 397 ? 00:00:00 klogd 446 ? 00:00:37 mosquitto 464 ? 00:00:00 crond 470 ? 00:00:00 reset-handler 477 ttyS0 00:00:00 getty 479 ttyGS0 00:00:00 getty 686 ? 00:00:00 kworker/0:0 705 ? 00:00:00 kworker/0:2 751 ? 00:00:05 sshd 756 pts/0 00:00:01 sh 1292 ? 00:00:23 basic_pkt_fwd 1298 pts/0 00:00:00 ps
November 12, 2015 at 6:05 pm in reply to: Conduit Manual Join to SX1276 MBED (Third party device) #9972Eduardo Garcia
ParticipantAlso:
# opkg list | grep lora lora-network-server - 0.0.8-r0.0 lora-packet-forwarder - 1.4.1-r8.16 lora-query - 0.0.1-r0.0
November 12, 2015 at 5:59 pm in reply to: Conduit Manual Join to SX1276 MBED (Third party device) #9970Eduardo Garcia
ParticipantHi Jason:
Thanks, I have checked your comments. I did write the nc -u localhost 6677 correctly on my code, I mispelled it on this post (sorry). I will change the network name and passphrase (but aren’t they for OTA?). When I do “ps -A | grep lora” nothing is happening! I believe Lora is not running. I did “/etc/init.d/lora-network-server restart” and got the following:
Stopping lora-network-server: start-stop-daemon: warning: failed to kill 1145: No such process OK Found lora card MTAC-LORA-915 Starting lora-network-server: OK
Then I did “ps -A | grep lora” but nothing appears on screen.
-
This reply was modified 9 years, 4 months ago by
Eduardo Garcia.
November 12, 2015 at 5:50 pm in reply to: Conduit Manual Join to SX1276 MBED (Third party device) #9965Eduardo Garcia
ParticipantSure!
Here was my first try with the original info:
node add 12345678 0000000000000000 0123456789ABCDEF 2b7e151628aed2a6abf7158809cf4f3c 2b7e151628aed2a6abf7158809cf4f3c
I also tried the following (changing all data on the SX1276) just to rule out stuff like endiannes:
node add 33333333 ffffffffffffffff ffffffffffffffff afafafafafafafafafafafafafafafaf afafafafafafafafafafafafafafafaf
I am not sure about the command to connect to the command port. I did
'nc -u localhost 6677'
after connecting to the Conduit by SSH.Thank you!
-
This reply was modified 9 years, 4 months ago by
Eduardo Garcia.
November 12, 2015 at 5:35 pm in reply to: Conduit Manual Join to SX1276 MBED (Third party device) #9961Eduardo Garcia
ParticipantI forgot to mention the code I am using on the SX1276 is (https://developer.mbed.org/teams/Semtech/code/LoRaWAN-lmic-app/).
Here is my mLinux configuration file:
GNU nano 2.2.5 File: lora-network-server.conf { "db": "/var/config/lora/lora-network-server.db", "backupInterval": 21600, /* DB write interval (seconds) */ "lora": { "netID": "010203", /* netID for beacon packets */ "frequencyBand": "915", /* US="915", EU="868" */ "frequencySubBand": 7, /* Sub-band for US operation, 1-8 */ "rx1DatarateOffset": 0, /* Datarate offset for mote rx window 1 s$ "rx2Datarate": 12, /* Datarate for mote rxwindow 2 $ "maxTxPower": 14, /* Max Tx power (dBm), -6 to 26 */ "frequencyEU": 867500000 /* center freq for extra EU channels (Hz$ }, "udp": { "appPortUp": 1784, /* port for user-developed application use */ "appPortDown": 1786 /* port for user-developed application use */ }, "addressRange": { "start": "00:00:00:01", /* address range used for mDots */ "end": "FF:FF:FF:FE" }, "network": { "public": true, /* set to false for private LoRa network with $ "leasetime": 1440, /* time until mDot join expires (minutes) */ "name": "LORA", /* configure network security */ "passphrase": "LORA" }, "mqtt" : { "enabled": true, /* set to true to publish/subscribe to MQTT serv$ "host": "127.0.0.1", "port": 1883 }, "log" : { "console" : true, "syslog" : false, "level" : 30, /* error=10, warn=20, info=30, debug=50, trace=60, $ "path": "/var/log/lora-network-server.log" } }
-
This reply was modified 9 years, 4 months ago by
Eduardo Garcia.
Eduardo Garcia
ParticipantHi Darrik:
You are completely right! Mine is 210L, I did not notice. Is there a way to change the firmware to AEP, or should I look into changing hardware?
Thank you for your fast reply!
-Ed
-
This reply was modified 9 years, 4 months ago by
-
AuthorPosts