I am working on Beagle Bone Rev A5 and my UART1 and UART2 are working fine with these mux settings:
echo 20 > /sys/kernel/debug/omap_mux/uart1_rxd
echo 0 > /sys/kernel/debug/omap_mux/uart1_txd
echo 1 > /sys/kernel/debug/omap_mux/spi0_d0
echo 21 > /sys/kernel/debug/omap_mux/spi0_sclk
Now I want hardware flow control enabled and for that I want to use UART4 and UART5. Can anybody help me enabling Rx,Tx,RTS,CTS of UART 4 & 5? What will be the mux setting for these UARTs?
This page helped me a bit:
http://www.jerome-bernard.com/blog/2012/06/04/beaglebone-serial-ports-and-xbees/
You have to set :
UART4 - RX /sys/kernel/debug/omap_mux/gpmc_wait0 26 Mode 6 - Input
UART4 - TX /sys/kernel/debug/omap_mux/gpmc_wpn 6 Mode 6 - Output
UART5 - RX /sys/kernel/debug/omap_mux/lcd_data9 24 Mode 4 - Input
UART5 - TX /sys/kernel/debug/omap_mux/lcd_data8 4 Mode 4 - Output
Related
As per title I want to check output of the equivalent command but on a Solaris 11 box.
Is there a similar command?
In Solaris 11 you have standard ntp daemon so you can use command:
ntpq -p
to get the list of peers. And with this command you can see also some local time sync parameters:
root#sol1:/etc/inet# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
+time.cloudflare 10.74.8.178 3 u 15 64 3 9.287 -241.90 210.255
*mail.eban-meban 147.125.80.35 3 u 36 64 1 4.415 -192.07 16.270
-purple.bonev.co 151.237.71.222 2 u 14 64 3 5.197 -242.41 219.576
+ntp.netguard.bg 20.39.126.15 2 u 47 64 3 4.570 -162.62 147.576
Eventually, I want to tap into the K-line of my Kawasaki Ninja with an (ISO 9141) OBD reader, using an ESP32 WROVER and a L9637 single-wire transceiver. To get there, I'm at the stage of confirming my L9637 chip is wired properly to my ESP32.
Here's where I am:
HardwareSerial Sender(1); // Serial port1 is the 'Sender'
HardwareSerial Receiver(2); // Serial port2 is the 'Receiver'
/*
* LilyGo TTGO T7 v1.5 pins
* ___________
* GND RST | | TXD GND
* N-C VP | ESP32 | RXD 27
* VN 26 | WROVER | 22 25 (22 <- SEND-Rx)
* 35 18 | TTGO | 21 32 (21 -> RCVR-Tx)
* 33 19 | T7 | 27 TDI (27 -> SEND-Tx)
* 34 23 | v1.5 | 25 4 (25 <- RCVR-Rx)
* TMS 5 | | GND 0
* N-C 3v3 | WiFi+BLE | 5v 2
* SD2 TCK | | TDO SD1
* CMD SD3 |______usb__| SD0 CLK
* (back) (+) (-) LiPo Batt Conn
*
* ____________
* 22 <- RX 1 | SENDER | 8 LI
* LO 2 | L9637 | 7 Vs(12v)
* (5v)Vcc 3 | tranceiver | 6 K ->-> K on #2
* 27 -> TX 4 |_____#1_____| 5 Gnd |
* |
* ____________ V
* 25 <- RX 1 | RECEIVER | 8 LI |
* LO 2 | L9637 | 7 Vs(12v) |
* (5v)Vcc 3 | tranceiver | 6 K <-<- K on #1
* 21 -> TX 4 |_____#2_____| 5 Gnd
*
* (need a 510ohm between K and Vs, and a cap to Gnd on each V)
*/
// define Rx and TX on the 2 L9637 chips with K's connected:
// TX is Input for K as output. RX is Output for K as input.
#define Sender_Txd_pin 27 // to Tx on Sender
#define Sender_Rxd_pin 22 // from Rx on Sender L9637
#define Receiver_Txd_pin 21 // to Tx on Receiver L9637
#define Receiver_Rxd_pin 25 // from Rx on Receiver
void setup() {
Serial.begin(115200);
// init both L9637 RX's with a short HIGH-LOW
Serial.println( "init both with Rx HIGH" );
pinMode( Sender_Rxd_pin, OUTPUT );
pinMode( Receiver_Rxd_pin, OUTPUT );
digitalWrite( Sender_Rxd_pin, HIGH );
digitalWrite( Receiver_Rxd_pin, HIGH );
delay(300);
Serial.println( "sending both Rx LOW" );
digitalWrite( Sender_Rxd_pin, LOW );
digitalWrite( Receiver_Rxd_pin, LOW );
delay(25);
Sender.begin(10400, SERIAL_8N1, Sender_Txd_pin, Sender_Rxd_pin); // iso9141 baud rate
Receiver.begin(10400, SERIAL_8N1, Receiver_Txd_pin, Receiver_Rxd_pin);
}
void loop() {
Sender.println( 3 ); // just an integer
delay( 200 );
while (Receiver.available()) {
char RxdChar = Receiver.read();
Serial.print(RxdChar);
}
delay(2000);
}
Note: I've tested the code and the ESP32 serial ports extensively. It works well. I've check the wiring on the (2) L9637 chips, properly powered, 510 ohm resistors, proper capacitors, with their K-lines connected to each other. When I Digital.Write to the Sender L9637 TX, I can see the K respond as well as the Receiver L9637 RX. But when I do the serial write, the Responder.available() never goes true. What gives?
I appreciate any assistance.
Can anyone work out why I can't get these two libraries to communicate to each other over LoRa?
https://github.com/sandeepmistry/arduino-LoRa
https://github.com/ARMmbed/mbed-semtech-lora-rf-drivers/tree/master/SX1276
I can get each library to communicate with another device using the same lib and even compile the arduino code onto the stm32 and have an stm32 and arduino board talk fine but using one of each library they won't. As far as I can tell it can only be a LoRa settings difference.
Arduino Settings
#define TX_POWER 17 // valid range 2-17 on BOOST_PIN, 2-20 on PA_OUTPUT_RFO_PIN
#define TX_PA_PIN PA_OUTPUT_PA_BOOST_PIN
#define SPREADING_FACTOR 7 // 6 -> 12
#define SIGNAL_BANDWIDTH 250E3 // 125E3 //250E3 //62.5E3
#define LORA_FREQUENCY 915E6
#define SYNC_WORD 0x12
...
while (!LoRa.begin(LORA_FREQUENCY)) {
Serial.println(".");
delay(10);
}
// Configure the LoRa Radio
LoRa.setSpreadingFactor(SPREADING_FACTOR);
LoRa.setSignalBandwidth(SIGNAL_BANDWIDTH);
LoRa.setTxPower(TX_POWER, TX_PA_PIN);
LoRa.setSyncWord(SYNC_WORD);
LoRa.setCodingRate4(5);
LoRa.setPreambleLength(8);
LoRa.disableCrc();
LoRa.disableInvertIQ();
MBED Settings
#define frequency 915E6
#define bandwidth 1 //LoRa: [0: 125 kHz, 1: 250 kHz, 2: 500 kHz, 3: Reserved]
#define datarate 7 // SPREADING FACTOR //LoRa: [6: 64, 7: 128, 8: 256, 9: 512, 10: 1024, 11: 2048, 12: 4096 chips]
#define coderate 1 //LoRa: [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8]
#define bandwidth_afc 0
#define preamble_len 8
#define symb_timeout 0
#define fix_len false
#define crc_on false
#define freq_hop_on false
#define hop_period 0
#define iq_inverted false
#define rx_continuous true
#define power 17
#define fdev 0
#define timeout 100000
...
lora.set_tx_config (modem_type::MODEM_LORA,
power,
fdev,
bandwidth,
datarate,
coderate,
preamble_len,
fix_len,
crc_on,
freq_hop_on,
hop_period,
iq_inverted,
timeout
);
lora.set_rx_config (modem_type::MODEM_LORA,
bandwidth,
datarate,
coderate,
bandwidth_afc,
preamble_len,
symb_timeout,
fix_len,
payload_len,
crc_on,
freq_hop_on,
hop_period,
iq_inverted,
rx_continuous
);
lora.init_radio(&lora_events);
lora.set_channel(frequency);
lora.set_public_network(false);
lora.receive();
Have tried setting both sync words to either 0x12 or 0x34 too.
Block - 130.0.0.0/25 .
Want to create 8 subnet.
Binary Form of Block will be
1000 0010.0000 0000.0000 0000.0000 0000/25
Subnet mask would be
1111 1111.1111 1111.1111 1111.1000 0000
How will I make 8 subnetwork out of this?
You can handle 2 ^ 7 = 128 IP's (binary form: 000 0000 - 111 1111). Each subnetwork will have 128 / 8 = 16 IP's. So the subnetworks will look as follows.
130.0.0.0 - 130.0.0.15
130.0.0.16 - 130.0.0.31
130.0.0.32 - 130.0.0.47
130.0.0.48 - 130.0.0.63
130.0.0.64 - 130.0.0.79
130.0.0.80 - 130.0.0.95
130.0.0.96 - 130.0.0.111
130.0.0.112 - 130.0.0.127
I'm trying to discover devices, from a coordinator, in my network.
So I sent an ND command to the coordinator and I'm correctly receiving response from other Xbee.
The next step will be to store the information I've received in a web application, in oder to send commands and data.
However, what I'm still missing is some parts in the frame respose. So far I've mapped the frame like this:
1 7E start frame
===== =================== MESSAGE LENGHT
2-3 0x00 0x19 -> 25
===== =================== PACKET TYPE
4 88 -> response to a remote AT command
5 02 frame ID
===== =================== AT COMMAND
6-7 0x4E 0x44 "ND"
8 00 status byte (00 -> OK)
===== =================== MY - Remote Address
9-10 0x17 0x85
===== =================== SH - SERIAL NUMBER HIGH
11-14 0x00 0x13 0xA2 0x00
===== =================== SL - SERIAL NUMBER LOW
15-18 0x40 0xB4 0x50 0x23
===== =================== SIGNAL
19 20
= ======== NI - Node Identifier
20 00
21 FF
22 FE
23 01
24 00
25 C1
26 05
27 10
28 1E
===== ===== CHECKSUM (25th bytes from MESSAGE LENGHT)
29 19
So, where I can find in this response the address of the device ?
My guess is in the NI part of the message but, I haven't find any example/information of how the data are organised.
Could someone point me in the right direction?
As someone told me in the dig.com forum
NI<CR> (Variable length)
PARENT_NETWORK ADDRESS (2 Bytes)<CR>
DEVICE_TYPE (1 Byte: 0=Coord, 1=Router, 2=End Device)
STATUS (1 Byte: Reserved)
PROFILE_ID (2 Bytes)
MANUFACTURER_ID (2 Bytes
So, loking to my frame response:
00 --- Node Identifier variable, (here 1 byte = 00 because no value is set up).
FFFE --- parent network address (2 bytes)
01 --- device type
00 --- status
C105 --- profile id
101E --- manufacturing id
This, afaik, means that in this last part of the frame, no information about address of the device are given. Only information are the SL and SH.
The 16-bit network address is what you've labeled "MY" (0x1785), and the 64-bit MAC address is the combination of SH/SL (00 13 A2 00 40 B4 50 23).