I see getting two hotplug events for each add or remove with some different environment variables on either of two events
trying to use modified example from here that caters for multiple messages, installed in the usb directory, I see that scripts are getting called by logging env variables
GMC300_PRODID="1a86/7523/254"
SYMLINK="GMC300"
if [ "${PRODUCT}" = "${GMC300_PRODID}" ];
then if [ "${ACTION}" = "add" ];
then
DEVICE_NAME=$(ls /sys/$DEVPATH | grep tty)
if [ -z ${DEVICE_NAME} ];
then logger -t Hotplug Warning DEVICE_NAME is empty
exit
fi
logger -t Hotplug Device name of GMC300 is $DEVICE_NAME
ln -s /dev/$DEVICE_NAME /dev/${SYMLINK}
logger -t Hotplug Symlink from /dev/$DEVICE_NAME to /dev/${SYMLINK} created
fi
fi
if [ "${PRODUCT}" = "${GMC300_PRODID}" ];
then if [ "${ACTION}" = "remove" ];
then
rm /dev/${SYMLINK}
logger -t Hotplug Symlink /dev/${SYMLINK} removed
fi
fi
however seems the workaround it is out of date as no tty file exists in the usb device directory searched
yeah, done that and the script is looking for presence of a tty file in
/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0
the directory exists but no tty file exists
wondering if I need kmod-usb-serial-simple, and kmod-usb-serial
installed both of them and no change, dnfw!
the device is usb geiger counter with a tty interface when used set up by udev on raspbian, perhaps need some underlying op sys suppport on openwrt for a specific device???
I was just checking if could run node software of my raspbian product on an openwrt host as a good way to connect a network of my devices to a customers lan with some network protection and be able to get dual function out of the openwrt gateway, mqtt server and some local sensors running on openwrt as well as nodes connected through openwrt.
this is output of dump of environment from a boot up
Looks to me a possibly a change in the way the device is bought up and the state/location of files or need op-sys support for the tty chipset of the device...
(i.e. the hassle of cheap chinese arduino clone on windoze, but works straight away on modern linux as built-in support for whatever clone ftdi chipset)
I guess essence of problem is openwrt is designed for tight resource hardware like old routers, whereas raspberry has loads of ram, loads of SD space and so a whole base distro could be derived but then all the backport problem thing, need people to maintain it.
If you mean "Node.js" you're probably better off with a device with more RAM than most all-in-one routers have. If you mean "software for a sensor node" then you may be OK. The mosquitto package builds cleanly and I have the client running with the OpenSSL TLS package.
Have you installed the various USB packages that might support the connection to the device?
not looked at node.js, my nodes are an assortment of esp8266 using arduino and raspberry pi with raspbian/python/c, basically wanted a way to separate out iot devices from direct connection to my own or a customers network, so they do not need to know the client wifi network password but run on their own network. OpenWRT has luci, kind of user friendly, so would enable the customer to configure the interface/wlan-bridge to their liking. The PI3 has ethernet and wifi built in so has everything needed except perhaps signal strength and looks to me like it will be ok to also run the management software for the wifi iot node network from the openwrt interface and provide an MQTT server to both the clients lan and the wifi iot lan, and function as an IOT node in its own right. I have tested mosquitto already, works great, probably be back for help on setting it up to use ssh LOL
once you get the hang of the ideosyncracies (for a reason) of OpenWRT it seems excellent!