Core module 2 issues with raspberry set-up

Hello all,

I found a one spare core module 2 so i tried to make it works by procedure described here.

I did following steps:

  • I installed Rasberry with image Raspbian Stretch Lite.

  • I followed instructions in a article Custom Setup on Raspberry Pi. Therefore I connected raspberry to core module 2 via usb cable and I flashed core module 2 with image bigclownlabs/bcf-gateway-core-module:v1.13.0. It was executed successfully:

    $ bcf -d /dev/ttyUSB0 flash bigclownlabs/bcf-gateway-core-module:v1.13.0
    Erase  [####################] 100.0%
    Write  [####################] 100.0%
    Verify [####################] 100.0%
    
  • In current state core module doesn’t send any data into mosquitto. I would expect some temperature data. Plus it doesn’t response to any request via mosquitto. I got this response only:

    $ mosquitto_sub -t "#" -v
    gateway/all/info/get null
    gateway/core-module/info null
    

Some outputs:

$ bch gw list
core-module None

$ bcf devices -v
/dev/ttyAMA0        
     desc: ttyAMA0
     hwid: 3f201000.serial
/dev/ttyUSB0        
     desc: ttyUSB0
     hwid: USB VID:PID=0403:6015 SER=bc-core-module-r2-836d19838e7f LOCATION=1-1.5

$ pm2 restart bcg-cm
Use --update-env to update environment variables
[PM2] Applying action restartProcessId on app [bcg-cm](ids: 1)
[PM2] [bcg-cm](1) ✓
┌──────────┬────┬─────────┬──────┬──────┬────────┬─────────┬────────┬─────┬───────────┬────────────┬──────────┐
│ App name │ id │ version │ mode │ pid  │ status │ restart │ uptime │ cpu │ mem       │ user       │ watching │
├──────────┼────┼─────────┼──────┼──────┼────────┼─────────┼────────┼─────┼───────────┼────────────┼──────────┤
│ bcg-cm   │ 1  │ N/A     │ fork │ 1061 │ online │ 1       │ 0s     │ 0%  │ 5.1 MB    │ findmyname │ disabled │
│ node-red │ 0  │ N/A     │ fork │ 563  │ online │ 0       │ 113m   │ 0%  │ 73.8 MB   │ findmyname │ disabled │
└──────────┴────┴─────────┴──────┴──────┴────────┴─────────┴────────┴─────┴───────────┴────────────┴──────────┘
 Use `pm2 show <id|name>` to get more details about an app

$ pm2 show bcg-cm
 Describing process with id 1 - name bcg-cm 
┌───────────────────┬────────────────────────────────────────────────┐
│ status            │ online                                         │
│ name              │ bcg-cm                                         │
│ version           │ N/A                                            │
│ restarts          │ 1                                              │
│ uptime            │ 35s                                            │
│ script path       │ /usr/bin/python3                               │
│ script args       │ /usr/local/bin/bcg -c /etc/bigclown/bcg-cm.yml │
│ error log path    │ /home/findmyname/.pm2/logs/bcg-cm-error.log    │
│ out log path      │ /home/findmyname/.pm2/logs/bcg-cm-out.log      │
│ pid path          │ /home/findmyname/.pm2/pids/bcg-cm-1.pid        │
│ interpreter       │ none                                           │
│ interpreter args  │ N/A                                            │
│ script id         │ 1                                              │
│ exec cwd          │ /home/findmyname                               │
│ exec mode         │ fork_mode                                      │
│ node.js version   │ N/A                                            │
│ node env          │ N/A                                            │
│ watch & reload    │ ✘                                              │
│ unstable restarts │ 0                                              │
│ created at        │ 2019-03-24T20:24:05.494Z                       │
└───────────────────┴────────────────────────────────────────────────┘

$ cat /etc/bigclown/bcg-cm.yml
device: /dev/ttyUSB0
name: "core-module"
mqtt:
    host: localhost
    port: 1883

$ tailf /home/findmyname/.pm2/logs/bcg-cm-error.log 
2019-03-24 19:02:18,234 INFO: Start
2019-03-24 19:02:18,234 INFO: Serial port: /dev/ttyUSB0
2019-03-24 19:02:18,236 INFO: MQTT broker host: localhost, port: 1883, use tls: False
2019-03-24 19:02:18,249 INFO: Opened serial port: /dev/ttyUSB0
2019-03-24 19:02:18,252 INFO: Connected to MQTT broker with code 0
2019-03-24 20:24:06,223 INFO: Start
2019-03-24 20:24:06,224 INFO: Serial port: /dev/ttyUSB0
2019-03-24 20:24:06,227 INFO: MQTT broker host: localhost, port: 1883, use tls: False
2019-03-24 20:24:06,233 INFO: Opened serial port: /dev/ttyUSB0
2019-03-24 20:24:06,245 INFO: Connected to MQTT broker with code 0

So far I cannot find any errors …

I was curious so i tried to flash it with usb dongle image bigclownlabs/bcf-gateway-usb-dongle:v1.13.0.
Surprisingly it worked + it responded to requests via mosquitto.

Could you advise whether this is expected behaviour or how can i debug it further?

Thx
BR
Findmyname

So sorry,
firmware bcf-gateway-core-module for old core module revision 1.3 without ftdi driver.
For new core module revision 2.x can by use same firmware as for dongle bcf-gateway-usb-dongle.
This is bad description in doc and readme on github, I go fix it.

For explanation bcf-gateway-core-module is older then bcf-gateway-usb-dongle because, existed core module r1.3 and then has born dongle.